diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-21 11:47:17 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-21 11:47:17 +0000 |
| commit | a46e9615791d23e812d324523d87fe2320f703fd (patch) | |
| tree | ac7fa9a274aac456e1103a7c7cf19de2b451664d /.github | |
| parent | 8740502929449912a2f76f99aed33bd2ad54e064 (diff) | |
ci(macos): cache the static LLD build
Restore only an exact match for the runner image, SDK, LLVM version,
compiler/library contents, workspace and helper script. Always run the
existing helper after restoration to configure, build and install LLD.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/nightly-build.yml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 371353c..4b3561a 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -151,6 +151,30 @@ jobs: exit 1 fi + - name: Identify the static LLD toolchain + id: lld-cache-key + run: | + llvm_prefix=$(brew --prefix llvm@23) + llvm_version=$("$llvm_prefix/bin/llvm-config" --version) + { + printf '%s\n' "${ImageVersion:?}" "$llvm_prefix" "$llvm_version" "$PWD" + brew list --versions llvm@23 + xcrun --show-sdk-path + xcrun --show-sdk-version + xcrun --show-sdk-build-version + shasum -a 256 "$llvm_prefix/bin/clang" "$llvm_prefix/lib/libclangDriver.a" \ + "$llvm_prefix"/lib/libLLVM*.dylib + } > "$RUNNER_TEMP/static-lld-toolchain.txt" + fingerprint=$(shasum -a 256 "$RUNNER_TEMP/static-lld-toolchain.txt" | cut -d ' ' -f 1) + echo "fingerprint=$fingerprint" >> "$GITHUB_OUTPUT" + echo "path=build/static-lld-$llvm_version" >> "$GITHUB_OUTPUT" + + - name: Cache the matching static LLD build + uses: actions/cache@v6.1.0 + with: + path: ${{ steps.lld-cache-key.outputs.path }} + key: ${{ runner.os }}-${{ runner.arch }}-static-lld-v1-${{ steps.lld-cache-key.outputs.fingerprint }}-${{ hashFiles('tools/build-static-lld.sh') }} + - name: Build matching static LLD libraries run: | sh tools/build-static-lld.sh "$(brew --prefix llvm@23)" "$PWD/build" 3 |
