author Kai Engert <>
Wed, 11 Apr 2018 12:54:08 +0200
changeset 412831 0037f2516d1015029e8a3d0901d6e6d12a6aa140
parent 396918 ba3a2c41b4b95871804244df48b2e4a70a831167
permissions -rw-r--r--
Bug 1445731, land NSS 2eefd697d661 UPGRADE_NSS_RELEASE, r=me

#!/usr/bin/env bash

set -v -e -x

# Prepare build (OCaml packages)
opam init
echo ". /home/worker/.opam/opam-init/ > /dev/null 2> /dev/null || true" >> .bashrc
opam switch -v ${opamv}
opam install ocamlfind batteries sqlite3 fileutils yojson ppx_deriving_yojson zarith pprint menhir ulex process fix wasm stdint

# Get the HACL* code
git clone ${haclrepo} hacl-star
git -C hacl-star checkout ${haclversion}

# Prepare submodules, and build, verify, test, and extract c code
# This caches the extracted c code (pins the HACL* version). All we need to do
# on CI now is comparing the code in this docker image with the one in NSS.
opam config exec -- make -C hacl-star prepare -j$(nproc)
make -C hacl-star -f snapshots/nss -j$(nproc)
KOPTS="-funroll-loops 5" make -C hacl-star/code/curve25519 test -j$(nproc)
make -C hacl-star/code/salsa-family test -j$(nproc)
make -C hacl-star/code/poly1305 test -j$(nproc)

# Cleanup.
rm -rf ~/.ccache ~/.cache