Skip to content

Commit

Permalink
ci: forbid compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Apr 23, 2024
1 parent c97d72f commit 7a50094
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@
};
craneArgs = {
src = cleanedUpSrc;
cargoArtifacts = craneLib.buildDepsOnly { src = cleanedUpSrc; };
RUSTFLAGS="-D warnings"; # Turn all warnings into errors.
};

charon = craneLib.buildPackage (craneArgs // {
# It's important to pass the same `RUSTFLAGS` to dependencies otherwise we'll have to rebuild them.
cargoArtifacts = craneLib.buildDepsOnly craneArgs;
# Check the `ui_llbc` files are correct instead of overwriting them.
cargoTestCommand = "IN_CI=1 cargo test --profile release";
});
Expand Down Expand Up @@ -190,6 +192,7 @@
pname = "charon";
version = "0.1.0";
duneVersion = "3";
OCAMLPARAM="_,warn-error=+A"; # Turn all warnings into errors.
preCheck = if doCheck then ''
mkdir -p tests/serialized
cp ${tests}/llbc/* tests/serialized
Expand Down

0 comments on commit 7a50094

Please sign in to comment.