Skip to content

Commit 200d0e5

Browse files
authored
Merge pull request #1746 from GaloisInc/ubuntu-22.04
CI: Use Ubuntu 22.04, drop 18.04
2 parents c29a4c9 + a998710 commit 200d0e5

File tree

12 files changed

+111
-112
lines changed

12 files changed

+111
-112
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

+26-17
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,20 +67,28 @@ 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+
run-tests: [true]
73+
include:
74+
- os: ubuntu-20.04
75+
ghc: "8.10.7"
76+
run-tests: false
7177
exclude:
7278
# Exclude 8.8 on macOS 12 due to
7379
# https://gitlab.haskell.org/ghc/ghc/-/issues/18446
7480
- os: macos-12
7581
ghc: "8.8.4"
82+
run-tests: true
7683
- os: windows-latest
7784
ghc: "8.8.4"
85+
run-tests: true
7886
# Exclude 9.0 on Windows for now until
7987
# https://github.com/commercialhaskell/stackage/issues/6400
8088
# is resolved
8189
- os: windows-latest
8290
ghc: "9.0.2"
91+
run-tests: false
8392
outputs:
8493
cabal-test-suites-json: ${{ steps.cabal-test-suites.outputs.targets-json }}
8594
steps:
@@ -91,9 +100,9 @@ jobs:
91100
- id: config
92101
shell: bash
93102
run: |
94-
NAME="${{ needs.config.outputs.name }}-${{ runner.os }}-x86_64"
103+
NAME="${{ needs.config.outputs.name }}-${{ matrix.os }}-x86_64"
95104
.github/ci.sh output name $NAME
96-
echo "NAME=${{ needs.config.outputs.name }}-${{ runner.os }}-x86_64" >> $GITHUB_ENV
105+
echo "NAME=${{ needs.config.outputs.name }}-${{ matrix.os }}-x86_64" >> $GITHUB_ENV
97106
98107
- uses: haskell/actions/setup@v1
99108
id: setup-haskell
@@ -119,9 +128,9 @@ jobs:
119128
path: |
120129
${{ steps.setup-haskell.outputs.cabal-store }}
121130
dist-newstyle
122-
key: ${{ env.CACHE_VERSION }}-cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }}
131+
key: ${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }}
123132
restore-keys: |
124-
${{ env.CACHE_VERSION }}-cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-
133+
${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-
125134
126135
- if: needs.config.outputs.release == 'true'
127136
shell: bash
@@ -198,7 +207,7 @@ jobs:
198207
if-no-files-found: error
199208
retention-days: ${{ needs.config.outputs.retention-days }}
200209

201-
- if: "matrix.ghc == '8.10.7'"
210+
- if: matrix.ghc == '8.10.7' && matrix.run-tests
202211
uses: actions/upload-artifact@v2
203212
with:
204213
path: dist/bin
@@ -209,7 +218,7 @@ jobs:
209218
strategy:
210219
fail-fast: false
211220
matrix:
212-
os: [ubuntu-latest, macos-12]
221+
os: [ubuntu-22.04, macos-12]
213222
runs-on: ${{ matrix.os }}
214223
steps:
215224
- uses: actions/checkout@v2
@@ -243,7 +252,7 @@ jobs:
243252
strategy:
244253
fail-fast: false
245254
matrix:
246-
os: [ubuntu-latest, macos-12]
255+
os: [ubuntu-22.04, macos-12]
247256
runs-on: ${{ matrix.os }}
248257
steps:
249258
- uses: actions/checkout@v2
@@ -295,7 +304,7 @@ jobs:
295304
include:
296305
- name: Install and test
297306
test: saw-remote-api/scripts/run_rpc_tests.sh
298-
os: ubuntu-18.04
307+
os: ubuntu-22.04
299308
# TODO: saw-remote-api unit tests are disabled pending a fix for #1699
300309
- name: Install on MacOS
301310
test: |
@@ -306,7 +315,7 @@ jobs:
306315
os: macos-12
307316
- name: Check docs
308317
test: saw-remote-api/scripts/check_docs.sh
309-
os: ubuntu-18.04
318+
os: ubuntu-22.04
310319
steps:
311320
- uses: actions/checkout@v2
312321
with:
@@ -350,7 +359,7 @@ jobs:
350359
fail-fast: false
351360
matrix:
352361
suite: ${{ fromJson(needs.build.outputs.cabal-test-suites-json) }}
353-
os: [ubuntu-18.04]
362+
os: [ubuntu-22.04]
354363
continue-on-error: [false]
355364
include:
356365
- suite: integration_tests
@@ -414,7 +423,7 @@ jobs:
414423
dist-tests/${{ matrix.suite }}
415424
416425
build-push-image:
417-
runs-on: ubuntu-latest
426+
runs-on: ubuntu-22.04
418427
needs: [config]
419428
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || needs.config.outputs.release == 'true'
420429
strategy:
@@ -516,7 +525,7 @@ jobs:
516525
name: "Test s2n proofs"
517526
timeout-minutes: 120
518527
needs: build
519-
runs-on: ubuntu-18.04
528+
runs-on: ubuntu-22.04
520529
strategy:
521530
fail-fast: false
522531
matrix:
@@ -569,7 +578,7 @@ jobs:
569578
# - changes to jobs or job instances don't require a mergify config update
570579
# - dependencies through `needs:` are validated, CI will fail if it's invalid
571580
mergify:
572-
runs-on: ubuntu-latest
581+
runs-on: ubuntu-22.04
573582
needs:
574583
- build
575584
- 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/docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ services:
33
saw-script:
44
build:
55
context: ..
6-
dockerfile: ${PWD:-.}/docker/saw.dockerfile
7-
entrypoint: ["cp", "/usr/local/bin/saw", "/saw-bin"]
6+
dockerfile: ${PWD:-.}/../saw/Dockerfile
7+
entrypoint: ["cp", "/usr/local/bin/saw", "/usr/local/bin/abc", "/saw-bin"]
88
user: root
99
volumes:
1010
- ${PWD:-}/bin:/saw-bin:rw

s2nTests/docker/awslc.dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
FROM ubuntu:20.04
1+
FROM ubuntu:22.04
22
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
3-
RUN apt-get update && apt-get install -y wget unzip git cmake clang llvm golang python3-pip libncurses5 quilt
3+
RUN apt-get update && apt-get install -y curl wget unzip git cmake golang python3-pip libncurses6 libncurses5 libtinfo-dev quilt file
44
RUN pip3 install wllvm
5+
RUN curl -OL https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz && \
6+
tar xf clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz && \
7+
cp -r clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/* /usr
58

69
WORKDIR /saw-script
710
RUN mkdir -p /saw-script && \

s2nTests/docker/blst.dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
FROM ubuntu:20.04
1+
FROM ubuntu:22.04
22
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
3-
RUN apt-get update && apt-get install -y wget unzip git cmake clang llvm golang python3-pip libncurses5 quilt
3+
RUN apt-get update && apt-get install -y curl wget unzip git cmake golang python3-pip libncurses6 libncurses5 libtinfo-dev quilt file
44
RUN pip3 install wllvm
5+
RUN curl -OL https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz && \
6+
tar xf clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz && \
7+
cp -r clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/* /usr
58

69
RUN git clone https://github.com/GaloisInc/blst-verification.git /workdir && \
710
cd /workdir && \

s2nTests/docker/s2n.dockerfile

+22-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,36 @@
1-
FROM ubuntu:18.04
1+
FROM ubuntu:22.04
22

33
RUN apt-get update -y -q && \
44
apt-get install -y software-properties-common && \
55
apt-get update -q -y && \
66
apt install -y \
7-
clang-3.9 \
87
curl \
98
gcc \
9+
g++ \
1010
git \
11-
llvm-3.9 \
1211
make \
1312
sudo \
13+
unzip \
14+
indent \
15+
kwstyle \
16+
libssl-dev \
17+
tcpdump \
18+
valgrind \
19+
lcov \
20+
m4 \
21+
nettle-dev \
22+
nettle-bin \
23+
pkg-config \
24+
zlib1g-dev \
25+
python3-pip \
26+
tox \
27+
libncurses5 \
28+
libtinfo-dev \
1429
&& \
1530
rm -rf /var/lib/apt/lists/*
31+
RUN curl -OL https://releases.llvm.org/3.9.0/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz && \
32+
tar xf clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz && \
33+
cp -r clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/* /usr
1634

1735
WORKDIR /saw-script
1836
RUN mkdir -p /saw-script && \
@@ -25,4 +43,4 @@ RUN mkdir -p /saw-script && \
2543

2644
COPY scripts/s2n-entrypoint.sh /entrypoint.sh
2745
ENTRYPOINT [ "/entrypoint.sh" ]
28-
CMD [ "/bin/bash" ]
46+
CMD [ "/bin/bash" ]

s2nTests/docker/saw.dockerfile

-70
This file was deleted.

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-22.04-bin.zip"
99
(cd bin && unzip -o ../solvers.zip)
1010
chmod +x bin/*
1111

s2nTests/scripts/s2n-entrypoint.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ fi
99
cd /saw-script/s2n
1010
echo 'JOBS=1' >> codebuild/bin/jobs.sh
1111
source codebuild/bin/s2n_setup_env.sh
12-
SAW=true SAW_INSTALL_DIR=tmp-saw codebuild/bin/s2n_install_test_dependencies.sh
12+
SAW=true SAW_INSTALL_DIR=tmp-saw ./codebuild/bin/install_default_dependencies.sh
1313
cp /saw-bin/saw "$SAW_INSTALL_DIR"/bin/saw
1414
cp /saw-bin/abc "$SAW_INSTALL_DIR"/bin/abc
1515
"$SAW_INSTALL_DIR"/bin/saw --version
16+
export CFLAGS=-Wno-error=array-parameter
17+
export CLANG=clang
18+
export LLVMLINK=llvm-link
1619
exec codebuild/bin/s2n_codebuild.sh

0 commit comments

Comments
 (0)