1717 runs-on : ${{ matrix.os }}
1818 strategy :
1919 matrix :
20- os : [macos-11, ubuntu-18.04, ubuntu- 20.04, ubuntu-22.04]
20+ os : [macos-11, ubuntu-20.04, ubuntu-22.04]
2121 steps :
2222 - name : Checkout Kani
2323 uses : actions/checkout@v3
@@ -134,16 +134,14 @@ jobs:
134134 folder : docs/book/
135135 single-commit : true
136136
137- releasebundle :
137+ releasebundle-macos :
138138 runs-on : ${{ matrix.os }}
139139 strategy :
140140 matrix :
141- os : [macos-11, ubuntu-18.04 ]
141+ os : [macos-11]
142142 include :
143143 - os : macos-11
144144 artifact : kani-latest-x86_64-apple-darwin.tar.gz
145- - os : ubuntu-18.04
146- artifact : kani-latest-x86_64-unknown-linux-gnu.tar.gz
147145 steps :
148146 - name : Checkout Kani
149147 uses : actions/checkout@v3
@@ -158,29 +156,6 @@ jobs:
158156 cargo bundle -- latest
159157 cargo package -p kani-verifier
160158
161- - name : Build container test
162- if : ${{ matrix.os == 'ubuntu-18.04' }}
163- run : |
164- docker build -t kani-20-04 -f scripts/ci/Dockerfile.bundle-test-ubuntu-20-04 .
165- docker build -t kani-20-04-alt -f scripts/ci/Dockerfile.bundle-test-ubuntu-20-04-alt .
166- docker build -t kani-18-04 -f scripts/ci/Dockerfile.bundle-test-ubuntu-18-04 .
167- # this one does its tests automatically, for reasons documented in the file:
168- docker build -t kani-nixos -f scripts/ci/Dockerfile.bundle-test-nixos .
169-
170- - name : Run installed tests
171- if : ${{ matrix.os == 'ubuntu-18.04' }}
172- run : |
173- for tag in kani-20-04 kani-20-04-alt kani-18-04; do
174- docker run $tag cargo kani --version
175- docker run -w /tmp/kani/tests/cargo-kani/simple-lib $tag cargo kani
176- docker run -w /tmp/kani/tests/cargo-kani/simple-visualize $tag cargo kani
177- docker run -w /tmp/kani/tests/cargo-kani/build-rs-works $tag cargo kani
178- docker run -w /tmp/kani/tests/cargo-kani/simple-kissat $tag cargo kani
179- docker run $tag cargo-kani setup --use-local-bundle ./${{ matrix.artifact }}
180- done
181- # While the above test OS issues, now try testing with nightly as default:
182- docker run -w /tmp/kani/tests/cargo-kani/simple-lib kani-20-04 bash -c "rustup default nightly && cargo kani"
183-
184159 # We can't run macos in a container, so we can only test locally.
185160 # Hopefully any dependency issues won't be unique to macos.
186161 - name : Local install test
@@ -200,3 +175,73 @@ jobs:
200175 if-no-files-found : error
201176 # Aggressively short retention: we don't really need these
202177 retention-days : 3
178+
179+ releasebundle-ubuntu :
180+ runs-on : ubuntu-20.04
181+ container :
182+ image : ubuntu:18.04
183+ steps :
184+ # This is required before checkout because the container does not
185+ # have Git installed, so cannot run checkout action. The checkout
186+ # action requires Git >=2.18, so use the Git maintainers' PPA.
187+ - name : Install system dependencies
188+ run : |
189+ apt-get update
190+ apt-get install -y software-properties-common apt-utils
191+ add-apt-repository ppa:git-core/ppa
192+ apt-get update
193+ apt-get install -y \
194+ build-essential bash-completion curl lsb-release sudo g++ gcc flex \
195+ bison make patch git
196+ curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL \
197+ https://get.docker.com -o /tmp/install-docker.sh
198+ bash /tmp/install-docker.sh
199+
200+ - name : Checkout Kani
201+ uses : actions/checkout@v3
202+
203+ - name : Setup Kani Dependencies
204+ uses : ./.github/actions/setup
205+ with :
206+ os : ubuntu-18.04
207+
208+ - name : Build release bundle
209+ run : |
210+ PATH=/github/home/.cargo/bin:$PATH cargo bundle -- latest
211+ PATH=/github/home/.cargo/bin:$PATH cargo package -p kani-verifier
212+
213+ # -v flag: Use docker socket from host as we're running docker-in-docker
214+ - name : Build container test
215+ run : |
216+ for tag in 20-04 20-04-alt 18-04; do
217+ >&2 echo "Building test container for ${tag}"
218+ docker build -t kani-$tag -f scripts/ci/Dockerfile.bundle-test-ubuntu-$tag .
219+ done
220+
221+ - name : Run installed tests
222+ run : |
223+ for tag in kani-20-04 kani-20-04-alt kani-18-04; do
224+ for dir in simple-lib simple-visualize build-rs-works simple-kissat; do
225+ >&2 echo "Tag $tag: running test $dir"
226+ docker run -v /var/run/docker.sock:/var/run/docker.sock \
227+ -w /tmp/kani/tests/cargo-kani/$dir $tag cargo kani
228+ done
229+ docker run -v /var/run/docker.sock:/var/run/docker.sock \
230+ $tag cargo-kani setup \
231+ --use-local-bundle ./kani-latest-x86_64-unknown-linux-gnu.tar.gz
232+ done
233+
234+ # While the above test OS issues, now try testing with nightly as
235+ # default:
236+ docker run -v /var/run/docker.sock:/var/run/docker.sock \
237+ -w /tmp/kani/tests/cargo-kani/simple-lib kani-20-04 \
238+ bash -c "rustup default nightly && cargo kani"
239+
240+ - name : Upload artifact
241+ uses : actions/upload-artifact@v3
242+ with :
243+ name : kani-latest-x86_64-unknown-linux-gnu.tar.gz
244+ path : kani-latest-x86_64-unknown-linux-gnu.tar.gz
245+ if-no-files-found : error
246+ # Aggressively short retention: we don't really need these
247+ retention-days : 3
0 commit comments