Skip to content

Commit d2ae8af

Browse files
authored
Fix nightly CBMC workflow (rust-lang#2128)
1 parent 0e88879 commit d2ae8af

File tree

2 files changed

+32
-17
lines changed

2 files changed

+32
-17
lines changed

.github/actions/setup/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ inputs:
55
os:
66
description: In which Operating System is this running
77
required: true
8+
install_cbmc:
9+
description: Whether to install CBMC
10+
required: false
11+
default: 'true'
812
runs:
913
using: composite
1014
steps:
@@ -15,6 +19,7 @@ runs:
1519
- name: Install CBMC
1620
run: ./scripts/setup/${{ inputs.os }}/install_cbmc.sh
1721
shell: bash
22+
if: ${{format('{0}', inputs.install_cbmc) != 'false'}}
1823

1924
- name: Install cbmc-viewer
2025
run: ./scripts/setup/${{ inputs.os }}/install_viewer.sh

.github/workflows/cbmc-latest.yml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,40 @@ jobs:
2121
matrix:
2222
os: [macos-11, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
2323
steps:
24+
- name: Checkout CBMC under "cbmc"
25+
uses: actions/checkout@v3
26+
with:
27+
repository: diffblue/cbmc
28+
path: cbmc
29+
30+
- name: Build CBMC
31+
run: |
32+
cd cbmc
33+
cmake -S . -Bbuild -DWITH_JBMC=OFF
34+
cmake --build build -- -j 4
35+
sudo cmake --build build --target install
36+
# Cleanup cbmc directory
37+
cd ..
38+
rm -rf cbmc
39+
2440
- name: Checkout Kani
2541
uses: actions/checkout@v3
2642

2743
- name: Setup Kani Dependencies
2844
uses: ./.github/actions/setup
2945
with:
3046
os: ${{ matrix.os }}
47+
install_cbmc: 'false'
3148

3249
- name: Build Kani
3350
run: cargo build-dev
3451

52+
- name: Execute Kani regressions
53+
run: ./scripts/kani-regression.sh
54+
55+
perf:
56+
runs-on: ubuntu-20.04
57+
steps:
3558
- name: Checkout CBMC under "cbmc"
3659
uses: actions/checkout@v3
3760
with:
@@ -44,34 +67,21 @@ jobs:
4467
cmake -S . -Bbuild -DWITH_JBMC=OFF
4568
cmake --build build -- -j 4
4669
sudo cmake --build build --target install
47-
- name: Execute Kani regressions
48-
run: ./scripts/kani-regression.sh
70+
# Cleanup cbmc directory
71+
cd ..
72+
rm -rf cbmc
4973
50-
perf:
51-
runs-on: ubuntu-20.04
52-
steps:
5374
- name: Checkout Kani
5475
uses: actions/checkout@v3
5576

5677
- name: Setup Kani Dependencies
5778
uses: ./.github/actions/setup
5879
with:
5980
os: ubuntu-20.04
81+
install_cbmc: 'false'
6082

6183
- name: Build Kani using release mode
6284
run: cargo build-dev -- --release
6385

64-
- name: Checkout CBMC under "cbmc"
65-
uses: actions/checkout@v3
66-
with:
67-
repository: diffblue/cbmc
68-
path: cbmc
69-
70-
- name: Build CBMC
71-
run: |
72-
cd cbmc
73-
cmake -S . -Bbuild -DWITH_JBMC=OFF
74-
cmake --build build -- -j 4
75-
sudo cmake --build build --target install
7686
- name: Execute Kani performance tests
7787
run: ./scripts/kani-perf.sh

0 commit comments

Comments
 (0)