From ef1a2d1d5ccb3af3bb66d0707bcdfbf536b72bb2 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Sat, 22 Jul 2023 21:36:37 -0700 Subject: [PATCH] ci: replace travis with github actions --- saphyr/.github/workflows/ci.yml | 36 +++++++++++++++++++++++++++++++++ saphyr/.travis.yml | 18 ----------------- 2 files changed, 36 insertions(+), 18 deletions(-) create mode 100644 saphyr/.github/workflows/ci.yml delete mode 100644 saphyr/.travis.yml diff --git a/saphyr/.github/workflows/ci.yml b/saphyr/.github/workflows/ci.yml new file mode 100644 index 0000000..6a3354c --- /dev/null +++ b/saphyr/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: [push, pull_request] + +jobs: + check: + name: Lints and checks + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy --no-self-update + - uses: Swatinem/rust-cache@v2 + - name: Run clippy checks + run: cargo clippy --all-targets -- -D warnings + - name: Run format checks + run: cargo fmt --check + + test: + name: Test using Rust ${{ matrix.rust }} on ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + rust: [stable] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v3 + - run: git submodule update --init + - run: rustup toolchain install ${{ matrix.rust }} --profile minimal --no-self-update + - uses: Swatinem/rust-cache@v2 + - name: Run build + run: cargo build + - name: Run tests + run: cargo test -v diff --git a/saphyr/.travis.yml b/saphyr/.travis.yml deleted file mode 100644 index 46b9569..0000000 --- a/saphyr/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: rust - -matrix: - include: - - rust: stable - - rust: beta - - rust: nightly - - rust: 1.33.0 - - rust: nightly - env: CLIPPY - script: | - if rustup component add clippy-preview; then - cargo clippy -- -Dclippy - fi - -script: - - cargo build - - cargo test