Skip to content

Commit de3e7cb

Browse files
committed
CI: Use Ubuntu 22.04, drop 18.04
GitHub Actions has deprecated its Ubuntu 18.04 runners, and they will be removed by December 1, 2022. Moreover, GitHub Actions now offers Ubuntu 22.04 runners. It seems like a good time to upgrade our CI accordingly. Somewhat annoyingly, the `haskell` Docker images that we use in our Dockerfiles use such an old version of Debian that their version of `glibc` is incompatible with any of the `what4-solvers` built for Ubuntu 20.04 or 22.04. As a result, I switched them from the `haskell` Docker image to the `ubuntu` one. This required some minor tweaks to how dependencies are installed, but nothing too serious. Fixes #1741. By upgrading the version of the solvers being used, this also fixes #1744.
1 parent 1ea10d0 commit de3e7cb

File tree

6 files changed

+63
-26
lines changed

6 files changed

+63
-26
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.DS_Store
44
.cabal-sandbox
55
cabal.sandbox.config
6+
cabal.project.local
67
.ghc.environment.x86_64-darwin-*
78
s2nTests
89

.github/workflows/ci.yml

+16-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Overall configuration notes:
22
# - Artifact uploads for binaries are from GHC 8.10.7
3-
# - Builds for Ubuntu happen on 18.04 (would like to include 20.04, in addition)
3+
# - Builds for Ubuntu happen on 22.04. We also include a single configuration
4+
# for 20.04 to increase our Linux coverage.
45
# - Docker builds happen nightly, on manual invocation, and on release branch commits
56
# Please update this comment as those details change.
67

@@ -23,13 +24,13 @@ env:
2324
# ./saw-remote-api/Dockerfile
2425
# ./s2nTests/scripts/blst-entrypoint.sh
2526
# ./s2nTests/docker/saw.dockerfile
26-
SOLVER_PKG_VERSION: "snapshot-20220721"
27+
SOLVER_PKG_VERSION: "snapshot-20220902"
2728

2829
OCAML_VERSION: 4.09.x
2930

3031
jobs:
3132
config:
32-
runs-on: ubuntu-latest
33+
runs-on: ubuntu-22.04
3334
outputs:
3435
name: ${{ steps.config.outputs.name }}
3536
version: ${{ steps.config.outputs.version }}
@@ -66,8 +67,11 @@ jobs:
6667
strategy:
6768
fail-fast: false
6869
matrix:
69-
os: [ubuntu-18.04, macos-12, windows-latest]
70+
os: [ubuntu-22.04, macos-12, windows-latest]
7071
ghc: ["8.8.4", "8.10.7", "9.0.2"]
72+
include:
73+
- os: ubuntu-20.04
74+
ghc: "8.10.7"
7175
exclude:
7276
# Exclude 8.8 on macOS 12 due to
7377
# https://gitlab.haskell.org/ghc/ghc/-/issues/18446
@@ -209,7 +213,7 @@ jobs:
209213
strategy:
210214
fail-fast: false
211215
matrix:
212-
os: [ubuntu-latest, macos-12]
216+
os: [ubuntu-22.04, macos-12]
213217
runs-on: ${{ matrix.os }}
214218
steps:
215219
- uses: actions/checkout@v2
@@ -243,7 +247,7 @@ jobs:
243247
strategy:
244248
fail-fast: false
245249
matrix:
246-
os: [ubuntu-latest, macos-12]
250+
os: [ubuntu-22.04, macos-12]
247251
runs-on: ${{ matrix.os }}
248252
steps:
249253
- uses: actions/checkout@v2
@@ -295,7 +299,7 @@ jobs:
295299
include:
296300
- name: Install and test
297301
test: saw-remote-api/scripts/run_rpc_tests.sh
298-
os: ubuntu-18.04
302+
os: ubuntu-22.04
299303
# TODO: saw-remote-api unit tests are disabled pending a fix for #1699
300304
- name: Install on MacOS
301305
test: |
@@ -306,7 +310,7 @@ jobs:
306310
os: macos-12
307311
- name: Check docs
308312
test: saw-remote-api/scripts/check_docs.sh
309-
os: ubuntu-18.04
313+
os: ubuntu-22.04
310314
steps:
311315
- uses: actions/checkout@v2
312316
with:
@@ -350,7 +354,7 @@ jobs:
350354
fail-fast: false
351355
matrix:
352356
suite: ${{ fromJson(needs.build.outputs.cabal-test-suites-json) }}
353-
os: [ubuntu-18.04]
357+
os: [ubuntu-22.04]
354358
continue-on-error: [false]
355359
include:
356360
- suite: integration_tests
@@ -414,7 +418,7 @@ jobs:
414418
dist-tests/${{ matrix.suite }}
415419
416420
build-push-image:
417-
runs-on: ubuntu-latest
421+
runs-on: ubuntu-22.04
418422
needs: [config]
419423
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || needs.config.outputs.release == 'true'
420424
strategy:
@@ -516,7 +520,7 @@ jobs:
516520
name: "Test s2n proofs"
517521
timeout-minutes: 120
518522
needs: build
519-
runs-on: ubuntu-18.04
523+
runs-on: ubuntu-22.04
520524
strategy:
521525
fail-fast: false
522526
matrix:
@@ -569,7 +573,7 @@ jobs:
569573
# - changes to jobs or job instances don't require a mergify config update
570574
# - dependencies through `needs:` are validated, CI will fail if it's invalid
571575
mergify:
572-
runs-on: ubuntu-latest
576+
runs-on: ubuntu-22.04
573577
needs:
574578
- build
575579
- heapster-tests

s2nTests/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This directory contains Docker configurations for running some more complex cryp
33
(These are the same configurations used in our GitHub Actions CI.)
44

55
## Building SAWScript
6-
Running `make saw-script` will build SAWScript from the current working tree and place the resulting `saw` binary in `bin/`. This is useful if you develop on a system that isn't binary-compatible with Ubuntu 18.04 (e.g. macOS or NixOS).
6+
Running `make saw-script` will build SAWScript from the current working tree and place the resulting `saw` binary in `bin/`. This is useful if you develop on a system that isn't binary-compatible with Ubuntu 22.04 (e.g. macOS or NixOS).
77

88
## Running tests
99
Running `make <target>` on one of the following targets will use the `saw` binary in `bin/` to run the respective proof:

s2nTests/scripts/blst-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cd /workdir
55
./scripts/install.sh
66
cp /saw-bin/saw bin/saw
77

8-
wget --quiet -O solvers.zip "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20210917/ubuntu-20.04-bin.zip"
8+
wget --quiet -O solvers.zip "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20220902/ubuntu-20.04-bin.zip"
99
(cd bin && unzip -o ../solvers.zip)
1010
chmod +x bin/*
1111

saw-remote-api/Dockerfile

+22-6
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,41 @@
1-
FROM haskell:8.8.4 AS build
1+
FROM ubuntu:22.04 AS build
22
USER root
3-
RUN apt-get update && apt-get install -y wget libncurses-dev unzip
3+
RUN apt-get update && \
4+
apt-get install -y \
5+
# ghcup requirements
6+
build-essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev libncurses6 libtinfo6 \
7+
# SAW dependencies
8+
zlib1g-dev \
9+
# Miscellaneous
10+
git wget unzip
411
RUN useradd -m saw
512
COPY --chown=saw:saw . /home/saw
613
USER saw
714
WORKDIR /home/saw
815
ENV LANG=C.UTF-8 \
916
LC_ALL=C.UTF-8
1017
COPY cabal.GHC-8.8.4.config cabal.project.freeze
18+
ENV PATH=/home/saw/ghcup-download/bin:/home/saw/.ghcup/bin:$PATH
19+
RUN mkdir -p /home/saw/ghcup-download/bin && \
20+
curl -L https://downloads.haskell.org/~ghcup/0.1.17.7/x86_64-linux-ghcup-0.1.17.7 -o /home/saw/ghcup-download/bin/ghcup && \
21+
chmod +x /home/saw/ghcup-download/bin/ghcup
22+
RUN mkdir -p /home/saw/.ghcup && \
23+
ghcup --version && \
24+
ghcup install cabal 3.6.2.0 && \
25+
ghcup install ghc 8.8.4 && \
26+
ghcup set ghc 8.8.4
1127
RUN cabal v2-update && cabal v2-build -j exe:saw-remote-api
1228
RUN mkdir -p /home/saw/rootfs/usr/local/bin
1329
RUN cp $(cabal v2-exec which saw-remote-api) /home/saw/rootfs/usr/local/bin/saw-remote-api
1430
WORKDIR /home/saw//rootfs/usr/local/bin
15-
RUN curl -o solvers.zip -sL "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20210917/ubuntu-18.04-bin.zip"
31+
RUN curl -o solvers.zip -sL "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20220902/ubuntu-22.04-bin.zip"
1632
RUN unzip solvers.zip && rm solvers.zip && chmod +x *
1733
USER root
1834
RUN chown -R root:root /home/saw/rootfs
1935

20-
FROM debian:buster-slim
21-
RUN apt-get update \
22-
&& apt-get install -y libgmp10 libgomp1 libffi6 wget libncurses5 unzip libreadline-dev openjdk-11-jdk-headless
36+
FROM ubuntu:22.04
37+
RUN apt-get update && \
38+
apt-get install -y libgmp10 libgomp1 libffi8 wget libncurses6 unzip libreadline-dev openjdk-11-jdk-headless
2339
COPY --from=build /home/saw/rootfs /
2440
RUN useradd -m saw && chown -R saw:saw /home/saw
2541
USER saw

saw/Dockerfile

+22-6
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
1-
FROM haskell:8.8.4 AS build
1+
FROM ubuntu:22.04 AS build
22
USER root
3-
RUN apt-get update && apt-get install -y wget libncurses-dev unzip
3+
RUN apt-get update && \
4+
apt-get install -y \
5+
# ghcup requirements
6+
build-essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev libncurses6 libtinfo6 \
7+
# SAW dependencies
8+
zlib1g-dev \
9+
# Miscellaneous
10+
git wget unzip
411
RUN useradd -m saw
512
COPY --chown=saw:saw . /home/saw
613
USER saw
714
WORKDIR /home/saw
815
ENV LANG=C.UTF-8 \
916
LC_ALL=C.UTF-8
1017
COPY cabal.GHC-8.8.4.config cabal.project.freeze
18+
ENV PATH=/home/saw/ghcup-download/bin:/home/saw/.ghcup/bin:$PATH
19+
RUN mkdir -p /home/saw/ghcup-download/bin && \
20+
curl -L https://downloads.haskell.org/~ghcup/0.1.17.7/x86_64-linux-ghcup-0.1.17.7 -o /home/saw/ghcup-download/bin/ghcup && \
21+
chmod +x /home/saw/ghcup-download/bin/ghcup
22+
RUN mkdir -p /home/saw/.ghcup && \
23+
ghcup --version && \
24+
ghcup install cabal 3.6.2.0 && \
25+
ghcup install ghc 8.8.4 && \
26+
ghcup set ghc 8.8.4
1127
RUN cabal v2-update
1228
RUN cabal v2-build
1329
RUN mkdir -p /home/saw/rootfs/usr/local/bin
1430
RUN cp $(cabal v2-exec which saw) /home/saw/rootfs/usr/local/bin/saw
1531
WORKDIR /home/saw//rootfs/usr/local/bin
16-
RUN curl -o solvers.zip -sL "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20210917/ubuntu-18.04-bin.zip"
32+
RUN curl -o solvers.zip -sL "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20220902/ubuntu-22.04-bin.zip"
1733
RUN unzip solvers.zip && rm solvers.zip && chmod +x *
1834
USER root
1935
RUN chown -R root:root /home/saw/rootfs
2036

21-
FROM debian:buster-slim
22-
RUN apt-get update \
23-
&& apt-get install -y libgmp10 libgomp1 libffi6 wget libncurses5 libreadline-dev unzip
37+
FROM ubuntu:22.04
38+
RUN apt-get update && \
39+
apt-get install -y libgmp10 libgomp1 libffi8 wget libncurses6 libreadline-dev unzip
2440
COPY --from=build /home/saw/rootfs /
2541
RUN useradd -m saw && chown -R saw:saw /home/saw
2642
USER saw

0 commit comments

Comments
 (0)