Build C extraction Docker image and run tests on CI #2484
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", "main"] | |
pull_request: | |
branches: ["dev", "main"] | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
inputs: | |
hax_rev: | |
description: "The hax revision you want this job to use" | |
default: "main" | |
skip_diff: | |
description: "Skip diff jobs" | |
default: false | |
type: boolean | |
merge_group: | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
mlkem-extract: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hacspec/hax-actions@main | |
with: | |
hax_reference: ${{ github.event.inputs.hax_rev || 'main' }} | |
fstar: v2025.01.17 | |
- name: π Extract ML-KEM crate | |
working-directory: libcrux-ml-kem | |
run: ./hax.py extract | |
- name: β Upload F* extraction | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fstar-extraction-mlkem | |
path: libcrux-ml-kem/proofs/ | |
include-hidden-files: true | |
if-no-files-found: error | |
mlkem-diff: | |
needs: mlkem-extract | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: fstar-extraction-mlkem | |
path: ~/fstar-extraction-mlkem | |
- name: = Diff Extraction | |
if: ${{ github.event.inputs.skip_diff != 'false' }} | |
run: | | |
diff -r libcrux-ml-kem/proofs/fstar/extraction/ \ | |
~/fstar-extraction-mlkem/fstar/extraction/ | |
mlkem-lax: | |
runs-on: ubuntu-latest | |
needs: | |
- mlkem-extract | |
- mlkem-diff | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hacspec/hax-actions@main | |
with: | |
hax_reference: ${{ github.event.inputs.hax_rev || 'main' }} | |
fstar: v2025.01.17 | |
- name: π Lax ML-KEM crate | |
working-directory: libcrux-ml-kem | |
run: ./hax.py prove --admit | |
mldsa-extract: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hacspec/hax-actions@main | |
with: | |
hax_reference: ${{ github.event.inputs.hax_rev || 'main' }} | |
fstar: v2025.01.17 | |
- name: π Extract ML-DSA crate | |
working-directory: libcrux-ml-dsa | |
run: ./hax.py extract | |
- name: β Upload F* extraction | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fstar-extraction-mldsa | |
path: libcrux-ml-dsa/proofs/ | |
include-hidden-files: true | |
if-no-files-found: error | |
mldsa-diff: | |
needs: mldsa-extract | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: fstar-extraction-mldsa | |
path: ~/fstar-extraction-mldsa | |
- name: = Diff Extraction | |
if: ${{ github.event.inputs.skip_diff != 'false' }} | |
run: | | |
diff -r libcrux-ml-dsa/proofs/fstar/extraction/ \ | |
~/fstar-extraction-mldsa/fstar/extraction/ | |
mldsa-lax: | |
runs-on: ubuntu-latest | |
needs: | |
- mldsa-extract | |
- mldsa-diff | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hacspec/hax-actions@main | |
with: | |
hax_reference: ${{ github.event.inputs.hax_rev || 'main' }} | |
fstar: v2025.01.17 | |
- name: π Lax ML-DSA crate | |
working-directory: libcrux-ml-dsa | |
run: ./hax.py prove --admit |