Skip to content

Commit 13d56d5

Browse files
committed
ci(cache): revert YAML anchors in composite actions — GHA rejects them
Run 24745149414 failed at action-load time with: /home/runner/.../.github/actions/build-llvm/action.yml: Anchors are not currently supported. Remove the anchor 'ccache-llvm-env' GHA's composite-action manifest loader (ActionManifestManagerLegacy) explicitly rejects YAML anchors, independent of whether the underlying YAML library supports them (PyYAML parses these fine; the workflow parser apparently also does — only action.yml is restricted). Restore the explicit duplicated CCACHE_* env blocks on the Build and Show-ccache-stats steps in build-llvm/action.yml and build-solc/action.yml, with a comment noting why we can't dedupe.
1 parent 5333594 commit 13d56d5

2 files changed

Lines changed: 28 additions & 12 deletions

File tree

.github/actions/build-llvm/action.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,14 @@ runs:
120120
# sccache is broken with cmake+ninja+clang on MSYS2/Windows
121121
# (https://github.com/mozilla/sccache/issues/1097). Using ccache everywhere.
122122
#
123-
# The &ccache-llvm-env anchor keeps this block in sync with the Build LLVM
124-
# and Show ccache stats steps — composite-action sibling steps don't share
125-
# env, so we'd otherwise duplicate four variables three times.
123+
# The four CCACHE_* env vars below are duplicated on the Build LLVM and
124+
# Show ccache stats steps. YAML anchors/merge-keys would dedupe but GHA's
125+
# composite-action manifest loader rejects anchors — keep them in sync by
126+
# hand.
126127
- name: Set up compiler cache
127128
if: steps.llvm-artifact-cache.outputs.cache-hit != 'true'
128129
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.14
129-
env: &ccache-llvm-env
130+
env:
130131
CCACHE_DIR: ${{ runner.temp }}/ccache-llvm
131132
CCACHE_BASEDIR: ${{ github.workspace }}
132133
CCACHE_NOHASHDIR: "true"
@@ -144,7 +145,10 @@ runs:
144145
shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }}
145146
working-directory: ${{ inputs.working-dir }}
146147
env:
147-
<<: *ccache-llvm-env
148+
CCACHE_DIR: ${{ runner.temp }}/ccache-llvm
149+
CCACHE_BASEDIR: ${{ github.workspace }}
150+
CCACHE_NOHASHDIR: "true"
151+
CCACHE_COMPILERCHECK: "content"
148152
VERBOSE: 1
149153
LIBSTDCPP_SOURCE_PATH: "${{ runner.temp }}/msys64/mingw64/lib/libstdc++.a"
150154
run: |
@@ -171,7 +175,11 @@ runs:
171175
if: always() && steps.llvm-artifact-cache.outputs.cache-hit != 'true'
172176
continue-on-error: true
173177
shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }}
174-
env: *ccache-llvm-env
178+
env:
179+
CCACHE_DIR: ${{ runner.temp }}/ccache-llvm
180+
CCACHE_BASEDIR: ${{ github.workspace }}
181+
CCACHE_NOHASHDIR: "true"
182+
CCACHE_COMPILERCHECK: "content"
175183
run: ccache --show-stats
176184

177185
- name: Save LLVM artifact cache

.github/actions/build-solc/action.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@ runs:
6767
# matches the LLVM pattern and blocks future prefix-collision if more
6868
# dimensions are added.
6969
#
70-
# The &ccache-solc-env anchor keeps this block in sync with the Build solc
71-
# and Show ccache stats steps — composite-action sibling steps don't share
72-
# env, so we'd otherwise duplicate four variables three times.
70+
# The four CCACHE_* env vars below are duplicated on the Build solc and
71+
# Show ccache stats steps. YAML anchors/merge-keys would dedupe but GHA's
72+
# composite-action manifest loader rejects anchors — keep them in sync by
73+
# hand.
7374
- name: Set up compiler cache for solc
7475
if: steps.solc-artifact-cache.outputs.cache-hit != 'true'
7576
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.14
76-
env: &ccache-solc-env
77+
env:
7778
CCACHE_DIR: ${{ runner.temp }}/ccache-solc
7879
CCACHE_BASEDIR: ${{ github.workspace }}
7980
CCACHE_NOHASHDIR: "true"
@@ -92,7 +93,10 @@ runs:
9293
working-directory: ${{ inputs.working-dir }}/..
9394
shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }}
9495
env:
95-
<<: *ccache-solc-env
96+
CCACHE_DIR: ${{ runner.temp }}/ccache-solc
97+
CCACHE_BASEDIR: ${{ github.workspace }}
98+
CCACHE_NOHASHDIR: "true"
99+
CCACHE_COMPILERCHECK: "content"
96100
CXXFLAGS: "-Wno-narrowing"
97101
run: |
98102
set -x
@@ -108,7 +112,11 @@ runs:
108112
if: always() && steps.solc-artifact-cache.outputs.cache-hit != 'true'
109113
continue-on-error: true
110114
shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }}
111-
env: *ccache-solc-env
115+
env:
116+
CCACHE_DIR: ${{ runner.temp }}/ccache-solc
117+
CCACHE_BASEDIR: ${{ github.workspace }}
118+
CCACHE_NOHASHDIR: "true"
119+
CCACHE_COMPILERCHECK: "content"
112120
run: ccache --show-stats
113121

114122
- name: Save solc artifact cache

0 commit comments

Comments
 (0)