From fbb77245ef7405ddda665cad34d65ae3f6ea7310 Mon Sep 17 00:00:00 2001 From: Nick Spinale Date: Wed, 5 Jun 2024 10:25:03 +0000 Subject: [PATCH] ci: Use Kani with Nix Signed-off-by: Nick Spinale --- .github/workflows/push.yaml | 9 ++++++++- Makefile | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 8b5621396..9cc6a5b45 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -127,9 +127,16 @@ jobs: name: Check Kani proofs runs-on: ubuntu-latest steps: + - uses: cachix/install-nix-action@v26 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v14 + with: + name: coliasgroup + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - uses: actions/checkout@v4 - name: Check Kani proofs - run: make -C hacking/kani/docker check + run: make check-kani-proofs deploy-docs: name: Deploy docs if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) diff --git a/Makefile b/Makefile index a682dd516..3144d1129 100644 --- a/Makefile +++ b/Makefile @@ -122,6 +122,10 @@ witness-fast-tests: $(nix_build) -A witnessFastTests --no-out-link $(try_restore_terminal) +.PHONY: check-kani-proofs +check-kani-proofs: + $(run_in_nix_shell) "cargo kani -p sel4-bitfield-ops" + .PHONY: everything-except-non-incremental everything-except-non-incremental: $(nix_build) -A everythingExceptNonIncremental --no-out-link