91 lines
2.3 KiB
YAML

name: CI
on:
pull_request:
push:
branches:
- master
env:
RUSTFLAGS: "-Dwarnings"
RUSTDOCFLAGS: "-Dwarnings"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.57.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v3
- uses: RustCrypto/actions/cargo-cache@master
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- run: cargo build --no-default-features --target ${{ matrix.target }}
test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.57.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3
- uses: RustCrypto/actions/cargo-cache@master
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack test --release --feature-powerset --exclude-features nightly,getrandom,serde
- run: cargo test --release --features getrandom
- run: cargo test --release --features serde
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: RustCrypto/actions/cargo-cache@master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- run: cargo doc --all-features
minimal-versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: RustCrypto/actions/cargo-cache@master
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: minimal
- run: cargo update -Z minimal-versions
- run: cargo test --release --features getrandom,serde,pkcs5,expose-internals
nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: RustCrypto/actions/cargo-cache@master
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- run: cargo test --release --features nightly