diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13a7d2c00d..543f9da33e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -241,27 +241,13 @@ jobs: if: matrix.crate == 'zerocopy' && matrix.features == '--all-features' && matrix.toolchain == 'nightly' kani: - runs-on: ubuntu-latest - name: Run tests under Kani - needs: generate_cache + runs-on: ubuntu-latest + name: 'Run tests under Kani' steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - name: Configure ZC_TOOLCHAIN environment variable - run: | - set -eo pipefail - echo "ZC_TOOLCHAIN=$(./cargo.sh --version nightly)" >> $GITHUB_ENV - - name: Install nigtly Rust toolchain (${{ env.ZC_TOOLCHAIN }}) - uses: dtolnay/rust-toolchain@00b49be78f40fba4e87296b2ead62868750bdd83 # stable + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: model-checking/kani-github-action@v1.0 with: - toolchain: ${{ env.ZC_TOOLCHAIN }} - - run: | - set -eo pipefail - cargo install --locked kani-verifier - cargo kani setup - RUSTFLAGS="$RUSTFLAGS $ZC_NIGHTLY_RUSTFLAGS" ./cargo.sh +nightly kani \ - --package zerocopy --all-features --output-format terse --randomize-layout \ - --memory-safety-checks --overflow-checks --undefined-function-checks \ - --unwinding-checks + args: "--package zerocopy --all-features --output-format=terse --randomize-layout --memory-safety-checks --overflow-checks --undefined-function-checks --unwinding-checks" check_fmt: runs-on: ubuntu-latest