fix: ensure SCCACHE_GHA_ENABLED is set to 'true' or 'false' based on input

This commit is contained in:
mr. M
2025-04-01 19:51:17 +02:00
parent b4269b9001
commit aa673cc361
4 changed files with 11 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ jobs:
matrix:
arch: [x86_64, aarch64]
env:
SCCACHE_GHA_ENABLED: ${ inputs.use-sccache }
SCCACHE_GHA_ENABLED: ${ inputs.use-sccache && 'true' || 'false' }
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: ${ inputs.use-sccache && 'sccache' || '' }
CARGO_INCREMENTAL: 0

View File

@@ -31,7 +31,7 @@ jobs:
matrix:
arch: [x86_64, aarch64]
env:
SCCACHE_GHA_ENABLED: ${ inputs.use-sccache }
SCCACHE_GHA_ENABLED: ${ inputs.use-sccache && 'true' || 'false' }
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: ${ inputs.use-sccache && 'sccache' || '' }
CARGO_INCREMENTAL: 0

View File

@@ -34,7 +34,7 @@ jobs:
# aarch64 does not need full 16x, and we also dont use full LTO when generating GPO
runs-on: ${{ (inputs.release-branch == 'release' && !inputs.generate-gpo && matrix.arch == 'x86_64') && 'self-hosted' || 'ubuntu-latest' }}
env:
SCCACHE_GHA_ENABLED: ${ inputs.use-sccache }
SCCACHE_GHA_ENABLED: ${ inputs.use-sccache && 'true' || 'false' }
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: ${ inputs.use-sccache && 'sccache' || '' }
CARGO_INCREMENTAL: 0
@@ -156,7 +156,7 @@ jobs:
aria2
echo Setup wine
aria2c "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.cache.level-1.toolchains.v3.linux64-wine.latest/artifacts/public%2Fbuild%2Fwine.tar.zst" -o wine.tar.zst
tar --zstd -xvf wine.tar.zst -C ~/win-cross
tar --zstd -xf wine.tar.zst -C ~/win-cross
rm wine.tar.zst
echo Setup Visual Studio
./mach python --virtualenv build taskcluster/scripts/misc/get_vs.py build/vs/vs2022.yaml ~/win-cross/vs2022

View File

@@ -23,10 +23,13 @@ export MOZ_INCLUDE_SOURCE_INFO=1
ac_add_options --enable-application=browser
if test -x "$(command -v sccache)"; then
ac_add_options --with-ccache=sccache
elif test -f "$HOME/.mozbuild/sccache/sccache"; then
ac_add_options --with-ccache="$HOME"/.mozbuild/sccache/sccache
# Anything except 'SCCACHE_GHA_ENABLED == false'
if ! test "$SCCACHE_GHA_ENABLED" = "false"; then
if test -x "$(command -v sccache)"; then
ac_add_options --with-ccache=sccache
elif test -f "$HOME/.mozbuild/sccache/sccache"; then
ac_add_options --with-ccache="$HOME"/.mozbuild/sccache/sccache
fi
fi
if test "$ZEN_RELEASE"; then