fix(ci): invalidate relocated test fingerprints
This commit is contained in:
@@ -91,6 +91,7 @@ jobs:
|
||||
if test -n "$previous_target"; then
|
||||
cp -al "$previous_target" "$cargo_target"
|
||||
rm -f -- "$cargo_target/.metacrate-ready"
|
||||
touch "$cargo_target/.metacrate-cloned"
|
||||
else
|
||||
mkdir -p "$cargo_target"
|
||||
fi
|
||||
@@ -101,6 +102,7 @@ jobs:
|
||||
fi
|
||||
done < <(find "$cargo_cache_root" -mindepth 1 -maxdepth 1 -type d -name 'target-rust-1.97.1-aarch64-unknown-linux-gnu-*' -print0)
|
||||
) 9>"$cargo_cache_root/required-target.lock"
|
||||
test -f "$cargo_target/.metacrate-cloned" && cloned_target=true || cloned_target=false
|
||||
test -f "$cargo_target/.metacrate-ready" && cargo_hit=true || cargo_hit=false
|
||||
test -d "$CARGO_HOME/registry/cache" && dependency_hit=true || dependency_hit=false
|
||||
test -f "$openjpeg_prefix/metacrate-openjpeg.identity" && test -f "$skia_archive" && native_hit=true || native_hit=false
|
||||
@@ -114,6 +116,7 @@ jobs:
|
||||
echo "METACRATE_DEPENDENCY_CACHE_HIT=$dependency_hit" >> "$GITHUB_ENV"
|
||||
echo "METACRATE_NATIVE_CACHE_HIT=$native_hit" >> "$GITHUB_ENV"
|
||||
echo "METACRATE_TOOLS_CACHE_HIT=$tools_hit" >> "$GITHUB_ENV"
|
||||
echo "METACRATE_CARGO_TARGET_CLONED=$cloned_target" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Install the single native prerequisite set
|
||||
run: |
|
||||
@@ -157,6 +160,22 @@ jobs:
|
||||
python3 tools/normalize_git_mtimes.py --self-test
|
||||
python3 tools/normalize_git_mtimes.py --state "$CARGO_TARGET_DIR/.metacrate-mtimes.json"
|
||||
python3 tools/normalize_git_mtimes.py --state "$CARGO_TARGET_DIR/.metacrate-mtimes.json" --check
|
||||
# Cargo does not fingerprint CARGO_TARGET_DIR in integration-test
|
||||
# binaries. Invalidate only the relocated program integration-test
|
||||
# fingerprints so CARGO_BIN_EXE_* cannot name the pruned directory.
|
||||
if test "$METACRATE_CARGO_TARGET_CLONED" = true; then
|
||||
fingerprint_root="$CARGO_TARGET_DIR/debug/.fingerprint"
|
||||
fingerprint_list="$CARGO_TARGET_DIR/.metacrate-relocated-fingerprints"
|
||||
if test -d "$fingerprint_root"; then
|
||||
find "$fingerprint_root" -mindepth 2 -maxdepth 2 -type f \
|
||||
-path '*/libremetaverse-programs-*/*' \
|
||||
-name 'test-integration-test-*' -printf '%h\0' > "$fingerprint_list"
|
||||
while IFS= read -r -d '' integration_fingerprint; do
|
||||
rm -rf -- "$integration_fingerprint"
|
||||
done < "$fingerprint_list"
|
||||
fi
|
||||
rm -f -- "$fingerprint_list" "$CARGO_TARGET_DIR/.metacrate-cloned"
|
||||
fi
|
||||
cargo run --locked -p metacrate-ci-matrix -- required-gate --evidence artifacts/ci/required-gate.json
|
||||
touch "$CARGO_TARGET_DIR/.metacrate-ready"
|
||||
) 9>"$cache_lock"
|
||||
|
||||
Reference in New Issue
Block a user