diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6712df2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,70 @@ +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +name: Continuous integration + +env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - rust: 1.42.0 # MSRV + - rust: stable + features: unstable quickcheck + test_all: --all + - rust: beta + test_all: --all + - rust: nightly + features: unstable quickcheck + test_all: --all + bench: true + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + - name: Build + run: | + cargo build --verbose --no-default-features + cargo build --verbose --features "${{ matrix.features }}" + - name: Tests + run: | + cargo test --verbose --no-default-features + cargo test ${{ matrix.test_all }} --verbose --features "${{ matrix.features }}" + - name: Build benchmarks + if: ${{ matrix.bench }} + run: | + cargo bench --verbose --no-run + cargo bench --verbose --no-run --all-features + + rustfmt: + runs-on: ubuntu-latest + continue-on-error: true + strategy: + matrix: + include: + - rust: stable + rustfmt: rustfmt + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + components: ${{ matrix.rustfmt }} + override: true + - name: Rustfmt + if: matrix.rustfmt + run: cargo fmt -- --check diff --git a/travis.sh b/travis.sh deleted file mode 100755 index ebb972c..0000000 --- a/travis.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# 10*1024*1024 = 10 MB -# export RUST_MIN_STACK=10485760 -cargo build --verbose -cargo test --verbose -cargo bench --verbose -