Skip to content

Commit

Permalink
Don't just build packages, also run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Nov 20, 2024
1 parent e7f30d1 commit 07d6f5b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: nightly
- run: nix build -L --no-link ".#hax"
- run: ./check.sh hax

charon:
needs: update-flake
Expand All @@ -77,7 +77,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: nightly
- run: nix build -L --no-link ".#charon"
- run: ./check.sh charon

eurydice:
needs: update-flake
Expand All @@ -87,7 +87,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: nightly
- run: nix build -L --no-link ".#eurydice"
- run: ./check.sh eurydice

ml-kem:
needs: update-flake
Expand All @@ -97,7 +97,7 @@ jobs:
with:
ref: nightly
uses: actions/checkout@v4
- run: nix build -L --no-link ".#ml-kem"
- run: ./check.sh ml-kem

bertie:
needs: update-flake
Expand All @@ -107,7 +107,7 @@ jobs:
with:
ref: nightly
uses: actions/checkout@v4
- run: nix build -L --no-link ".#bertie"
- run: ./check.sh bertie

process_results:
needs: [hax, charon, eurydice, ml-kem, bertie]
Expand Down
2 changes: 2 additions & 0 deletions check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
nix build -L --no-link ".#checks.$(uname -m)-linux.$1"
18 changes: 12 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,28 @@
};
};

outputs =
inputs:
inputs.flake-utils.lib.eachDefaultSystem (system: {
packages = rec {
outputs = inputs:
inputs.flake-utils.lib.eachDefaultSystem (system: rec {
packages = {
hax = inputs.hax.packages.${system}.hax;
charon = inputs.charon.packages.${system}.default;
eurydice = inputs.eurydice.packages.${system}.default;
ml-kem = inputs.libcrux.packages.${system}.ml-kem.override {
cargoLock = ./libcrux-Cargo.lock;
};
bertie = inputs.bertie.packages.${system}.default;
inherit inputs;
};
checks = rec {
hax = inputs.hax.checks.${system}.toolchain;
charon = inputs.charon.checks.${system}.charon-ml-checks;
eurydice = inputs.eurydice.checks.${system}.default;
ml-kem = packages.ml-kem;
ml-kem-small = ml-kem.override {
checkHax = false;
runBenchmarks = false;
};
bertie = inputs.bertie.packages.${system}.default;
inherit inputs;
bertie = packages.bertie;
};
});
}

0 comments on commit 07d6f5b

Please sign in to comment.