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

Update blst-verification test in CI #998

Merged
merged 2 commits into from
Jan 12, 2021
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
10 changes: 5 additions & 5 deletions s2nTests/docker/blst.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ RUN apt-get update
RUN apt-get install -y wget unzip git cmake clang llvm golang python3-pip libncurses5 quilt
RUN pip3 install wllvm

WORKDIR /saw-script
RUN mkdir -p /saw-script && \
git clone https://github.com/GaloisInc/blst-verification.git && \
cd blst-verification && \
git checkout cb8a2c3c57902a957d4a7ac7872fc78e51118262 && \
RUN git clone https://github.com/GaloisInc/blst-verification.git /workdir && \
cd /workdir && \
git checkout b937dcfaf9290a7caa016fd9c906195fcc2f4791 && \
git config --file=.gitmodules submodule.blst.url https://github.com/supranational/blst && \
git submodule sync && \
git submodule update --init

WORKDIR /workdir

COPY scripts/blst-entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "/bin/bash" ]
25 changes: 4 additions & 21 deletions s2nTests/scripts/blst-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,15 @@
#!/usr/bin/env bash
set -xe

cd /saw-script/blst-verification
cd /workdir
./scripts/install.sh
cp /saw-bin/saw bin/saw

export PATH=/saw-script/blst-verification/bin:$PATH
export CRYPTOLPATH=/saw-script/blst-verification/cryptol-specs:/saw-script/blst-verification/spec
export PATH=/workdir/bin:$PATH
export CRYPTOLPATH=/workdir/cryptol-specs:/workdir/spec

./scripts/build_x86.sh

# TODO: replace this section with ./scripts/build_llvm.sh once the absolute
# path in that script is removed.
(
mkdir -p build/llvm
rm -r build/llvm
cp -r blst build/llvm
cd /saw-script/blst-verification/build/llvm
for p in /saw-script/blst-verification/patches/*
do
patch -p1 -t < "$p"
done
export CFLAGS='-g -fPIC -Wall -Wextra -Werror'
export CC=wllvm
export LLVM_COMPILER=clang
./build.sh
extract-bc --bitcode libblst.a
)
./scripts/build_llvm.sh

./scripts/prove.sh
./scripts/check.sh | if grep False; then exit 1; fi