Skip to content

Commit

Permalink
fix logs printing in CI + dockerfile updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tfaoliveira-sb committed Oct 3, 2024
1 parent e5d4592 commit 8c9ded8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
39 changes: 21 additions & 18 deletions scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG JASMIN_COMMIT=f2cd3bf19df5a2d1fa5e35a6d5fefd090849b626
ARG EASYCRYPT_COMMIT=2b3bbadffa084466fd3450f367b2102e032c1301

ARG ALTERGO_VERSION=2.5.2
# note: CVC4_VERSION is not set. Below, you can find and replace the url.
# note: CVC4_VERSION cannot be set here. Below, you can find and replace the corresponding url.
ARG Z3_VERSION=4.12.4

SHELL ["/bin/bash", "-c"]
Expand All @@ -25,9 +25,10 @@ RUN apt-get --quiet --assume-yes update && \
sudo wget curl git time xz-utils libicu-dev \
ocaml ocaml-native-compilers camlp4-extra opam \
autoconf debianutils libgmp-dev pkg-config zlib1g-dev \
vim build-essential python3 python3-pip m4 libgsl-dev \
vim build-essential python3 python3-pip m4 libgsl-dev \
libpcre3-dev jq parallel valgrind bash-completion \
qemu-user-static binutils-arm-linux-gnueabi* gcc-arm-linux-gnueabi
qemu-user-static binutils-arm-linux-gnueabi* gcc-arm-linux-gnueabi \
bsdmainutils

RUN apt-get --quiet --assume-yes clean

Expand Down Expand Up @@ -57,8 +58,10 @@ RUN cd jasmin_$JASMIN_COMMIT/ && \

# easycrypt ###################################################################

ENV OPAMYES=true OPAMVERBOSE=0

# alt-ergo (via opam)
RUN export OPAMYES=true OPAMVERBOSE=0 OPAMJOBS=$(nproc) && \
RUN export OPAMJOBS=$(nproc) && \
opam init --disable-sandboxing && \
opam install opam-depext && \
opam pin add -n alt-ergo $ALTERGO_VERSION && \
Expand All @@ -67,29 +70,29 @@ RUN export OPAMYES=true OPAMVERBOSE=0 OPAMJOBS=$(nproc) && \

# cvc4 (for a different version replace the following url)
RUN wget --no-verbose --show-progress --progress=bar:force:noscroll --timeout=10 --waitretry=5 --tries=5 \
-O cvc4 https://github.com/CVC4/CVC4-archived/releases/download/1.8/cvc4-1.8-x86_64-linux-opt && \
-O cvc4 https://github.com/CVC4/CVC4-archived/releases/download/1.8/cvc4-1.8-x86_64-linux-opt && \
sudo install -D cvc4 /usr/local/bin/

# z3
RUN wget --no-verbose --show-progress --progress=bar:force:noscroll --timeout=10 --waitretry=5 --tries=5 \
https://github.com/Z3Prover/z3/releases/download/z3-$Z3_VERSION/z3-$Z3_VERSION-x64-glibc-2.31.zip && \
unzip -j z3-$Z3_VERSION-x64-glibc-2.31.zip z3-$Z3_VERSION-x64-glibc-2.31/bin/z3 && \
sudo install -D z3 /usr/local/bin/

# easycrypt
RUN git clone https://github.com/EasyCrypt/easycrypt.git easycrypt_$EASYCRYPT_COMMIT
RUN eval $(opam env) && \
cd easycrypt_$EASYCRYPT_COMMIT/ && \
git checkout $EASYCRYPT_COMMIT && \
USER=$USER source /home/$USER/.nix-profile/etc/profile.d/nix.sh && \
export NIXPKGS_ALLOW_UNFREE=1 && \
nix-channel --update && \
nix-shell --command "make" && \
nix-shell --command "./ec.native why3config -why3 why3config.conf"
RUN export OPAMJOBS=$(nproc) && \
opam pin add -n easycrypt https://github.com/EasyCrypt/easycrypt.git#${EASYCRYPT_COMMIT} && \
opam depext easycrypt && \
opam install easycrypt && \
opam clean

RUN opam config exec -- why3 config detect

RUN echo "eval $(opam env)" >> /home/$USER/.bashrc

RUN cd easycrypt_$EASYCRYPT_COMMIT/ && \
echo -e "#!/bin/bash\n$(pwd)/ec.native -I Jasmin:/home/$USER/jasmin_$JASMIN_COMMIT/eclib/ "\$@" -why3 $(pwd)/why3config.conf" > easycrypt && \
sudo install -D easycrypt /usr/local/bin/
RUN mkdir -p /home/$USER/.config/easycrypt/ && \
echo "[general]" > /home/$USER/.config/easycrypt/easycrypt.conf && \
echo "idirs = Jasmin:/home/$USER/jasmin_$JASMIN_COMMIT/eclib/" >> /home/$USER/.config/easycrypt/easycrypt.conf

# formosa-25519 ###############################################################

Expand Down
2 changes: 1 addition & 1 deletion scripts/reporter/jlog
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cat_c_file()
file=$2

echo -e "${color}"
sed '/\r/d' $file | uniq | cat -
cat $file | col -b
echo -e "${RESET}"
}

Expand Down

0 comments on commit 8c9ded8

Please sign in to comment.