Skip to content

Commit 720c211

Browse files
authored
Merge pull request #1196 from AkihiroSuda/dev
CI: release: use Xcode 14.1 to enable the macOS 13 SDK
2 parents 6063416 + 2f4193f commit 720c211

File tree

3 files changed

+16
-26
lines changed

3 files changed

+16
-26
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
name: Release
55
on:
66
push:
7+
branches:
8+
- 'master'
79
tags:
810
- 'v*'
9-
- 'test-action-release-*'
11+
pull_request:
12+
branches:
13+
- 'master'
1014
env:
1115
GO111MODULE: on
1216
jobs:
@@ -15,6 +19,13 @@ jobs:
1519
runs-on: macos-12
1620
timeout-minutes: 20
1721
steps:
22+
- name: "Switch Xcode version to enable macOS 13 SDK"
23+
# Xcode 14.1 added support for macOS 13 SDK.
24+
# The default version is still 14.0.1, as of November 2022.
25+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md#xcode
26+
run: |
27+
sudo xcode-select --switch /Applications/Xcode_14.1.app
28+
xcrun --show-sdk-version
1829
- uses: actions/setup-go@v3
1930
with:
2031
go-version: 1.19.x
@@ -81,6 +92,7 @@ jobs:
8192
The sha256sum of the SHA256SUMS file itself is \`${shasha}\` .
8293
EOF
8394
- name: "Create release"
95+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
8496
env:
8597
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8698
run: |

.github/workflows/test.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ jobs:
8383
- uses: actions/checkout@v3
8484
with:
8585
fetch-depth: 1
86-
- name: Test making darwin artifacts
87-
run: make artifacts-darwin
8886
- name: Unit tests
8987
run: go test -v ./...
9088
- name: Make
@@ -243,23 +241,3 @@ jobs:
243241
retry_on: error
244242
max_attempts: 3
245243
command: ./hack/test-upgrade.sh ${{ matrix.oldver }} ${{ github.sha }}
246-
247-
artifacts-linux:
248-
name: Artifacts Linux
249-
runs-on: ubuntu-22.04
250-
timeout-minutes: 20
251-
steps:
252-
- uses: actions/setup-go@v3
253-
with:
254-
go-version: 1.19.x
255-
- name: Install gcc-aarch64-linux-gnu
256-
run: |
257-
sudo apt-get update
258-
sudo apt-get install -y gcc-aarch64-linux-gnu
259-
- uses: actions/checkout@v3
260-
with:
261-
fetch-depth: 1
262-
- name: Make linux artifacts
263-
run: make artifacts-linux
264-
- name: Make misc artifacts
265-
run: make artifacts-misc

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ endif
1515

1616
GO_BUILDTAGS ?=
1717
ifeq ($(GOOS),darwin)
18-
MACOS_VERSION=$(shell sw_vers -productVersion | cut -d . -f 1)
19-
ifeq ($(shell test $(MACOS_VERSION) -lt 13; echo $$?),0)
20-
# The "vz" mode needs macOS 13 or later
18+
MACOS_SDK_VERSION=$(shell xcrun --show-sdk-version | cut -d . -f 1)
19+
ifeq ($(shell test $(MACOS_SDK_VERSION) -lt 13; echo $$?),0)
20+
# The "vz" mode needs macOS 13 SDK or later
2121
GO_BUILDTAGS += no_vz
2222
endif
2323
endif

0 commit comments

Comments
 (0)