Skip to content

Commit 47123c5

Browse files
authored
Merge pull request #167 from ifd3f/fix/lockfile-checks
Ensure lockfiles are up-to-date in CI scripts
2 parents 7039418 + 00dcdf6 commit 47123c5

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

nix/cross-helpers.nix

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ in rec {
3232
supportedSystems = if hostInfo.kernel.name == "linux" then [
3333
"aarch64-linux"
3434
"x86_64-linux"
35-
] else if host == "x86_64-darwin" then [
36-
# "aarch64-darwin" # Temporarily broken. TODO: fix
37-
"x86_64-darwin"
38-
] else if host == "aarch64-darwin" then
35+
] else if host == "x86_64-darwin" then
36+
[
37+
# "aarch64-darwin" # Temporarily broken. TODO: fix
38+
"x86_64-darwin"
39+
]
40+
else if host == "aarch64-darwin" then
3941
[ "aarch64-darwin" ]
4042
else
4143
throw "unsupported host system ${host}";
@@ -85,8 +87,9 @@ in rec {
8587

8688
crossParams = if host == target then {
8789
cc = pkgs.stdenv.cc;
88-
extraBuildEnv = {
89-
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
90+
extraBuildEnv = {
91+
RUST_SRC_PATH =
92+
"${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
9093
};
9194
} else rec {
9295
cc = pkgsCross.stdenv.cc;
@@ -107,6 +110,7 @@ in rec {
107110
doCheck = host == target;
108111
propagatedBuildInputs = [ crossParams.cc ];
109112
inherit buildInputs;
113+
cargoBuildOptions = args: args ++ [ "--locked" ];
110114
CARGO_BUILD_TARGET = buildCfg.rustTarget;
111115
} // crossParams.extraBuildEnv);
112116

scripts/set-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ sed -i "$sedcmd" "$cargotoml"
2020

2121
git add "$cargotoml"
2222
git commit -m "bump version to v$version"
23-
23+
cargo lock

0 commit comments

Comments
 (0)