From 8ea94002f2b2dee632a742a7b36519c6a99ac9b3 Mon Sep 17 00:00:00 2001
From: treastrain / Tanaka Ryoga
Date: Thu, 1 Feb 2024 02:49:08 +0900
Subject: [PATCH 1/4] Add macos-14 on GitHub Actions
---
.github/workflows/swift.yml | 6 +++---
.github/workflows/xcodebuild.yml | 4 ++--
.github/workflows/xcodebuild_for_example_app.yml | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml
index 48d5658..7c804f7 100644
--- a/.github/workflows/swift.yml
+++ b/.github/workflows/swift.yml
@@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macos-13, ubuntu-20.04, ubuntu-22.04]
+ os: [macos-13, macos-14, ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
@@ -30,12 +30,12 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macos-13, ubuntu-20.04, ubuntu-22.04]
+ os: [macos-13, macos-14, ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set Xcode version
- if: matrix.os == 'macos-13'
+ if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-14' }}
run: sudo xcode-select -s '${{ env.XCODE_SELECT_PATH }}'
- name: Build
run: swift build -v | tee swift-build_${{ matrix.os }}.log && exit ${PIPESTATUS[0]}
diff --git a/.github/workflows/xcodebuild.yml b/.github/workflows/xcodebuild.yml
index 4301ed3..55cc474 100644
--- a/.github/workflows/xcodebuild.yml
+++ b/.github/workflows/xcodebuild.yml
@@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macos-13]
+ os: [macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
@@ -41,7 +41,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macos-13]
+ os: [macos-13, macos-14]
platform: ['iOS', 'macOS', 'macCatalyst', 'tvOS', 'watchOS', 'visionOS']
runs-on: ${{ matrix.os }}
steps:
diff --git a/.github/workflows/xcodebuild_for_example_app.yml b/.github/workflows/xcodebuild_for_example_app.yml
index 208d9bb..29a607b 100644
--- a/.github/workflows/xcodebuild_for_example_app.yml
+++ b/.github/workflows/xcodebuild_for_example_app.yml
@@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macos-13]
+ os: [macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
@@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macos-13]
+ os: [macos-13, macos-14]
platform: ['iOS']
runs-on: ${{ matrix.os }}
steps:
From de2087bea54fb0dd62942621163c56e3f7b4ecb9 Mon Sep 17 00:00:00 2001
From: treastrain / Tanaka Ryoga
Date: Thu, 1 Feb 2024 03:09:05 +0900
Subject: [PATCH 2/4] Update artifact names
---
.github/workflows/xcodebuild.yml | 32 +++++++++----------
.../workflows/xcodebuild_for_example_app.yml | 8 ++---
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/.github/workflows/xcodebuild.yml b/.github/workflows/xcodebuild.yml
index 55cc474..47a6429 100644
--- a/.github/workflows/xcodebuild.yml
+++ b/.github/workflows/xcodebuild.yml
@@ -51,39 +51,39 @@ jobs:
- name: Build the scheme
run: |
case ${{ matrix.platform }} in
- 'iOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.IOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
- 'macOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64' | tee xcodebuild-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
- 'macCatalyst' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' | tee xcodebuild-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
- 'tvOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.TVOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
- 'watchOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.WATCHOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
- 'visionOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.VISIONOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
+ 'iOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.IOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
+ 'macOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
+ 'macCatalyst' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
+ 'tvOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.TVOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
+ 'watchOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.WATCHOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
+ 'visionOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.VISIONOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
esac
- name: Upload Xcode Build log
if: always()
uses: actions/upload-artifact@v4
with:
- name: xcodebuild log (${{ matrix.platform }})
+ name: xcodebuild log (${{ matrix.os }}, ${{ matrix.platform }})
path: |
- xcodebuild-${{ matrix.platform }}.log
+ xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log
- name: Test the scheme
run: |
case ${{ matrix.platform }} in
- 'iOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.IOS_SIMULATOR_NAME }}' -resultBundlePath TestResults-${{ matrix.platform }} ;;
- 'macOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64' -resultBundlePath TestResults-${{ matrix.platform }} ;;
- 'macCatalyst' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' -resultBundlePath TestResults-${{ matrix.platform }} ;;
- 'tvOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.TVOS_SIMULATOR_NAME }}' -resultBundlePath TestResults-${{ matrix.platform }} ;;
- 'watchOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.WATCHOS_SIMULATOR_NAME }}' -resultBundlePath TestResults-${{ matrix.platform }} ;;
- 'visionOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.VISIONOS_SIMULATOR_NAME }}' -resultBundlePath TestResults-${{ matrix.platform }} ;;
+ 'iOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.IOS_SIMULATOR_NAME }}' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
+ 'macOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
+ 'macCatalyst' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
+ 'tvOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.TVOS_SIMULATOR_NAME }}' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
+ 'watchOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.WATCHOS_SIMULATOR_NAME }}' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
+ 'visionOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.VISIONOS_SIMULATOR_NAME }}' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
esac
- uses: kishikawakatsumi/xcresulttool@v1
with:
- path: TestResults-${{ matrix.platform }}.xcresult
+ path: TestResults-${{ matrix.os }}-${{ matrix.platform }}.xcresult
title: Xcode test results (${{ matrix.os }}, ${{ matrix.platform }})
if: success() || failure()
- name: Upload Xcode DerivedData
if: always()
uses: actions/upload-artifact@v4
with:
- name: Xcode DerivedData (${{ matrix.platform }})
+ name: Xcode DerivedData (${{ matrix.os }}, ${{ matrix.platform }})
path: |
/Users/runner/Library/Developer/Xcode/DerivedData
diff --git a/.github/workflows/xcodebuild_for_example_app.yml b/.github/workflows/xcodebuild_for_example_app.yml
index 29a607b..8839d95 100644
--- a/.github/workflows/xcodebuild_for_example_app.yml
+++ b/.github/workflows/xcodebuild_for_example_app.yml
@@ -50,20 +50,20 @@ jobs:
- name: Build the scheme
run: |
case ${{ matrix.platform }} in
- 'iOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.IOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
+ 'iOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.IOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
esac
working-directory: ./Examples
- name: Upload Xcode Build log
if: always()
uses: actions/upload-artifact@v4
with:
- name: xcodebuild log (${{ matrix.platform }})
+ name: xcodebuild log (${{ matrix.os }}, ${{ matrix.platform }})
path: |
- Examples/xcodebuild-${{ matrix.platform }}.log
+ Examples/xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log
- name: Upload Xcode DerivedData
if: always()
uses: actions/upload-artifact@v4
with:
- name: Xcode DerivedData (${{ matrix.platform }})
+ name: Xcode DerivedData (${{ matrix.os }}, ${{ matrix.platform }})
path: |
/Users/runner/Library/Developer/Xcode/DerivedData
From 12c99685a2a18e2d7c548f7f5b46d59b66b33d2e Mon Sep 17 00:00:00 2001
From: treastrain / Tanaka Ryoga
Date: Thu, 1 Feb 2024 06:11:51 +0900
Subject: [PATCH 3/4] Add macOS arm64 build and test
---
.github/workflows/xcodebuild.yml | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/xcodebuild.yml b/.github/workflows/xcodebuild.yml
index 47a6429..f9a9078 100644
--- a/.github/workflows/xcodebuild.yml
+++ b/.github/workflows/xcodebuild.yml
@@ -42,7 +42,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-13, macos-14]
- platform: ['iOS', 'macOS', 'macCatalyst', 'tvOS', 'watchOS', 'visionOS']
+ platform: ['iOS', 'macOS-x86_64', 'macOS-arm64', 'macCatalyst-x86_64', 'macCatalyst-arm64', 'tvOS', 'watchOS', 'visionOS']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
@@ -52,8 +52,10 @@ jobs:
run: |
case ${{ matrix.platform }} in
'iOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.IOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
- 'macOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
- 'macCatalyst' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
+ 'macOS-x86_64' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
+ 'macCatalyst-x86_64' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
+ 'macOS-arm64' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=arm64' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
+ 'macCatalyst-arm64' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=arm64,variant=Mac Catalyst' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
'tvOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.TVOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
'watchOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.WATCHOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
'visionOS' ) xcodebuild -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.VISIONOS_SIMULATOR_NAME }}' | tee xcodebuild-${{ matrix.os }}-${{ matrix.platform }}.log && exit ${PIPESTATUS[0]} ;;
@@ -69,8 +71,10 @@ jobs:
run: |
case ${{ matrix.platform }} in
'iOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.IOS_SIMULATOR_NAME }}' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
- 'macOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
- 'macCatalyst' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
+ 'macOS-x86_64' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
+ 'macCatalyst-x86_64' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
+ 'macOS-arm64' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=arm64' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
+ 'macCatalyst-arm64' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'platform=macOS,arch=arm64,variant=Mac Catalyst' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
'tvOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.TVOS_SIMULATOR_NAME }}' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
'watchOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.WATCHOS_SIMULATOR_NAME }}' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
'visionOS' ) xcodebuild test -scheme ${{ env.SCHEME_NAME }} -destination 'name=${{ env.VISIONOS_SIMULATOR_NAME }}' -resultBundlePath TestResults-${{ matrix.os }}-${{ matrix.platform }} ;;
From 6386cf93ea621ff8a39bba48c154a322f94819c0 Mon Sep 17 00:00:00 2001
From: treastrain / Tanaka Ryoga
Date: Thu, 1 Feb 2024 06:29:59 +0900
Subject: [PATCH 4/4] Remove macos-13
---
.github/workflows/swift.yml | 6 +++---
.github/workflows/xcodebuild.yml | 4 ++--
.github/workflows/xcodebuild_for_example_app.yml | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml
index 7c804f7..9d8ec33 100644
--- a/.github/workflows/swift.yml
+++ b/.github/workflows/swift.yml
@@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macos-13, macos-14, ubuntu-20.04, ubuntu-22.04]
+ os: [macos-14, ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
@@ -30,12 +30,12 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macos-13, macos-14, ubuntu-20.04, ubuntu-22.04]
+ os: [macos-14, ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set Xcode version
- if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-14' }}
+ if: ${{ matrix.os == 'macos-14' }}
run: sudo xcode-select -s '${{ env.XCODE_SELECT_PATH }}'
- name: Build
run: swift build -v | tee swift-build_${{ matrix.os }}.log && exit ${PIPESTATUS[0]}
diff --git a/.github/workflows/xcodebuild.yml b/.github/workflows/xcodebuild.yml
index f9a9078..6d8cacc 100644
--- a/.github/workflows/xcodebuild.yml
+++ b/.github/workflows/xcodebuild.yml
@@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macos-13, macos-14]
+ os: [macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
@@ -41,7 +41,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macos-13, macos-14]
+ os: [macos-14]
platform: ['iOS', 'macOS-x86_64', 'macOS-arm64', 'macCatalyst-x86_64', 'macCatalyst-arm64', 'tvOS', 'watchOS', 'visionOS']
runs-on: ${{ matrix.os }}
steps:
diff --git a/.github/workflows/xcodebuild_for_example_app.yml b/.github/workflows/xcodebuild_for_example_app.yml
index 8839d95..08db840 100644
--- a/.github/workflows/xcodebuild_for_example_app.yml
+++ b/.github/workflows/xcodebuild_for_example_app.yml
@@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macos-13, macos-14]
+ os: [macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
@@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macos-13, macos-14]
+ os: [macos-14]
platform: ['iOS']
runs-on: ${{ matrix.os }}
steps: