diff options
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r-- | .github/workflows/ci.yml | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..651e75f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,89 @@ +on: push + +name: Continuous integration + +jobs: + library: + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + - beta + - nightly + - 1.37.0 # MSRV + + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + components: rustfmt, clippy + + - uses: actions-rs/cargo@v1 + with: + command: build + + - uses: actions-rs/cargo@v1 + with: + command: test + + - uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features + + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + if: ${{ matrix.rust == 'stable' }} + + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-features -- -D warnings + if: ${{ matrix.rust == 'stable' }} + + no-std: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: thumbv6m-none-eabi + override: true + + - uses: actions-rs/cargo@v1 + with: + command: build + args: --no-default-features --target thumbv6m-none-eabi --lib + + compatibility-tests: + runs-on: ubuntu-latest + strategy: + matrix: + test: + - digest_0_8 + - digest_0_9 + + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - uses: actions-rs/cargo@v1 + with: + command: test + args: --manifest-path "compatibility-tests/${{ matrix.test }}/Cargo.toml" |