From 0c7d3d3280f20dca40311ec08e920e4a61acb5e9 Mon Sep 17 00:00:00 2001 From: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> Date: Fri, 20 Nov 2026 09:50:00 -0800 Subject: [PATCH] Build the macOS .NET native library on the self-hosted Macs The hosted macos-15 runner fails in ci-setup-workflow, which clones Homebrew into ~/.homebrew. That directory already exists on the image without a brew binary. The self-hosted Macs already run the action in the build jobs, so the release build uses them too and installs clang the same way. Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> --- .github/workflows/CreateRelease.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 09dd90d0..d24b100f 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -22,17 +22,23 @@ jobs: strategy: matrix: rid: [linux-x64, win-x64, osx-arm64] - runs-on: ${{ matrix.rid == 'win-x64' && fromJSON(format('["self-hosted", "Windows", "X64", "1ES.Pool=hld-win2025-amd", "JobId=dotnet-native-{0}-{1}-{2}"]', github.run_id, github.run_number, github.run_attempt)) || matrix.rid == 'osx-arm64' && 'macos-15' || 'ubuntu-24.04' }} + runs-on: ${{ matrix.rid == 'win-x64' && fromJSON(format('["self-hosted", "Windows", "X64", "1ES.Pool=hld-win2025-amd", "JobId=dotnet-native-{0}-{1}-{2}"]', github.run_id, github.run_number, github.run_attempt)) || matrix.rid == 'osx-arm64' && fromJSON('["self-hosted", "macos", "arm64", "hvf"]') || 'ubuntu-24.04' }} steps: - uses: actions/checkout@v5 - name: Hyperlight setup uses: hyperlight-dev/ci-setup-workflow@v2.3.1 with: just-version: 1.59.0 - # The runner image ships LLVM 18, the version the Linux setup installs. - - name: Use LLVM 18 (macOS) + - name: Install clang tools (macOS) if: runner.os == 'macOS' - run: echo /opt/homebrew/opt/llvm@18/bin >> "$GITHUB_PATH" + env: + HOMEBREW_NO_AUTO_UPDATE: "1" + HOMEBREW_NO_INSTALL_UPGRADE: "1" + run: | + brew install llvm + llvm_bin="$(brew --prefix llvm)/bin" + "$llvm_bin/clang" --version + echo "$llvm_bin" >> "$GITHUB_PATH" - name: Build native libraries run: just dotnet-native env: