Skip to content

Commit

Permalink
fix(ci): coverage currently ICE
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Apr 30, 2024
1 parent b129a11 commit f126096
Showing 1 changed file with 49 additions and 48 deletions.
97 changes: 49 additions & 48 deletions tools/rust/crane.nix
Original file line number Diff line number Diff line change
Expand Up @@ -335,53 +335,54 @@
in
craneLib.cargoClippy (attrs // { cargoArtifacts = craneLib.buildDepsOnly attrs; });

packages.rust-coverage =
let
craneLib = crane.lib.${system}.overrideToolchain rust.toolchains.dev;
in
craneLib.cargoLlvmCov {
pname = "workspace-cargo-llvm-cov";
version = "0.0.0";
cargoLlvmCovExtraArgs = lib.concatStringsSep " " [
"--workspace"
"--html"
"--output-dir=$out"
"--ignore-filename-regex='((nix/store)|(generated))/.+'"
"--exclude=zerg"
"--exclude=parse-wasm-client-type"
"--exclude=protos"
"--exclude=contracts"
"--exclude=unionvisor" # TODO: Figure out why unionvisor tests are flakey
"--exclude=tidy"
"--exclude=generate-rust-sol-bindings"
"--exclude=ensure-blocks"
"--exclude=ucli"
"--hide-instantiations"
];
SQLX_OFFLINE = true;
cargoArtifacts = craneLib.buildDepsOnly {
pname = "workspace-build-deps-only";
version = "0.0.0";
cargoExtraArgs = "--locked";
doCheck = false;

buildInputs = [ pkgs.pkg-config pkgs.openssl ] ++ (
lib.optionals pkgs.stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Security ]
);
src = cargoWorkspaceSrc;
};
preBuild = ''
cp --no-preserve=mode ${self'.packages.uniond}/bin/uniond $(pwd)/unionvisor/src/testdata/test_init_cmd/bundle/bins/genesis
echo 'patching testdata'
patchShebangs $(pwd)/unionvisor/src/testdata
'';
ICS23_TEST_SUITE_DATA_DIR = "${inputs.ics23}/testdata";
ETHEREUM_CONSENSUS_SPECS_DIR = "${inputs.ethereum-consensus-specs}";

buildInputs = [ pkgs.pkg-config pkgs.openssl ] ++ (
lib.optionals pkgs.stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Security ]
);
src = cargoWorkspaceSrc;
};
# FIXME: currently ICE, https://github.com/unionlabs/union/actions/runs/8882618404/job/24387814904
# packages.rust-coverage =
# let
# craneLib = crane.lib.${system}.overrideToolchain rust.toolchains.dev;
# in
# craneLib.cargoLlvmCov {
# pname = "workspace-cargo-llvm-cov";
# version = "0.0.0";
# cargoLlvmCovExtraArgs = lib.concatStringsSep " " [
# "--workspace"
# "--html"
# "--output-dir=$out"
# "--ignore-filename-regex='((nix/store)|(generated))/.+'"
# "--exclude=zerg"
# "--exclude=parse-wasm-client-type"
# "--exclude=protos"
# "--exclude=contracts"
# "--exclude=unionvisor" # TODO: Figure out why unionvisor tests are flakey
# "--exclude=tidy"
# "--exclude=generate-rust-sol-bindings"
# "--exclude=ensure-blocks"
# "--exclude=ucli"
# "--hide-instantiations"
# ];
# SQLX_OFFLINE = true;
# cargoArtifacts = craneLib.buildDepsOnly {
# pname = "workspace-build-deps-only";
# version = "0.0.0";
# cargoExtraArgs = "--locked";
# doCheck = false;

# buildInputs = [ pkgs.pkg-config pkgs.openssl ] ++ (
# lib.optionals pkgs.stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Security ]
# );
# src = cargoWorkspaceSrc;
# };
# preBuild = ''
# cp --no-preserve=mode ${self'.packages.uniond}/bin/uniond $(pwd)/unionvisor/src/testdata/test_init_cmd/bundle/bins/genesis
# echo 'patching testdata'
# patchShebangs $(pwd)/unionvisor/src/testdata
# '';
# ICS23_TEST_SUITE_DATA_DIR = "${inputs.ics23}/testdata";
# ETHEREUM_CONSENSUS_SPECS_DIR = "${inputs.ethereum-consensus-specs}";

# buildInputs = [ pkgs.pkg-config pkgs.openssl ] ++ (
# lib.optionals pkgs.stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Security ]
# );
# src = cargoWorkspaceSrc;
# };
};
}

0 comments on commit f126096

Please sign in to comment.