18
18
type : choice
19
19
options :
20
20
- ubuntu-22.04
21
+ - ubuntu-22.04-arm
21
22
- macos-13
22
23
- macos-14
23
24
55
56
ref : ${{ steps.vars.outputs.ref }}
56
57
upload : ${{ steps.vars.outputs.upload }}
57
58
target-cmake-flags : ${{ steps.vars.outputs.target-cmake-flags }}
59
+ ccache : ${{ steps.vars.outputs.ccache }}
58
60
build-flang : ${{ steps.vars.outputs.build-flang }}
59
61
enable-pgo : ${{ steps.vars.outputs.enable-pgo }}
60
62
release-binary-basename : ${{ steps.vars.outputs.release-binary-basename }}
@@ -119,8 +121,16 @@ jobs:
119
121
echo "release-binary-basename=$release_binary_basename" >> $GITHUB_OUTPUT
120
122
echo "release-binary-filename=$release_binary_basename.tar.xz" >> $GITHUB_OUTPUT
121
123
122
- # Detect necessary CMake flags
123
124
target="$RUNNER_OS-$RUNNER_ARCH"
125
+ # The hendrikmuhs/ccache-action action does not support installing sccache
126
+ # on arm64 Linux.
127
+ if [ "$target" = "Linux-ARM64" ]; then
128
+ echo ccache=ccache >> $GITHUB_OUTPUT
129
+ else
130
+ echo ccache=sccache >> $GITHUB_OUTPUT
131
+ fi
132
+
133
+ # Detect necessary CMake flags
124
134
echo "enable-pgo=false" >> $GITHUB_OUTPUT
125
135
target_cmake_flags="-DLLVM_RELEASE_ENABLE_PGO=OFF"
126
136
# The macOS builds try to cross compile some libraries so we need to
@@ -146,7 +156,7 @@ jobs:
146
156
echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
147
157
echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
148
158
case "${{ inputs.runs-on }}" in
149
- ubuntu-22.04)
159
+ ubuntu-22.04* )
150
160
build_runs_on="depot-${{ inputs.runs-on }}-16"
151
161
test_runs_on=$build_runs_on
152
162
;;
@@ -221,12 +231,14 @@ jobs:
221
231
with :
222
232
# Default to 2G to workaround: https://github.com/hendrikmuhs/ccache-action/issues/174
223
233
max-size : 2G
224
- key : sccache -${{ runner.os }}-${{ runner.arch }}-release
225
- variant : sccache
234
+ key : ${{ needs.prepare.outputs.ccache }} -${{ runner.os }}-${{ runner.arch }}-release
235
+ variant : ${{ needs.prepare.outputs.ccache }}
226
236
227
237
- name : Configure
228
238
id : build
229
239
shell : bash
240
+ env :
241
+ CCACHE_BIN : ${{ needs.prepare.outputs.ccache }}
230
242
run : |
231
243
# There were some issues on the ARM64 MacOS runners with trying to build x86 object,
232
244
# so we need to set some extra cmake flags to disable this.
@@ -235,8 +247,8 @@ jobs:
235
247
-C clang/cmake/caches/Release.cmake \
236
248
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
237
249
-DBOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}" \
238
- -DCMAKE_C_COMPILER_LAUNCHER=sccache \
239
- -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
250
+ -DCMAKE_C_COMPILER_LAUNCHER=$CCACHE_BIN \
251
+ -DCMAKE_CXX_COMPILER_LAUNCHER=$CCACHE_BIN
240
252
- name : Build
241
253
shell : bash
242
254
run : |
0 commit comments