From 3a884df39e9b7984ce432ab3d4a526e3c6658c1c Mon Sep 17 00:00:00 2001 From: Ethan <39577870+ethanndickson@users.noreply.github.com> Date: Thu, 6 Feb 2025 17:05:34 +1100 Subject: [PATCH] ci: set xcode sdk version when building dylib (#16466) The Coder Desktop app might not be able to load the dylib because the hardened runtime version is different. Right now, without manually selecting an XCode version, the dylib is built with hardened runtime version `14.5`. The macOS app is built with XCode 16 SDK, which uses version `15.0`. Even if this isn't an issue, I think it's preferable to select a specific xcode version here to avoid things breaking from under us. --- .github/workflows/ci.yaml | 11 ++++++----- .github/workflows/release.yaml | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0c87ad9855..7e1d811e08 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -940,11 +940,7 @@ jobs: if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main' runs-on: ${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest' }} steps: - - name: Harden Runner - uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 - with: - egress-policy: audit - + # Harden Runner doesn't work on macOS - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -957,6 +953,11 @@ jobs: echo "$(brew --prefix gnu-getopt)/bin" >> $GITHUB_PATH echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH + - name: Switch XCode Version + uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 + with: + xcode-version: "16.0.0" + - name: Setup Go uses: ./.github/actions/setup-go diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2a6a14ded5..3a32b58f62 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -36,11 +36,7 @@ jobs: build-dylib: runs-on: ${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest' }} steps: - - name: Harden Runner - uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 - with: - egress-policy: audit - + # Harden Runner doesn't work on macOS. - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -61,6 +57,11 @@ jobs: echo "$(brew --prefix gnu-getopt)/bin" >> $GITHUB_PATH echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH + - name: Switch XCode Version + uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 + with: + xcode-version: "16.0.0" + - name: Setup Go uses: ./.github/actions/setup-go