-
Notifications
You must be signed in to change notification settings - Fork 145
Implement GH action script. #1589
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
Merged
YoshikiTakashima
merged 26 commits into
model-checking:main
from
YoshikiTakashima:1312-gh-action
Sep 6, 2022
Merged
Changes from 13 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
110480c
Added GH action script for kani.
9d907e0
Adjusted script: no input, clear path.
6511a28
Merge branch 'main' into 1312-gh-action
3d5b2af
Documented CI integration.
c06a2aa
Merge branch 'main' of github.com:model-checking/kani into 1312-gh-ac…
9850493
Merge branch 'main' into 1312-gh-action
c5a50dc
Forgot to commit ci docs.
3e624a8
Added user configuration doc lost in recovery.
dfb2f75
Removed repeated paragraph.
dfbfd57
Merge branch 'main' into 1312-gh-action
56f8033
Merge branch 'main' of github.com:model-checking/kani into 1312-gh-ac…
6a805ec
Added image version and release check for that image version.
585dfee
Merge branch 'main' into 1312-gh-action
cb8279c
fixed capitalization.
1fbbc70
fixed capitalization.
989bd9e
fixed capitalization.
7c27168
Merge branch 'main' into 1312-gh-action
ad37719
Adjusted wording.
66a6487
Added command input for action, and associated docs.
d8bf4b7
Added action and image check after docker image push.
adf0aad
Adjusted env varaibles.
ead48f0
Merge branch 'main' into 1312-gh-action
940c435
Changed wording in README.
cb8ec7a
Made string checks more precise.
4fd161d
Increment version.
4f44d24
Merge branch 'main' into 1312-gh-action
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Copyright Kani Contributors | ||
| # SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
|
||
| name: 'Kani Model Checker' | ||
| description: 'Run the Kani Model Checker on a Cargo Crate' | ||
| author: 'Kani Contributors' | ||
|
|
||
| branding: | ||
| icon: 'cloud' | ||
| color: 'orange' | ||
|
|
||
| runs: | ||
| using: 'docker' | ||
| image: docker://ghcr.io/model-checking/kani-ubuntu-20.04:0.9.0 | ||
| args: | ||
| - bash | ||
| - '-c' | ||
| - 'PATH="/root/.cargo/bin:${PATH}"; cargo kani' | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # GitHub CI Action | ||
|
|
||
| Kani offers a GitHub action for running Kani in the CI. As of now, | ||
| only Ubuntu 20.04 wtih `x86_64-unknown-linux-gnu` is supported for | ||
| Kani in the CI. | ||
|
YoshikiTakashima marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Using Kani in Your GitHub Workflow. | ||
|
YoshikiTakashima marked this conversation as resolved.
Outdated
|
||
| Our GitHub CI Action is available in the GitHub Marketspace with the | ||
| name `model-checking/kani` | ||
|
|
||
| The following workflow snippet will checkout your repository and run | ||
| `cargo kani` on it whenever a push or pull request occurs. Replace | ||
| `VER.SION` with the version of Kani you want to run with. | ||
|
|
||
| ```yaml | ||
| name: Kani CI | ||
| on: | ||
| pull_request: | ||
| push: | ||
| jobs: | ||
| run-kani: | ||
| runs-on: ubuntu-20.04 | ||
| steps: | ||
| - name: 'Checkout your code.' | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: 'Run Kani on your code.' | ||
| uses: model-checking/kani@vVER.SION | ||
| ``` | ||
|
|
||
|
|
||
| ## Configuring Kani with Flags | ||
|
YoshikiTakashima marked this conversation as resolved.
Outdated
|
||
|
|
||
| The github action itself does not take any flags that `cargo kani` | ||
|
YoshikiTakashima marked this conversation as resolved.
Outdated
|
||
| would take. Instead, they should be configured in `Cargo.toml`. See | ||
| ["Configuration in Cargo.toml"](usage.md#configuration-in-cargotoml) | ||
| for details. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.