mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-23 04:39:04 +00:00
ci: align cache writer and reader keys (#6398)
This commit is contained in:
@@ -94,6 +94,9 @@ concurrency:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
# Swatinem/rust-cache hashes every RUST* variable. Keep this aligned with
|
||||
# ci.yml or the writer and readers use disjoint cache keys.
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
# Readers: test-and-lint, test-ilm-integration-serial, build-rustfs-debug-binary,
|
||||
@@ -101,7 +104,7 @@ jobs:
|
||||
warm-ci-dev:
|
||||
name: Warm ci-dev
|
||||
runs-on: sm-standard-4
|
||||
timeout-minutes: 90
|
||||
timeout-minutes: 120
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
||||
steps:
|
||||
@@ -191,7 +194,7 @@ jobs:
|
||||
warm-ci-feat-rio:
|
||||
name: Warm ci-feat-rio
|
||||
runs-on: sm-standard-4
|
||||
timeout-minutes: 90
|
||||
timeout-minutes: 120
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
||||
steps:
|
||||
@@ -219,7 +222,7 @@ jobs:
|
||||
warm-ci-feat-proto:
|
||||
name: Warm ci-feat-proto
|
||||
runs-on: sm-standard-4
|
||||
timeout-minutes: 90
|
||||
timeout-minutes: 120
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
||||
steps:
|
||||
|
||||
@@ -64,3 +64,25 @@ if [ "$status" -ne 0 ]; then
|
||||
fi
|
||||
|
||||
echo "OK: every ./.github/actions/setup call states cache-save-if explicitly"
|
||||
|
||||
# rust-cache hashes every CARGO*, CC*, CFLAGS*, CXX*, CMAKE*, and RUST*
|
||||
# variable that is present when the setup action runs. The dedicated writer
|
||||
# and the CI readers therefore need identical workflow-level compiler env.
|
||||
compiler_env() {
|
||||
awk '
|
||||
/^env:[[:space:]]*$/ { in_env = 1; next }
|
||||
in_env && /^[^[:space:]]/ { exit }
|
||||
in_env && /^ (CARGO|CC|CFLAGS|CXX|CMAKE|RUST)[A-Z0-9_]*:/ { print }
|
||||
' "$1" | sort
|
||||
}
|
||||
|
||||
ci_env="$(compiler_env .github/workflows/ci.yml)"
|
||||
warm_env="$(compiler_env .github/workflows/cache-warm.yml)"
|
||||
|
||||
if [ "$ci_env" != "$warm_env" ]; then
|
||||
echo "CI and cache-warm compiler environments differ; rust-cache keys will not match:" >&2
|
||||
diff -u <(printf '%s\n' "$ci_env") <(printf '%s\n' "$warm_env") >&2 || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "OK: cache-warm and CI compiler environments match"
|
||||
|
||||
Reference in New Issue
Block a user