More kyber code refactoring #51
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: hax | |
on: | |
push: | |
branches: ["dev"] | |
paths: | |
- 'specs/kyber/src/**' | |
- 'src/kem/kyber/**' | |
pull_request: | |
branches: ["dev"] | |
paths: | |
- 'specs/kyber/src/**' | |
- 'src/kem/kyber/**' | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
hax: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 🔨 OCaml Setup | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: 4.14.1 | |
- name: ⤵ Get Fstar binaries | |
run: | | |
curl -L https://github.com/FStarLang/FStar/releases/download/v2023.09.03/fstar_2023.09.03_Linux_x86_64.tar.gz \ | |
--output Fstar.tar.gz \ | |
tar --extract --verbose --file Fstar.tar.gz | |
mv fstar Fstar | |
- name: ⤵ Clone hax repository | |
uses: actions/checkout@v4 | |
with: | |
repository: hacspec/hacspec-v2 | |
path: hax | |
- name: 🔨 Setup hax | |
working-directory: hax | |
run: | | |
sudo apt-get update | |
sudo apt-get install --yes nodejs | |
./setup.sh | |
- name: 🏃🏻♀️ Run hax extraction | |
run: | | |
eval $(opam env) | |
./hax-driver.py --kyber-reference | |
# Extract the functions in the compress module individually to test | |
# the function-extraction code. | |
# Extract functions from the remaining modules to test the | |
# module-extraction code. | |
./hax-driver.py --crate-path specs/kyber \ | |
--functions hacspec_kyber::compress::compress \ | |
hacspec_kyber::compress::decompress \ | |
hacspec_kyber::compress::compress_d \ | |
hacspec::kyber::compress::decompress_d \ | |
--modules ind_cpa \ | |
hacspec_kyber \ | |
matrix \ | |
ntt \ | |
parameters \ | |
sampling \ | |
serialize \ | |
--exclude-modules libcrux::hacl::sha3 libcrux::digest | |
./hax-driver.py typecheck --admit |