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.
This commit is contained in:
Ethan
2025-02-06 06:05:34 +00:00
committed by GitHub
parent f45277a2eb
commit 3a884df39e
2 changed files with 12 additions and 10 deletions
+6 -5
View File
@@ -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
+6 -5
View File
@@ -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