Skip to content

Commit 3c833d7

Browse files
committed
Port s2nTests over to Ubuntu 22.04
1 parent cf30702 commit 3c833d7

File tree

4 files changed

+31
-54
lines changed

4 files changed

+31
-54
lines changed

s2nTests/docker/awslc.dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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 wget unzip git cmake clang llvm golang python3-pip libncurses6 quilt
44
RUN pip3 install wllvm
55

66
WORKDIR /saw-script

s2nTests/docker/blst.dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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 wget unzip git cmake clang llvm golang python3-pip libncurses6 quilt
44
RUN pip3 install wllvm
55

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

s2nTests/docker/s2n.dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
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 \
7+
clang-12 \
88
curl \
99
gcc \
1010
git \
11-
llvm-3.9 \
11+
llvm-12 \
1212
make \
1313
sudo \
1414
&& \
@@ -25,4 +25,4 @@ RUN mkdir -p /saw-script && \
2525

2626
COPY scripts/s2n-entrypoint.sh /entrypoint.sh
2727
ENTRYPOINT [ "/entrypoint.sh" ]
28-
CMD [ "/bin/bash" ]
28+
CMD [ "/bin/bash" ]

s2nTests/docker/saw.dockerfile

+23-46
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,13 @@
1-
FROM debian:stretch AS solvers
2-
3-
# Install needed packages for building
4-
RUN apt-get update \
5-
&& apt-get install -y curl cmake gcc g++ git libreadline-dev unzip
6-
RUN useradd -m user
7-
RUN install -d -o user -g user /solvers
8-
USER user
9-
WORKDIR /solvers
10-
RUN mkdir -p rootfs/usr/local/bin
11-
12-
# Get Z3 4.8.10 from GitHub
13-
RUN curl -L https://github.com/Z3Prover/z3/releases/download/z3-4.8.10/z3-4.8.10-x64-ubuntu-18.04.zip --output z3.zip
14-
RUN unzip z3.zip
15-
RUN mv z3-*/bin/z3 rootfs/usr/local/bin
16-
17-
# Build abc from GitHub. (Latest version.)
18-
RUN git clone https://github.com/berkeley-abc/abc.git
19-
RUN cd abc && make -j$(nproc)
20-
RUN cp abc/abc rootfs/usr/local/bin
21-
22-
# Build Boolector release 3.2.1 from source
23-
RUN curl -L https://github.com/Boolector/boolector/archive/3.2.1.tar.gz | tar xz
24-
RUN cd boolector* && ./contrib/setup-lingeling.sh && ./contrib/setup-btor2tools.sh && ./configure.sh && cd build && make -j$(nproc)
25-
RUN cp boolector*/build/bin/boolector rootfs/usr/local/bin
26-
27-
# Install Yices 2.6.2
28-
RUN curl -L https://yices.csl.sri.com/releases/2.6.2/yices-2.6.2-x86_64-pc-linux-gnu-static-gmp.tar.gz | tar xz
29-
RUN cp yices*/bin/yices-smt2 rootfs/usr/local/bin \
30-
&& cp yices*/bin/yices rootfs/usr/local/bin
31-
32-
# Install CVC4 1.8
33-
RUN curl -L https://github.com/CVC4/CVC4/releases/download/1.8/cvc4-1.8-x86_64-linux-opt --output rootfs/usr/local/bin/cvc4
34-
35-
# Install MathSAT 5.6.3 - Uncomment if you are in compliance with MathSAT's license.
36-
# RUN curl -L https://mathsat.fbk.eu/download.php?file=mathsat-5.6.3-linux-x86_64.tar.gz | tar xz
37-
# RUN cp mathsat-5.6.3-linux-x86_64/bin/mathsat rootfs/usr/local/bin
38-
39-
# Set executable and run tests
40-
RUN chmod +x rootfs/usr/local/bin/*
41-
42-
FROM haskell:8.8.4-stretch AS build
1+
FROM ubuntu:22.04 AS build
432
USER root
44-
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
4511
COPY --from=solvers /solvers/rootfs /
4612
RUN useradd -m saw
4713
COPY --chown=saw:saw . /home/saw
@@ -50,17 +16,28 @@ WORKDIR /home/saw
5016
ENV LANG=C.UTF-8 \
5117
LC_ALL=C.UTF-8
5218
COPY cabal.GHC-8.8.4.config cabal.project.freeze
19+
ENV PATH=/home/saw/ghcup-download/bin:/home/saw/.ghcup/bin:$PATH
20+
RUN mkdir -p /home/saw/ghcup-download/bin && \
21+
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 && \
22+
chmod +x /home/saw/ghcup-download/bin/ghcup
23+
RUN mkdir -p /home/saw/.ghcup && \
24+
ghcup --version && \
25+
ghcup install cabal 3.6.2.0 && \
26+
ghcup install ghc 8.8.4 && \
27+
ghcup set ghc 8.8.4
5328
RUN cabal v2-update
5429
RUN cabal v2-build
5530
RUN mkdir -p /home/saw/rootfs/usr/local/bin
5631
RUN cp $(cabal v2-exec which saw) /home/saw/rootfs/usr/local/bin/saw
5732
WORKDIR /home/saw
33+
RUN curl -o solvers.zip -sL "https://github.com/GaloisInc/what4-solvers/releases/download/snapshot-20220902/ubuntu-22.04-bin.zip"
34+
RUN unzip solvers.zip && rm solvers.zip && chmod +x *
5835
USER root
5936
RUN chown -R root:root /home/saw/rootfs
6037

61-
FROM debian:stretch-slim
62-
RUN apt-get update \
63-
&& apt-get install -y libgmp10 libgomp1 libffi6 wget libncurses5 unzip
38+
FROM ubuntu:22.04
39+
RUN apt-get update && \
40+
apt-get install -y libgmp10 libgomp1 libffi8 wget libncurses6 libreadline-dev unzip
6441
COPY --from=build /home/saw/rootfs /
6542
COPY --from=solvers /solvers/rootfs /
6643
RUN useradd -m saw && chown -R saw:saw /home/saw

0 commit comments

Comments
 (0)