Skip to content

Commit 5de224f

Browse files
authored
Merge pull request #440 from pq-code-package/clang21
Add clang 21 to compiler and constant-time tests
2 parents d0e5eba + aac86d2 commit 5de224f

File tree

6 files changed

+23
-9
lines changed

6 files changed

+23
-9
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ jobs:
219219
c23: True
220220
opt: all
221221
examples: False
222+
- name: clang-21
223+
shell: ci_clang21
224+
darwin: True
225+
c17: True
226+
c23: True
227+
opt: all
228+
examples: False
222229
# CPU flags are not correctly passed to the zig assembler
223230
# https://github.com/ziglang/zig/issues/23576
224231
# We therefore only test the C backend

.github/workflows/ct-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- ci_valgrind-varlat_clang18
2929
- ci_valgrind-varlat_clang19
3030
- ci_valgrind-varlat_clang20
31+
- ci_valgrind-varlat_clang21
3132
- ci_valgrind-varlat_gcc48
3233
- ci_valgrind-varlat_gcc49
3334
- ci_valgrind-varlat_gcc7
@@ -64,7 +65,7 @@ jobs:
6465
valgrind_flags: --variable-latency-errors=yes
6566
- name: Build and run test (-Ofast)
6667
# -Ofast got deprecated in clang19; -O3 -ffast-math should be used instead
67-
if: ${{ matrix.nix-shell != 'ci_valgrind-varlat_clang19' && matrix.nix-shell != 'ci_valgrind-varlat_clang20' }}
68+
if: ${{ matrix.nix-shell != 'ci_valgrind-varlat_clang19' && matrix.nix-shell != 'ci_valgrind-varlat_clang20' && matrix.nix-shell != 'ci_valgrind-varlat_clang21'}}
6869
uses: ./.github/actions/ct-test
6970
with:
7071
cflags: -Ofast -DMLD_CONFIG_KEYGEN_PCT

.github/workflows/nix.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,15 @@ jobs:
8888
fail-fast: false
8989
matrix:
9090
target:
91+
# nixpkgs requires 2.18 since August 2025, see
92+
# https://github.com/NixOS/nixpkgs/pull/428076
93+
# TODO: Re-enable tests on Ubuntu 22 once nix has been updated to >= 2.18
94+
# - runner: ubuntu-22.04
95+
# container:
96+
# install: 'apt'
9197
- runner: ubuntu-latest
92-
container: nixos/nix:2.6.1
98+
container: nixos/nix:2.18.0
9399
install: 'native'
94-
- runner: ubuntu-22.04
95-
container:
96-
install: 'apt'
97100
- runner: ubuntu-24.04
98101
container:
99102
install: 'apt'

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ any of the open issues. Here are some things to get you started.
99

1010
We specify the development environment for mldsa-native using `nix`. If you want to help develop mldsa-native, please
1111
use `nix`. We recommend using the latest Nix version provided by the [nix installer
12-
script](https://nixos.org/download/), but we currently support all Nix versions >= 2.6.
12+
script](https://nixos.org/download/), but we currently support all Nix versions >= 2.18.
1313

1414
All the development and build dependencies are specified in [flake.nix](flake.nix). To execute a bash shell, run
1515
```bash

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
gcc48 = pkgs-2405.gcc48;
5353
gcc49 = pkgs-2405.gcc49;
5454
gcc7 = pkgs-2405.gcc7;
55+
clang_21 = pkgs-unstable.clang_21;
5556
})
5657
];
5758
};
@@ -106,6 +107,7 @@
106107
devShells.ci_clang18 = util.mkShellWithCC' pkgs.clang_18;
107108
devShells.ci_clang19 = util.mkShellWithCC' pkgs.clang_19;
108109
devShells.ci_clang20 = util.mkShellWithCC' pkgs.clang_20;
110+
devShells.ci_clang21 = util.mkShellWithCC' pkgs.clang_21;
109111

110112
devShells.ci_zig0_12 = util.mkShellWithCC' (zigWrapCC pkgs.zig_0_12);
111113
devShells.ci_zig0_13 = util.mkShellWithCC' (zigWrapCC pkgs.zig_0_13);
@@ -128,6 +130,7 @@
128130
devShells.ci_valgrind-varlat_clang18 = util.mkShellWithCC_valgrind' pkgs.clang_18;
129131
devShells.ci_valgrind-varlat_clang19 = util.mkShellWithCC_valgrind' pkgs.clang_19;
130132
devShells.ci_valgrind-varlat_clang20 = util.mkShellWithCC_valgrind' pkgs.clang_20;
133+
devShells.ci_valgrind-varlat_clang21 = util.mkShellWithCC_valgrind' pkgs.clang_21;
131134
devShells.ci_valgrind-varlat_gcc48 = util.mkShellWithCC_valgrind' pkgs.gcc48;
132135
devShells.ci_valgrind-varlat_gcc49 = util.mkShellWithCC_valgrind' pkgs.gcc49;
133136
devShells.ci_valgrind-varlat_gcc7 = util.mkShellWithCC_valgrind' pkgs.gcc7;

0 commit comments

Comments
 (0)