Skip to content

Commit

Permalink
Merge pull request lima-vm#1196 from AkihiroSuda/dev
Browse files Browse the repository at this point in the history
CI: release: use Xcode 14.1 to enable the macOS 13 SDK
  • Loading branch information
AkihiroSuda authored Nov 23, 2022
2 parents 6063416 + 2f4193f commit 720c211
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 26 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
name: Release
on:
push:
branches:
- 'master'
tags:
- 'v*'
- 'test-action-release-*'
pull_request:
branches:
- 'master'
env:
GO111MODULE: on
jobs:
Expand All @@ -15,6 +19,13 @@ jobs:
runs-on: macos-12
timeout-minutes: 20
steps:
- name: "Switch Xcode version to enable macOS 13 SDK"
# Xcode 14.1 added support for macOS 13 SDK.
# The default version is still 14.0.1, as of November 2022.
# https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md#xcode
run: |
sudo xcode-select --switch /Applications/Xcode_14.1.app
xcrun --show-sdk-version
- uses: actions/setup-go@v3
with:
go-version: 1.19.x
Expand Down Expand Up @@ -81,6 +92,7 @@ jobs:
The sha256sum of the SHA256SUMS file itself is \`${shasha}\` .
EOF
- name: "Create release"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Test making darwin artifacts
run: make artifacts-darwin
- name: Unit tests
run: go test -v ./...
- name: Make
Expand Down Expand Up @@ -243,23 +241,3 @@ jobs:
retry_on: error
max_attempts: 3
command: ./hack/test-upgrade.sh ${{ matrix.oldver }} ${{ github.sha }}

artifacts-linux:
name: Artifacts Linux
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.x
- name: Install gcc-aarch64-linux-gnu
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Make linux artifacts
run: make artifacts-linux
- name: Make misc artifacts
run: make artifacts-misc
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ endif

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

0 comments on commit 720c211

Please sign in to comment.