Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Use Ubuntu 22.04, drop 18.04 #1746

Merged
merged 8 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.DS_Store
.cabal-sandbox
cabal.sandbox.config
cabal.project.local
.ghc.environment.x86_64-darwin-*
s2nTests

Expand Down
43 changes: 26 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Overall configuration notes:
# - Artifact uploads for binaries are from GHC 8.10.7
# - Builds for Ubuntu happen on 18.04 (would like to include 20.04, in addition)
# - Builds for Ubuntu happen on 22.04. We also include a single configuration
# for 20.04 to increase our Linux coverage.
# - Docker builds happen nightly, on manual invocation, and on release branch commits
# Please update this comment as those details change.

Expand All @@ -23,13 +24,13 @@ env:
# ./saw-remote-api/Dockerfile
# ./s2nTests/scripts/blst-entrypoint.sh
# ./s2nTests/docker/saw.dockerfile
SOLVER_PKG_VERSION: "snapshot-20220721"
SOLVER_PKG_VERSION: "snapshot-20220902"

OCAML_VERSION: 4.09.x

jobs:
config:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
name: ${{ steps.config.outputs.name }}
version: ${{ steps.config.outputs.version }}
Expand Down Expand Up @@ -66,20 +67,28 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-12, windows-latest]
os: [ubuntu-22.04, macos-12, windows-latest]
ghc: ["8.8.4", "8.10.7", "9.0.2"]
run-tests: [true]
include:
- os: ubuntu-20.04
ghc: "8.10.7"
run-tests: false
exclude:
# Exclude 8.8 on macOS 12 due to
# https://gitlab.haskell.org/ghc/ghc/-/issues/18446
- os: macos-12
ghc: "8.8.4"
run-tests: true
- os: windows-latest
ghc: "8.8.4"
run-tests: true
# Exclude 9.0 on Windows for now until
# https://github.com/commercialhaskell/stackage/issues/6400
# is resolved
- os: windows-latest
ghc: "9.0.2"
run-tests: false
outputs:
cabal-test-suites-json: ${{ steps.cabal-test-suites.outputs.targets-json }}
steps:
Expand All @@ -91,9 +100,9 @@ jobs:
- id: config
shell: bash
run: |
NAME="${{ needs.config.outputs.name }}-${{ runner.os }}-x86_64"
NAME="${{ needs.config.outputs.name }}-${{ matrix.os }}-x86_64"
.github/ci.sh output name $NAME
echo "NAME=${{ needs.config.outputs.name }}-${{ runner.os }}-x86_64" >> $GITHUB_ENV
echo "NAME=${{ needs.config.outputs.name }}-${{ matrix.os }}-x86_64" >> $GITHUB_ENV

- uses: haskell/actions/setup@v1
id: setup-haskell
Expand All @@ -119,9 +128,9 @@ jobs:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
key: ${{ env.CACHE_VERSION }}-cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }}
key: ${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }}
restore-keys: |
${{ env.CACHE_VERSION }}-cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-
${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-

- if: needs.config.outputs.release == 'true'
shell: bash
Expand Down Expand Up @@ -198,7 +207,7 @@ jobs:
if-no-files-found: error
retention-days: ${{ needs.config.outputs.retention-days }}

- if: "matrix.ghc == '8.10.7'"
- if: matrix.ghc == '8.10.7' && matrix.run-tests
uses: actions/upload-artifact@v2
with:
path: dist/bin
Expand All @@ -209,7 +218,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12]
os: [ubuntu-22.04, macos-12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -243,7 +252,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12]
os: [ubuntu-22.04, macos-12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -295,7 +304,7 @@ jobs:
include:
- name: Install and test
test: saw-remote-api/scripts/run_rpc_tests.sh
os: ubuntu-18.04
os: ubuntu-22.04
# TODO: saw-remote-api unit tests are disabled pending a fix for #1699
- name: Install on MacOS
test: |
Expand All @@ -306,7 +315,7 @@ jobs:
os: macos-12
- name: Check docs
test: saw-remote-api/scripts/check_docs.sh
os: ubuntu-18.04
os: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -350,7 +359,7 @@ jobs:
fail-fast: false
matrix:
suite: ${{ fromJson(needs.build.outputs.cabal-test-suites-json) }}
os: [ubuntu-18.04]
os: [ubuntu-22.04]
continue-on-error: [false]
include:
- suite: integration_tests
Expand Down Expand Up @@ -414,7 +423,7 @@ jobs:
dist-tests/${{ matrix.suite }}

build-push-image:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [config]
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || needs.config.outputs.release == 'true'
strategy:
Expand Down Expand Up @@ -516,7 +525,7 @@ jobs:
name: "Test s2n proofs"
timeout-minutes: 120
needs: build
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -569,7 +578,7 @@ jobs:
# - changes to jobs or job instances don't require a mergify config update
# - dependencies through `needs:` are validated, CI will fail if it's invalid
mergify:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
- build
- heapster-tests
Expand Down
2 changes: 1 addition & 1 deletion s2nTests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This directory contains Docker configurations for running some more complex cryp
(These are the same configurations used in our GitHub Actions CI.)

## Building SAWScript
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).
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).

## Running tests
Running `make <target>` on one of the following targets will use the `saw` binary in `bin/` to run the respective proof:
Expand Down
4 changes: 2 additions & 2 deletions s2nTests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ services:
saw-script:
build:
context: ..
dockerfile: ${PWD:-.}/docker/saw.dockerfile
entrypoint: ["cp", "/usr/local/bin/saw", "/saw-bin"]
dockerfile: ${PWD:-.}/../saw/Dockerfile
entrypoint: ["cp", "/usr/local/bin/saw", "/usr/local/bin/abc", "/saw-bin"]
user: root
volumes:
- ${PWD:-}/bin:/saw-bin:rw
Expand Down
7 changes: 5 additions & 2 deletions s2nTests/docker/awslc.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update && apt-get install -y wget unzip git cmake clang llvm golang python3-pip libncurses5 quilt
RUN apt-get update && apt-get install -y curl wget unzip git cmake golang python3-pip libncurses6 libncurses5 libtinfo-dev quilt file
RUN pip3 install wllvm
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 && \
tar xf clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz && \
cp -r clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/* /usr

WORKDIR /saw-script
RUN mkdir -p /saw-script && \
Expand Down
7 changes: 5 additions & 2 deletions s2nTests/docker/blst.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update && apt-get install -y wget unzip git cmake clang llvm golang python3-pip libncurses5 quilt
RUN apt-get update && apt-get install -y curl wget unzip git cmake golang python3-pip libncurses6 libncurses5 libtinfo-dev quilt file
RUN pip3 install wllvm
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 && \
tar xf clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz && \
cp -r clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/* /usr

RUN git clone https://github.com/GaloisInc/blst-verification.git /workdir && \
cd /workdir && \
Expand Down
26 changes: 22 additions & 4 deletions s2nTests/docker/s2n.dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
FROM ubuntu:18.04
FROM ubuntu:22.04

RUN apt-get update -y -q && \
apt-get install -y software-properties-common && \
apt-get update -q -y && \
apt install -y \
clang-3.9 \
curl \
gcc \
g++ \
git \
llvm-3.9 \
make \
sudo \
unzip \
indent \
kwstyle \
libssl-dev \
tcpdump \
valgrind \
lcov \
m4 \
nettle-dev \
nettle-bin \
pkg-config \
zlib1g-dev \
python3-pip \
tox \
libncurses5 \
libtinfo-dev \
&& \
rm -rf /var/lib/apt/lists/*
RUN curl -OL https://releases.llvm.org/3.9.0/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz && \
tar xf clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz && \
cp -r clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/* /usr

WORKDIR /saw-script
RUN mkdir -p /saw-script && \
Expand All @@ -25,4 +43,4 @@ RUN mkdir -p /saw-script && \

COPY scripts/s2n-entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "/bin/bash" ]
CMD [ "/bin/bash" ]
70 changes: 0 additions & 70 deletions s2nTests/docker/saw.dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion s2nTests/scripts/blst-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cd /workdir
./scripts/install.sh
cp /saw-bin/saw bin/saw

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

Expand Down
5 changes: 4 additions & 1 deletion s2nTests/scripts/s2n-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ fi
cd /saw-script/s2n
echo 'JOBS=1' >> codebuild/bin/jobs.sh
source codebuild/bin/s2n_setup_env.sh
SAW=true SAW_INSTALL_DIR=tmp-saw codebuild/bin/s2n_install_test_dependencies.sh
SAW=true SAW_INSTALL_DIR=tmp-saw ./codebuild/bin/install_default_dependencies.sh
cp /saw-bin/saw "$SAW_INSTALL_DIR"/bin/saw
cp /saw-bin/abc "$SAW_INSTALL_DIR"/bin/abc
"$SAW_INSTALL_DIR"/bin/saw --version
export CFLAGS=-Wno-error=array-parameter
export CLANG=clang
export LLVMLINK=llvm-link
exec codebuild/bin/s2n_codebuild.sh
Loading