Skip to content

Commit 685d31a

Browse files
authored
Remove CCACHE_PREFIX_CPP (#41539)
This causes bad builds: cpp compilation reuses object files when headers change, which results in wrong code compiled.
1 parent 1e7b23a commit 685d31a

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/actions/setup-ccache/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ runs:
2424
steps:
2525
- name: Configure ccache
2626
uses: pyTooling/Actions/[email protected]
27+
# NOTE: the following was REMOVED because it causes invalid cache re-uses.
28+
# We observed changed headers not being detected in cpp file rebuilds and
29+
# caches being re-used when they should not be.
30+
# echo "CCACHE_PREFIX_CPP=${{ github.workspace }}/scripts/helpers/ccache-prefix-cpp.sh" >> $GITHUB_ENV
2731
with:
2832
main: |
2933
mkdir -p .ccache
3034
echo "CCACHE_NOHASHDIR=1" >> $GITHUB_ENV
3135
echo "CCACHE_BASEDIR=${{ github.workspace }}" >> $GITHUB_ENV
32-
echo "CCACHE_PREFIX_CPP=${{ github.workspace }}/scripts/helpers/ccache-prefix-cpp.sh" >> $GITHUB_ENV
3336
echo "CCACHE_SLOPPINESS=time_macros" >> $GITHUB_ENV
3437
echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> $GITHUB_ENV
3538
echo "CCACHE_COMPILERCHECK=content" >> $GITHUB_ENV

.github/workflows/examples-linux-arm.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ concurrency:
2929
env:
3030
CCACHE_NOHASHDIR: 1
3131
CCACHE_BASEDIR: ${{ github.workspace }}
32-
CCACHE_PREFIX_CPP: ${{ github.workspace }}/scripts/helpers/ccache-prefix-cpp.sh
32+
# Disabled as this seems to cause invalid cache re-uses
33+
# CCACHE_PREFIX_CPP: ${{ github.workspace }}/scripts/helpers/ccache-prefix-cpp.sh
3334
CHIP_NO_LOG_TIMESTAMPS: true
3435
CHIP_PW_COMMAND_LAUNCHER: ccache
3536

.github/workflows/examples-linux-standalone.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ concurrency:
2929
env:
3030
CCACHE_NOHASHDIR: 1
3131
CCACHE_BASEDIR: ${{ github.workspace }}
32-
CCACHE_PREFIX_CPP: ${{ github.workspace }}/scripts/helpers/ccache-prefix-cpp.sh
32+
# Disabled as this seems to cause invalid cache re-uses
33+
# CCACHE_PREFIX_CPP: ${{ github.workspace }}/scripts/helpers/ccache-prefix-cpp.sh
3334
CHIP_NO_LOG_TIMESTAMPS: true
3435
CHIP_PW_COMMAND_LAUNCHER: ccache
3536

0 commit comments

Comments
 (0)