From 1ee3bc7258759c0fdf65d6a82a13046cb6d19dd8 Mon Sep 17 00:00:00 2001 From: Clark Moody Date: Sat, 13 Feb 2021 13:17:55 -0600 Subject: [PATCH] Switch to GitHub Actions for CI --- .github/workflows/rust.yml | 85 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 27 ------------ 2 files changed, 85 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/rust.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 00000000..f650b9e8 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,85 @@ +on: [push, pull_request] + +name: Continuous Integration + +jobs: + check: + name: Check + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - 1.29.0 + - stable + - nightly + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + + test: + name: Test Suite + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - 1.29.0 + - stable + - nightly + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + - uses: actions-rs/cargo@v1 + with: + command: test + args: --verbose --features strict + + fmt: + name: Rustfmt + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + - run: rustup component add clippy + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 16446d22..00000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: rust -rust: - - stable - - nightly - - 1.22.0 # project wide min version -cache: cargo - -script: - - cargo build --verbose --features strict - - cargo test --verbose --features strict - -jobs: - include: - - stage: best practices - rust: stable - install: - - rustup component add rustfmt - - rustup component add clippy - script: - - rustfmt --check src/lib.rs - - cargo clippy -- -D warnings - - stage: fuzz - before_install: - - sudo apt-get -qq update - - sudo apt-get install -y binutils-dev libunwind8-dev - rust: stable - script: cd fuzz && cargo update && cargo test --verbose && ./travis-fuzz.sh