diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 00000000..9c8931f5 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,85 @@ +on: [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 diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 00000000..58490070 --- /dev/null +++ b/clippy.toml @@ -0,0 +1 @@ +msrv = "1.29.0"