Sha3 lax check #1435
Workflow file for this run
This file contains hidden or 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: ML-KEM - hax | |
on: | |
merge_group: | |
push: | |
branches: ["dev", "main"] | |
pull_request: | |
branches: ["dev", "main"] | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
inputs: | |
hax_ref: | |
description: "The hax revision you want this job to use" | |
required: false | |
type: string | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# NOTE: This always runs, even if the `hax_ref` workflow input is provided. | |
# TODO: Move this reusable workflow to a standalone action | |
get-hax-ref: | |
uses: ./.github/workflows/get-hax-ref.yml | |
extract: | |
runs-on: ubuntu-latest | |
needs: | |
- get-hax-ref | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hacspec/hax-actions@main | |
with: | |
hax_reference: ${{ github.event.inputs.hax_ref || needs.get-hax-ref.outputs.hax_ref }} | |
fstar: v2025.02.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-extractions | |
path: "**/proofs/fstar" | |
include-hidden-files: true | |
if-no-files-found: error | |
lax: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'merge_group' }} | |
needs: | |
- get-hax-ref | |
- extract | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hacspec/hax-actions@main | |
with: | |
hax_reference: ${{ github.event.inputs.hax_ref || needs.get-hax-ref.outputs.hax_ref }} | |
fstar: v2025.02.17 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: fstar-extractions | |
path: . | |
- name: 🏃 Lax ML-KEM crate | |
working-directory: libcrux-ml-kem | |
run: ./hax.py prove --admit | |
prove: | |
runs-on: self-hosted | |
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} | |
needs: | |
- get-hax-ref | |
- extract | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: cryspen/hax | |
path: hax | |
ref: ${{ github.event.inputs.hax_ref || needs.get-hax-ref.outputs.hax_ref }} | |
- name: ⤵ Install hax | |
run: | | |
nix profile install ./hax | |
- name: ⤵ Install FStar | |
run: nix profile install github:FStarLang/FStar/v2025.02.17 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: fstar-extractions | |
path: . | |
- name: 🏃 Prove ML-KEM crate | |
working-directory: libcrux-ml-kem | |
run: FSTAR_HOME=~/.nix-profile ./hax.py prove | |
mlkem-extract-hax-status: | |
if: ${{ always() }} | |
needs: [get-hax-ref, extract] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Successful | |
if: ${{ !(contains(needs.*.result, 'failure')) }} | |
run: exit 0 | |
- name: Failing | |
if: ${{ (contains(needs.*.result, 'failure')) }} | |
run: exit 1 | |
mlkem-lax-hax-status: | |
if: ${{ always() }} | |
needs: [get-hax-ref, lax] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Successful | |
if: ${{ !(contains(needs.*.result, 'failure')) }} | |
run: exit 0 | |
- name: Failing | |
if: ${{ (contains(needs.*.result, 'failure')) }} | |
run: exit 1 |