Skip to content

CI: test with 1.66 as MSRV #146

CI: test with 1.66 as MSRV

CI: test with 1.66 as MSRV #146

Workflow file for this run

name: Rust
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
test-shared:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- "1.66"
name: Test w. shared library (${{matrix.toolchain}} toolchain)
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo add-apt-repository -u -y ppa:s-ramacher/picnic
sudo apt install libpicnic-dev pkg-config
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.toolchain}}
- uses: Swatinem/rust-cache@v2
- name: Test with default features
run: cargo test --workspace
- name: Test with all features
run: cargo test --all-features --workspace
test-static:
needs: [test-shared, clippy, fmt]
runs-on: ${{ matrix.os }}
strategy:
matrix:
toolchain:
- stable
- "1.66"
os:
- ubuntu-latest
- windows-latest
- macos-latest
name: Test w. static-fallback (${{matrix.toolchain}} toolchain, ${{ matrix.os }})
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.toolchain}}
- uses: Swatinem/rust-cache@v2
- name: Test with default features
run: cargo test --workspace
- name: Test with all features
run: cargo test --all-features --workspace
build-cross:
needs: test-static
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- aarch64-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
- i686-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
- s390x-unknown-linux-gnu
name: Cross test for ${{matrix.target}}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{matrix.target}}
- uses: Swatinem/rust-cache@v2
- name: Install cross
run: cargo install cross
- name: Test with default features
run: cross test --workspace --target ${{matrix.target}}
- name: Test with all features
run: cross test --all-features --workspace --target ${{matrix.target}}
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo add-apt-repository -u -y ppa:s-ramacher/picnic
sudo apt install libpicnic-dev pkg-config
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo add-apt-repository -u -y ppa:s-ramacher/picnic
sudo apt install libpicnic-dev pkg-config
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all --all-features -- -D warnings