Skip to content
Merged
Show file tree
Hide file tree
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.
Aug 26, 2022
9d907e0
Adjusted script: no input, clear path.
Aug 26, 2022
6511a28
Merge branch 'main' into 1312-gh-action
Aug 26, 2022
3d5b2af
Documented CI integration.
Aug 26, 2022
c06a2aa
Merge branch 'main' of github.com:model-checking/kani into 1312-gh-ac…
Aug 26, 2022
9850493
Merge branch 'main' into 1312-gh-action
Aug 26, 2022
c5a50dc
Forgot to commit ci docs.
Aug 26, 2022
3e624a8
Added user configuration doc lost in recovery.
Aug 26, 2022
dfb2f75
Removed repeated paragraph.
Aug 26, 2022
dfbfd57
Merge branch 'main' into 1312-gh-action
Aug 29, 2022
56f8033
Merge branch 'main' of github.com:model-checking/kani into 1312-gh-ac…
Aug 29, 2022
6a805ec
Added image version and release check for that image version.
Aug 29, 2022
585dfee
Merge branch 'main' into 1312-gh-action
Aug 31, 2022
cb8279c
fixed capitalization.
Sep 1, 2022
1fbbc70
fixed capitalization.
Sep 1, 2022
989bd9e
fixed capitalization.
Sep 1, 2022
7c27168
Merge branch 'main' into 1312-gh-action
Sep 1, 2022
ad37719
Adjusted wording.
Sep 1, 2022
66a6487
Added command input for action, and associated docs.
Sep 2, 2022
d8bf4b7
Added action and image check after docker image push.
Sep 2, 2022
adf0aad
Adjusted env varaibles.
Sep 2, 2022
ead48f0
Merge branch 'main' into 1312-gh-action
Sep 6, 2022
940c435
Changed wording in README.
Sep 6, 2022
cb8ec7a
Made string checks more precise.
Sep 6, 2022
4fd161d
Increment version.
Sep 6, 2022
4f44d24
Merge branch 'main' into 1312-gh-action
Sep 6, 2022
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/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ jobs:
echo "Git tag ${{env.TAG_VERSION}} did not match crate version ${{env.CRATE_VERSION}}"
exit 1
fi
# Check the action script's tag.
if ! grep "image: docker://ghcr.io/model-checking/kani.*:${{ env.TAG_VERSION }}" action.yml; then
echo "Git tag ${{env.TAG_VERSION}} did not match version in action.yml"
exit 1;
fi

- name: Create release
id: create_release
Expand Down
19 changes: 19 additions & 0 deletions action.yml
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'
Comment thread
YoshikiTakashima marked this conversation as resolved.
Outdated
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'

1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [Getting started](./getting-started.md)
- [Installation](./install-guide.md)
- [Building from source](./build-from-source.md)
- [GitHub CI Action](./install-github-ci.md)
Comment thread
YoshikiTakashima marked this conversation as resolved.
- [Using Kani](./usage.md)
- [Verification results](./verification-results.md)
- [Debugging verification failures](./debugging-verification-failures.md)
Expand Down
37 changes: 37 additions & 0 deletions docs/src/install-github-ci.md
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.
Comment thread
YoshikiTakashima marked this conversation as resolved.
Outdated

## Using Kani in Your GitHub Workflow.
Comment thread
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
Comment thread
YoshikiTakashima marked this conversation as resolved.
Outdated

The github action itself does not take any flags that `cargo kani`
Comment thread
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.
4 changes: 3 additions & 1 deletion docs/src/install-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Kani offers an easy installation option on two platforms:
* `x86_64-unknown-linux-gnu` (Most Linux distributions)
* `x86_64-apple-darwin` (Intel Mac OS)

Other platforms are either not yet supported or require instead that you [build from source](build-from-source.md).
Other platforms are either not yet supported or require instead that
you [build from source](build-from-source.md). To use Kani in in your
Comment thread
YoshikiTakashima marked this conversation as resolved.
Outdated
GitHub CI workflows, see [GitHub CI Action](./install-github-ci.md).
Comment thread
YoshikiTakashima marked this conversation as resolved.

## Dependencies

Expand Down