23
23
build_bundle_macos :
24
24
name : BuildBundle-MacOs
25
25
runs-on : macos-13
26
- permissions :
27
- contents : write
28
26
outputs :
29
27
version : ${{ steps.bundle.outputs.version }}
30
28
bundle : ${{ steps.bundle.outputs.bundle }}
49
47
build_bundle_macos_aarch64 :
50
48
name : BuildBundle-MacOs-ARM
51
49
runs-on : macos-14
52
- permissions :
53
- contents : write
54
50
outputs :
55
51
version : ${{ steps.bundle.outputs.version }}
56
52
bundle : ${{ steps.bundle.outputs.bundle }}
@@ -76,55 +72,18 @@ jobs:
76
72
name : BuildBundle-Linux
77
73
runs-on : ubuntu-20.04
78
74
outputs :
79
- # The bundle version (latest or the version to be released)
80
75
version : ${{ steps.bundle.outputs.version }}
81
76
bundle : ${{ steps.bundle.outputs.bundle }}
82
77
package : ${{ steps.bundle.outputs.package }}
83
78
crate_version : ${{ steps.bundle.outputs.crate_version }}
84
- container :
85
- # Build using ubuntu 18 due to compatibility issues with older OS.
86
- image : ubuntu:18.04
87
- volumes :
88
- - /usr/local:/mnt/host-local
89
79
steps :
90
-
91
- - name : Free up docker disk space
92
- run : |
93
- # inspired by https://github.com/easimon/maximize-build-space/blob/master/action.yml
94
- df -h
95
- rm -r /mnt/host-local/lib/android /mnt/host-local/.ghcup
96
- df -h
97
-
98
- # This is required before checkout because the container does not
99
- # have Git installed, so cannot run checkout action.
100
- # The checkout action requires Git >=2.18 and python 3.7, so use the Git maintainers' PPA.
101
- # and the "deadsnakes" PPA, as the default version of python on ubuntu 22.04 is Python 3.10
102
- - name : Install system dependencies
103
- run : |
104
- apt-get update
105
- apt-get install -y software-properties-common apt-utils
106
- add-apt-repository ppa:git-core/ppa
107
- add-apt-repository ppa:deadsnakes/ppa
108
- add-apt-repository ppa:ubuntu-toolchain-r/test
109
- apt-get update
110
- apt-get install -y \
111
- build-essential bash-completion curl lsb-release sudo g++-9 gcc-9 flex \
112
- bison make patch git python3.7 python3.7-dev python3.7-distutils
113
- update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 110 \
114
- --slave /usr/bin/g++ g++ /usr/bin/g++-9
115
- ln -sf cpp-9 /usr/bin/cpp
116
- update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
117
- curl -s https://bootstrap.pypa.io/pip/3.7/get-pip.py -o get-pip.py
118
- python3 get-pip.py --force-reinstall
119
- rm get-pip.py
120
-
121
- - name : Checkout Kani
122
- uses : actions/checkout@v3
80
+ - name : Checkout code
81
+ uses : actions/checkout@v4
123
82
124
83
- name : Setup Kani Dependencies
125
84
uses : ./.github/actions/setup
126
85
with :
127
- os : ubuntu-18 .04
86
+ os : ubuntu-20 .04
128
87
129
88
- name : Build bundle
130
89
id : bundle
@@ -279,58 +238,11 @@ jobs:
279
238
popd
280
239
done
281
240
282
- # This job will run tests for platforms that don't have a respective GitHub worker.
283
- # For now, we only test for Ubuntu-18.04 so we don't bother using matrix to configure the platform.
284
- test_alt_platform :
285
- name : TestAlternativePlatforms
286
- needs : [build_bundle_linux]
287
- runs-on : ubuntu-22.04
288
- env :
289
- PKG : ${{ needs.build_bundle_linux.outputs.package }}
290
- BUNDLE : ${{ needs.build_bundle_linux.outputs.bundle }}
291
- VERSION : ${{ needs.build_bundle_linux.outputs.crate_version }}
292
- KANI_SRC : ./kani_src
293
- steps :
294
- - name : Checkout Kani
295
- uses : actions/checkout@v4
296
- with :
297
- path : ${{ env.KANI_SRC }}
298
-
299
- - name : Download bundle
300
- uses : actions/download-artifact@v3
301
- with :
302
- name : ${{ env.BUNDLE }}
303
-
304
- - name : Download kani-verifier crate
305
- uses : actions/download-artifact@v3
306
- with :
307
- name : ${{ env.PKG }}
308
-
309
- - name : Build container test
310
- run : |
311
- docker build -t kani-18-04 -f ${{ env.KANI_SRC }}/scripts/ci/Dockerfile.bundle-test-ubuntu-18-04 .
312
-
313
- - name : Run installed tests
314
- run : |
315
- for dir in simple-lib build-rs-works simple-kissat; do
316
- >&2 echo "Running test $dir"
317
- docker run -v /var/run/docker.sock:/var/run/docker.sock \
318
- -w /tmp/kani/tests/cargo-kani/$dir kani-18-04 cargo kani
319
- done
320
-
321
- # While the above test OS issues, now try testing with nightly as
322
- # default:
323
- docker run -v /var/run/docker.sock:/var/run/docker.sock \
324
- -w /tmp/kani/tests/cargo-kani/simple-lib kani-18-04 \
325
- bash -c "rustup default nightly && cargo kani"
326
-
327
241
kani_release :
328
242
if : ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/kani-') }}
329
243
name : Release
330
244
runs-on : ubuntu-20.04
331
- needs : [build_bundle_macos, build_bundle_macos_aarch64, build_bundle_linux, test_bundle, test_alt_platform]
332
- permissions :
333
- contents : write
245
+ needs : [build_bundle_macos, build_bundle_macos_aarch64, build_bundle_linux, test_bundle]
334
246
outputs :
335
247
version : ${{ steps.versioning.outputs.version }}
336
248
upload_url : ${{ steps.create_release.outputs.upload_url }}
0 commit comments