|
12 | 12 | - 'proofs/hol_light/arm/Makefile' |
13 | 13 | - 'proofs/hol_light/arm/**/*.S' |
14 | 14 | - 'proofs/hol_light/arm/**/*.ml' |
| 15 | + - 'proofs/hol_light/x86/Makefile' |
| 16 | + - 'proofs/hol_light/x86/**/*.S' |
| 17 | + - 'proofs/hol_light/x86/**/*.ml' |
15 | 18 | - 'flake.nix' |
16 | 19 | - 'flake.lock' |
17 | 20 | - 'nix/hol_light/*' |
|
23 | 26 | - 'proofs/hol_light/arm/Makefile' |
24 | 27 | - 'proofs/hol_light/arm/**/*.S' |
25 | 28 | - 'proofs/hol_light/arm/**/*.ml' |
| 29 | + - 'proofs/hol_light/x86/Makefile' |
| 30 | + - 'proofs/hol_light/x86/**/*.S' |
| 31 | + - 'proofs/hol_light/x86/**/*.ml' |
26 | 32 | - 'flake.nix' |
27 | 33 | - 'flake.lock' |
28 | 34 | - 'nix/hol_light/*' |
|
37 | 43 | # but we use this as a fast path to not even start the proofs |
38 | 44 | # if the byte code needs updating. |
39 | 45 | hol_light_bytecode: |
40 | | - name: HOL-Light bytecode check |
| 46 | + name: AArch64 HOL-Light bytecode check |
41 | 47 | runs-on: pqcp-arm64 |
42 | 48 | if: github.repository_owner == 'pq-code-package' && !github.event.pull_request.head.repo.fork |
43 | 49 | steps: |
|
51 | 57 | script: | |
52 | 58 | autogen --update-hol-light-bytecode --dry-run |
53 | 59 | hol_light_interactive: |
54 | | - name: HOL-Light interactive shell test |
| 60 | + name: AArch64 HOL-Light interactive shell test |
55 | 61 | runs-on: pqcp-arm64 |
56 | 62 | needs: [ hol_light_bytecode ] |
57 | 63 | if: github.repository_owner == 'pq-code-package' && !github.event.pull_request.head.repo.fork |
|
65 | 71 | nix-shell: 'hol_light' |
66 | 72 | script: | |
67 | 73 | make -C proofs/hol_light/arm mlkem/mlkem_poly_tobytes.o |
68 | | - echo 'needs "proofs/mlkem_poly_tobytes.ml";;' | hol.sh |
| 74 | + echo 'needs "arm/proofs/mlkem_poly_tobytes.ml";;' | hol.sh |
69 | 75 | hol_light_proofs: |
70 | 76 | needs: [ hol_light_bytecode ] |
71 | 77 | strategy: |
@@ -103,7 +109,7 @@ jobs: |
103 | 109 | needs: ["keccak_specs.ml"] |
104 | 110 | - name: keccak_f1600_x4_v8a_scalar |
105 | 111 | needs: ["keccak_specs.ml"] |
106 | | - name: HOL Light proof for ${{ matrix.proof.name }}.S |
| 112 | + name: AArch64 HOL Light proof for ${{ matrix.proof.name }}.S |
107 | 113 | runs-on: pqcp-arm64 |
108 | 114 | if: github.repository_owner == 'pq-code-package' && !github.event.pull_request.head.repo.fork |
109 | 115 | steps: |
@@ -142,3 +148,87 @@ jobs: |
142 | 148 | nix-shell: 'hol_light' |
143 | 149 | script: | |
144 | 150 | tests hol_light -p ${{ matrix.proof.name }} --verbose |
| 151 | +
|
| 152 | + # x86_64 proofs |
| 153 | + hol_light_bytecode_x86_64: |
| 154 | + name: x86_64 HOL-Light bytecode check |
| 155 | + runs-on: pqcp-x64 |
| 156 | + if: github.repository_owner == 'pq-code-package' && !github.event.pull_request.head.repo.fork |
| 157 | + steps: |
| 158 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 159 | + with: |
| 160 | + fetch-depth: 0 |
| 161 | + - uses: ./.github/actions/setup-shell |
| 162 | + with: |
| 163 | + gh_token: ${{ secrets.GITHUB_TOKEN }} |
| 164 | + nix-shell: 'hol_light' |
| 165 | + script: | |
| 166 | + autogen --update-hol-light-bytecode --dry-run |
| 167 | + hol_light_interactive_x86_64: |
| 168 | + name: x86_64 HOL-Light interactive shell test |
| 169 | + runs-on: pqcp-x64 |
| 170 | + needs: [ hol_light_bytecode_x86_64 ] |
| 171 | + if: github.repository_owner == 'pq-code-package' && !github.event.pull_request.head.repo.fork |
| 172 | + steps: |
| 173 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 174 | + with: |
| 175 | + fetch-depth: 0 |
| 176 | + - uses: ./.github/actions/setup-shell |
| 177 | + with: |
| 178 | + gh_token: ${{ secrets.GITHUB_TOKEN }} |
| 179 | + nix-shell: 'hol_light' |
| 180 | + script: | |
| 181 | + make -C proofs/hol_light/x86 mlkem/mlkem_poly_basemul_acc_montgomery_cached_k2.o |
| 182 | + echo 'needs "x86/proofs/mlkem_poly_basemul_acc_montgomery_cached_k2.ml";;' | hol.sh |
| 183 | + hol_light_proofs_x86_64: |
| 184 | + needs: [ hol_light_bytecode_x86_64 ] |
| 185 | + strategy: |
| 186 | + fail-fast: false |
| 187 | + matrix: |
| 188 | + proof: |
| 189 | + # Dependencies on {name}.{S,ml} are implicit |
| 190 | + - name: mlkem_poly_basemul_acc_montgomery_cached_k2 |
| 191 | + needs: ["mlkem_specs.ml"] |
| 192 | + - name: mlkem_poly_basemul_acc_montgomery_cached_k3 |
| 193 | + needs: ["mlkem_specs.ml"] |
| 194 | + - name: mlkem_poly_basemul_acc_montgomery_cached_k4 |
| 195 | + needs: ["mlkem_specs.ml"] |
| 196 | + name: x86_64 HOL Light proof for ${{ matrix.proof.name }}.S |
| 197 | + runs-on: pqcp-x64 |
| 198 | + if: github.repository_owner == 'pq-code-package' && !github.event.pull_request.head.repo.fork |
| 199 | + steps: |
| 200 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 201 | + with: |
| 202 | + fetch-depth: 0 |
| 203 | + - name: Get changed files |
| 204 | + id: changed-files |
| 205 | + uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0 |
| 206 | + - name: Check if dependencies changed |
| 207 | + id: check_run |
| 208 | + shell: bash |
| 209 | + run: | |
| 210 | + run_needed=0 |
| 211 | + changed_files="${{ steps.changed-files.outputs.all_changed_files }}" |
| 212 | + dependencies="${{ join(matrix.proof.needs, ' ') }} ${{ format('{0}.S {0}.ml', matrix.proof.name) }}" |
| 213 | + for changed in $changed_files; do |
| 214 | + for needs in $dependencies; do |
| 215 | + if [[ "$changed" == *"$needs" ]]; then |
| 216 | + run_needed=1 |
| 217 | + fi |
| 218 | + done |
| 219 | + done |
| 220 | +
|
| 221 | + # Always re-run upon change to nix files for HOL-Light |
| 222 | + if [[ "$changed_files" == *"nix/"* ]] || [[ "$changed_files" == *"hol_light.yml"* ]] || [[ "$changed_files" == *"flake"* ]] || [[ "$changed_files" == *"proofs/hol_light/x86/Makefile"* ]]; then |
| 223 | + run_needed=1 |
| 224 | + fi |
| 225 | +
|
| 226 | + echo "run_needed=${run_needed}" >> $GITHUB_OUTPUT |
| 227 | + - uses: ./.github/actions/setup-shell |
| 228 | + if: | |
| 229 | + steps.check_run.outputs.run_needed == '1' |
| 230 | + with: |
| 231 | + gh_token: ${{ secrets.GITHUB_TOKEN }} |
| 232 | + nix-shell: 'hol_light' |
| 233 | + script: | |
| 234 | + tests hol_light -p ${{ matrix.proof.name }} --verbose |
0 commit comments