Skip to content

Commit

Permalink
[ci][kani] Use kani-github-action (#472)
Browse files Browse the repository at this point in the history
* Update ci.yml

* Update ci.yml

* Update ci.yml

---------

Co-authored-by: Joshua Liebow-Feeser <joshlf@users.noreply.github.com>
  • Loading branch information
Agnik7 and joshlf authored Oct 12, 2023
1 parent 10eb7f9 commit e87fa92
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e87fa92

Please sign in to comment.