Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple kani version from kani-github-action version #45

Merged
merged 32 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1fe9f74
Decouple `kani` version from `kani-github-action` version
jaisnan Sep 6, 2023
13ad53c
Remove leftover `echo`
jaisnan Sep 6, 2023
bff8a97
Merge 'main'
jaisnan Sep 7, 2023
34a34e9
add test for `kani-version` parameter
jaisnan Sep 7, 2023
83d31b0
Swap run order to let latest version of kani run on subsequent CI jobs
jaisnan Sep 7, 2023
f025fdf
Add parameters to readme
jaisnan Sep 15, 2023
da35c83
Add tests to check for invalid versions
jaisnan Sep 15, 2023
a89f30c
Verify version number of Kani installed
jaisnan Sep 15, 2023
fbe9753
Fix readme
jaisnan Sep 15, 2023
561ecd2
Update readme
jaisnan Sep 15, 2023
60aafda
Update invalid version
jaisnan Sep 15, 2023
e68809b
Fix test string
jaisnan Sep 15, 2023
91bd80d
Update message
jaisnan Sep 15, 2023
94b8a46
Fix variable name
jaisnan Sep 15, 2023
a3d3f07
Fix error message parsing
jaisnan Sep 15, 2023
72396bb
Check against stderr
jaisnan Sep 15, 2023
60d2021
Use ids
jaisnan Sep 15, 2023
a58b4d4
try with stdout
jaisnan Sep 15, 2023
40e2e0a
debug steps
jaisnan Sep 15, 2023
efd219b
Store output in github env
jaisnan Sep 15, 2023
205f9d3
Add output
jaisnan Sep 15, 2023
f785b2b
Add debug info
jaisnan Sep 15, 2023
400ff98
Add echo for output
jaisnan Sep 15, 2023
a759f7f
remove whitespace
jaisnan Sep 15, 2023
2e7e278
Remove broken test
jaisnan Sep 15, 2023
13f0f5f
Update with CI tests
jaisnan Sep 20, 2023
3e3a589
Update readme with examples
jaisnan Sep 21, 2023
b212289
Merge branch 'main' of https://github.com/model-checking/kani-github-…
jaisnan Sep 21, 2023
9232379
remove second run
jaisnan Sep 21, 2023
fab837c
Update readme
jaisnan Sep 21, 2023
f3955ff
Update readme
jaisnan Sep 26, 2023
68f536a
Update with proptest link
jaisnan Sep 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
# you must check out the repository
- name: Checkout
uses: actions/checkout@v3
- name: Run Kani with older version
jaisnan marked this conversation as resolved.
Show resolved Hide resolved
uses: ./ # Uses the action in the root directory
with:
working-directory: tests/cargo-kani/simple-lib
kani-version: 0.33.0
- name: Run Kani
uses: ./ # Uses the action in the root directory
with:
Expand Down
9 changes: 5 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ branding:
color: 'orange'

inputs:
kani-version:
description: 'Kani Version number'
required: false
default: 'latest'
command:
description: 'Command to run.'
required: false
Expand All @@ -34,11 +38,8 @@ runs:
uses: dtolnay/rust-toolchain@stable

- name: Install Kani
run: ${{ github.action_path }}/src/install-kani.sh ${{ inputs.kani-version }}
shell: bash
run: |
export KANI_VERSION="0.36.0";
cargo install --version $KANI_VERSION --locked kani-verifier;
cargo-kani setup;

- name: Install PropProof
if: ${{ inputs.enable-propproof == 'true' }}
Expand Down
20 changes: 20 additions & 0 deletions src/install-kani.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# Copyright Kani Contributors
# SPDX-License-Identifier: Apache-2.0 OR MIT

# If version is latest, install directly from cargo
if [ "$1" == "latest" ]; then
cargo install --locked kani-verifier;
else
VERSION=$1
cargo install --version $VERSION --locked kani-verifier;
fi

# Check exit status for error handling
if [ $? -ne O ]; then
echo "Error installing Kani. Please check if the provided version is correct"
jaisnan marked this conversation as resolved.
Show resolved Hide resolved
exit 1
fi

# Setup kani in ci
cargo-kani setup;
Loading