forked from model-checking/kani
-
Notifications
You must be signed in to change notification settings - Fork 0
157 lines (132 loc) · 4.83 KB
/
kani.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Copyright Kani Contributors
# SPDX-License-Identifier: Apache-2.0 OR MIT
name: Kani CI
on:
pull_request:
push:
# Not just any push, as that includes tags.
# We don't want to re-trigger this workflow when tagging an existing commit.
branches:
- '**'
env:
RUST_BACKTRACE: 1
jobs:
regression:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, ubuntu-18.04, ubuntu-20.04]
steps:
- name: Checkout Kani
uses: actions/checkout@v2
- name: Setup Kani Dependencies
uses: ./.github/actions/setup
with:
os: ${{ matrix.os }}
- name: Build Kani
run: cargo build
- name: Execute Kani regression
run: ./scripts/kani-regression.sh
perf:
runs-on: ubuntu-20.04
steps:
- name: Checkout Kani
uses: actions/checkout@v2
- name: Setup Kani Dependencies
uses: ./.github/actions/setup
with:
os: ubuntu-20.04
- name: Build Kani
run: cargo build
- name: Execute Kani performance tests
run: ./scripts/kani-perf.sh
bookrunner:
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: Checkout Kani
uses: actions/checkout@v2
- name: Setup Kani Dependencies
uses: ./.github/actions/setup
with:
os: ubuntu-20.04
- name: Build Kani
run: cargo build
- name: Install book runner dependencies
run: ./scripts/setup/install_bookrunner_deps.sh
- name: Generate book runner report
run: cargo run -p bookrunner
env:
DOC_RUST_LANG_ORG_CHANNEL: nightly
- name: Print book runner text results
run: cat build/output/latest/html/bookrunner.txt
- name: Detect unpexpected book runner failures
run: ./scripts/ci/detect_bookrunner_failures.sh build/output/latest/html/bookrunner.txt
# On one OS only, build the documentation, too.
- name: Build Documentation
run: ./scripts/build-docs.sh
# When we're pushed to main branch, only then actually publish the docs.
- name: Publish Documentation
if: ${{ github.event_name == 'push' && startsWith('refs/heads/main', github.ref) }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/book/
single-commit: true
releasebundle:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, ubuntu-18.04]
include:
- os: macos-11
artifact: kani-latest-x86_64-apple-darwin.tar.gz
- os: ubuntu-18.04
artifact: kani-latest-x86_64-unknown-linux-gnu.tar.gz
steps:
- name: Checkout Kani
uses: actions/checkout@v2
- name: Setup Kani Dependencies
uses: ./.github/actions/setup
with:
os: ${{ matrix.os }}
- name: Build release bundle
run: |
cargo run -p make-kani-release -- latest
cargo package -p kani-verifier
- name: Build container test
if: ${{ matrix.os == 'ubuntu-18.04' }}
run: |
docker build -t kani-20-04 -f scripts/ci/Dockerfile.bundle-test-ubuntu-20-04 .
docker build -t kani-18-04 -f scripts/ci/Dockerfile.bundle-test-ubuntu-18-04 .
# this one does its tests automatically, for reasons documented in the file:
docker build -t kani-nixos -f scripts/ci/Dockerfile.bundle-test-nixos .
- name: Run installed tests
if: ${{ matrix.os == 'ubuntu-18.04' }}
run: |
for tag in kani-20-04 kani-18-04; do
docker run $tag cargo kani --version
docker run -w /tmp/kani/tests/cargo-kani/simple-lib $tag cargo kani
docker run -w /tmp/kani/tests/cargo-kani/simple-visualize $tag cargo kani
docker run -w /tmp/kani/tests/cargo-kani/build-rs-works $tag cargo kani
docker run $tag cargo-kani setup --use-local-bundle ./${{ matrix.artifact }}
done
# We can't run macos in a container, so we can only test locally.
# Hopefully any dependency issues won't be unique to macos.
- name: Local install test
if: ${{ matrix.os == 'macos-11' }}
run: |
cargo install --path ./target/package/kani-verifier-*[^e]
cargo-kani setup --use-local-bundle ./${{ matrix.artifact }}
(cd tests/cargo-kani/simple-lib && cargo kani)
(cd tests/cargo-kani/simple-visualize && cargo kani)
(cd tests/cargo-kani/build-rs-works && cargo kani)
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
if-no-files-found: error
# Aggressively short retention: we don't really need these
retention-days: 3