Skip to content

Commit 9c51570

Browse files
committed
feat: Update ci.yml workflow
- Refactor the workflow using `swift-package-action`
1 parent 7559d89 commit 9c51570

File tree

1 file changed

+19
-29
lines changed

1 file changed

+19
-29
lines changed

.github/workflows/ci.yml

+19-29
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,26 @@ jobs:
2323
strategy:
2424
matrix:
2525
command: [test, '']
26-
platform: [IOS, MAC_CATALYST, MACOS, TVOS, VISIONOS, WATCHOS]
27-
xcode: ['16.2']
26+
platform: [iOS, macOS, macCatalyst, tvOS, visionOS, watchOS]
2827
steps:
2928
- uses: actions/checkout@v4
30-
- name: Select Xcode ${{ matrix.xcode }}
31-
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
32-
- name: Install visionOS runtime
33-
if: matrix.platform == 'visionOS'
34-
run: |
35-
sudo xcodebuild -runFirstLaunch
36-
sudo xcrun simctl list
37-
sudo xcodebuild -downloadPlatform visionOS
38-
sudo xcodebuild -runFirstLaunch
39-
- name: List available devices
40-
run: xcrun simctl list devices available
41-
- name: Cache derived data
42-
uses: actions/cache@v3
29+
- name: Debug ${{ matrix.platform }}
30+
uses: capturecontext/[email protected]
4331
with:
44-
path: |
45-
~/.derivedData
46-
key: |
47-
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
48-
restore-keys: |
49-
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
50-
- name: Set IgnoreFileSystemDeviceInodeChanges flag
51-
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
52-
- name: Update mtime for incremental builds
53-
uses: chetan/git-restore-mtime-action@v2
54-
- name: Debug
55-
run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" WORKSPACE=Package.xcworkspace xcodebuild
56-
- name: Release
32+
workspace: Package.xcworkspace
33+
cache-derived-data: true
34+
command: xcodebuild
35+
subcommand: ${{ matrix.command }}
36+
scheme: swift-existential-container
37+
platform: ${{ matrix.platform }}
38+
- name: Release ${{ matrix.platform }}
5739
if: matrix.command != 'test'
58-
run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" WORKSPACE=Package.xcworkspace xcodebuild
40+
uses: capturecontext/[email protected]
41+
with:
42+
workspace: Package.xcworkspace
43+
cache-derived-data: true
44+
command: xcodebuild
45+
subcommand: ${{ matrix.command }}
46+
scheme: swift-existential-container
47+
platform: ${{ matrix.platform }}
48+
config: Release

0 commit comments

Comments
 (0)