name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
name: nix flake check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: DeterminateSystems/nix-installer-action@v22
- uses: nix-community/cache-nix-action@v7
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock', '**/Cargo.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
- run: nix flake check
miri:
name: miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: DeterminateSystems/nix-installer-action@v22
- uses: nix-community/cache-nix-action@v7
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock', '**/Cargo.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
- run: >
nix develop .#miri --command
env MIRIFLAGS="-Zmiri-strict-provenance -Zmiri-tree-borrows"
cargo miri test miri_
kani:
name: kani
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: model-checking/kani-github-action@v1
release-check:
name: release check
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v5
- uses: DeterminateSystems/nix-installer-action@v22
- uses: nix-community/cache-nix-action@v7
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock', '**/Cargo.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
- run: nix develop --command cargo publish --dry-run
coverage:
name: coverage
runs-on: ubuntu-latest
needs: check
steps:
- uses: actions/checkout@v5
- uses: DeterminateSystems/nix-installer-action@v22
- uses: nix-community/cache-nix-action@v7
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock', '**/Cargo.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
- name: cargo llvm-cov
run: nix develop --command cargo llvm-cov --all-features --lcov --output-path lcov.info
- uses: codecov/codecov-action@v5
continue-on-error: true
with:
files: lcov.info
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}