Skip to content

Commit d492990

Browse files
authored
Update ci.yml
1 parent 376d4fd commit d492990

File tree

1 file changed

+130
-139
lines changed

1 file changed

+130
-139
lines changed

.github/workflows/ci.yml

Lines changed: 130 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: CI
2-
32
on:
43
push:
54
branches:
@@ -8,146 +7,140 @@ on:
87
branches:
98
- '*'
109
workflow_dispatch:
11-
1210
concurrency:
1311
group: ci-${{ github.ref }}
1412
cancel-in-progress: true
15-
1613
jobs:
17-
# xcodebuild-latest:
18-
# name: xcodebuild (16)
19-
# runs-on: macos-15
20-
# strategy:
21-
# matrix:
22-
# command: [test, '']
23-
# platform: [IOS, MACOS]
24-
# xcode: ['16.2']
25-
# steps:
26-
# - uses: actions/checkout@v4
27-
# - name: Select Xcode ${{ matrix.xcode }}
28-
# run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
29-
# - name: Update xcbeautify
30-
# run: brew update && brew upgrade xcbeautify
31-
# - name: List available devices
32-
# run: xcrun simctl list devices available
33-
# - name: Cache derived data
34-
# uses: actions/cache@v3
35-
# with:
36-
# path: |
37-
# ~/.derivedData
38-
# key: |
39-
# deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
40-
# restore-keys: |
41-
# deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
42-
# - name: Set IgnoreFileSystemDeviceInodeChanges flag
43-
# run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
44-
# - name: Update mtime for incremental builds
45-
# uses: chetan/git-restore-mtime-action@v2
46-
# - name: Debug
47-
# run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" WORKSPACE=.github/package.xcworkspace xcodebuild
48-
49-
# xcodebuild:
50-
# name: xcodebuild (15)
51-
# runs-on: macos-14
52-
# strategy:
53-
# matrix:
54-
# command: [test, '']
55-
# platform:
56-
# - IOS
57-
# - MAC_CATALYST
58-
# - MACOS
59-
# - TVOS
60-
# # - VISIONOS # Unfortunately, visionOS on CI is too flakey
61-
# - WATCHOS
62-
# xcode: [15.2, 15.4]
63-
# exclude:
64-
# - {xcode: 15.2, command: test}
65-
# - {xcode: 15.4, command: ''}
66-
# - {xcode: 15.2, platform: MAC_CATALYST}
67-
# - {xcode: 15.2, platform: TVOS}
68-
# # - {xcode: 15.2, platform: VISIONOS}
69-
# - {xcode: 15.2, platform: WATCHOS}
70-
# steps:
71-
# - uses: actions/checkout@v4
72-
# - name: Select Xcode ${{ matrix.xcode }}
73-
# run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
74-
# - name: Update xcbeautify
75-
# run: brew update && brew upgrade xcbeautify
76-
# - name: Install visionOS runtime
77-
# if: matrix.platform == 'visionOS'
78-
# run: |
79-
# sudo xcodebuild -runFirstLaunch
80-
# sudo xcrun simctl list
81-
# sudo xcodebuild -downloadPlatform visionOS
82-
# sudo xcodebuild -runFirstLaunch
83-
# - name: List available devices
84-
# run: xcrun simctl list devices available
85-
# - name: Cache derived data
86-
# uses: actions/cache@v3
87-
# with:
88-
# path: |
89-
# ~/.derivedData
90-
# key: |
91-
# deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
92-
# restore-keys: |
93-
# deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
94-
# - name: Set IgnoreFileSystemDeviceInodeChanges flag
95-
# run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
96-
# - name: Update mtime for incremental builds
97-
# uses: chetan/git-restore-mtime-action@v2
98-
# - name: Debug
99-
# run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" WORKSPACE=.github/package.xcworkspace xcodebuild
100-
101-
# library-evolution:
102-
# name: Library (evolution)
103-
# runs-on: macos-14
104-
# steps:
105-
# - uses: actions/checkout@v4
106-
# - name: Select Xcode 15.4
107-
# run: sudo xcode-select -s /Applications/Xcode_15.4.app
108-
# - name: Update xcbeautify
109-
# run: brew update && brew upgrade xcbeautify
110-
# - name: Build for library evolution
111-
# run: make build-for-library-evolution
112-
113-
# examples:
114-
# name: Examples
115-
# runs-on: macos-15
116-
# steps:
117-
# - uses: actions/checkout@v4
118-
# - name: Cache derived data
119-
# uses: actions/cache@v3
120-
# with:
121-
# path: ~/.derivedData
122-
# key: |
123-
# deriveddata-examples-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift', '**/Examples/**/*.swift') }}
124-
# restore-keys: |
125-
# deriveddata-examples-
126-
# - name: Select Xcode 16
127-
# run: sudo xcode-select -s /Applications/Xcode_16.2.app
128-
# - name: Update xcbeautify
129-
# run: brew update && brew upgrade xcbeautify
130-
# - name: Set IgnoreFileSystemDeviceInodeChanges flag
131-
# run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
132-
# - name: Update mtime for incremental builds
133-
# uses: chetan/git-restore-mtime-action@v2
134-
# - name: CaseStudies (SwiftUI)
135-
# run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="CaseStudies (SwiftUI)" xcodebuild-raw
136-
# - name: CaseStudies (UIKit)
137-
# run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="CaseStudies (UIKit)" xcodebuild-raw
138-
# - name: Search
139-
# run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Search" xcodebuild-raw
140-
# - name: SyncUps
141-
# run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SyncUps" xcodebuild-raw
142-
# - name: SpeechRecognition
143-
# run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SpeechRecognition" xcodebuild-raw
144-
# - name: TicTacToe
145-
# run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="TicTacToe" xcodebuild-raw
146-
# - name: Todos
147-
# run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Todos" xcodebuild-raw
148-
# - name: VoiceMemos
149-
# run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="VoiceMemos" xcodebuild-raw
150-
14+
xcodebuild-latest:
15+
name: xcodebuild (16)
16+
runs-on: macos-15
17+
strategy:
18+
matrix:
19+
command: [test, '']
20+
platform: [IOS, MACOS]
21+
xcode: ['16.2']
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Select Xcode ${{ matrix.xcode }}
25+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
26+
- name: Update xcbeautify
27+
run: brew update && brew upgrade xcbeautify
28+
- name: List available devices
29+
run: xcrun simctl list devices available
30+
- name: Cache derived data
31+
uses: actions/cache@v3
32+
with:
33+
path: |
34+
~/.derivedData
35+
key: |
36+
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
37+
restore-keys: |
38+
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
39+
- name: Set IgnoreFileSystemDeviceInodeChanges flag
40+
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
41+
- name: Update mtime for incremental builds
42+
uses: chetan/git-restore-mtime-action@v2
43+
- name: Debug
44+
run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" WORKSPACE=.github/package.xcworkspace xcodebuild
45+
xcodebuild:
46+
name: xcodebuild (15)
47+
runs-on: macos-14
48+
strategy:
49+
matrix:
50+
command: [test, '']
51+
platform:
52+
- IOS
53+
- MAC_CATALYST
54+
- MACOS
55+
- TVOS
56+
# - VISIONOS # Unfortunately, visionOS on CI is too flakey
57+
- WATCHOS
58+
xcode: [15.2, 15.4]
59+
exclude:
60+
- {xcode: 15.2, command: test}
61+
- {xcode: 15.4, command: ''}
62+
- {xcode: 15.2, platform: MAC_CATALYST}
63+
- {xcode: 15.2, platform: TVOS}
64+
# - {xcode: 15.2, platform: VISIONOS}
65+
- {xcode: 15.2, platform: WATCHOS}
66+
steps:
67+
- uses: actions/checkout@v4
68+
- name: Select Xcode ${{ matrix.xcode }}
69+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
70+
- name: Update xcbeautify
71+
run: brew update && brew upgrade xcbeautify
72+
- name: Install visionOS runtime
73+
if: matrix.platform == 'visionOS'
74+
run: |
75+
sudo xcodebuild -runFirstLaunch
76+
sudo xcrun simctl list
77+
sudo xcodebuild -downloadPlatform visionOS
78+
sudo xcodebuild -runFirstLaunch
79+
- name: List available devices
80+
run: xcrun simctl list devices available
81+
- name: Cache derived data
82+
uses: actions/cache@v3
83+
with:
84+
path: |
85+
~/.derivedData
86+
key: |
87+
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
88+
restore-keys: |
89+
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
90+
- name: Set IgnoreFileSystemDeviceInodeChanges flag
91+
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
92+
- name: Update mtime for incremental builds
93+
uses: chetan/git-restore-mtime-action@v2
94+
- name: Debug
95+
run: make XCODEBUILD_ARGUMENT="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" WORKSPACE=.github/package.xcworkspace xcodebuild
96+
library-evolution:
97+
name: Library (evolution)
98+
runs-on: macos-14
99+
steps:
100+
- uses: actions/checkout@v4
101+
- name: Select Xcode 15.4
102+
run: sudo xcode-select -s /Applications/Xcode_15.4.app
103+
- name: Update xcbeautify
104+
run: brew update && brew upgrade xcbeautify
105+
- name: Build for library evolution
106+
run: make build-for-library-evolution
107+
examples:
108+
name: Examples
109+
runs-on: macos-15
110+
steps:
111+
- uses: actions/checkout@v4
112+
- name: Cache derived data
113+
uses: actions/cache@v3
114+
with:
115+
path: ~/.derivedData
116+
key: |
117+
deriveddata-examples-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift', '**/Examples/**/*.swift') }}
118+
restore-keys: |
119+
deriveddata-examples-
120+
- name: Select Xcode 16
121+
run: sudo xcode-select -s /Applications/Xcode_16.2.app
122+
- name: Update xcbeautify
123+
run: brew update && brew upgrade xcbeautify
124+
- name: Set IgnoreFileSystemDeviceInodeChanges flag
125+
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
126+
- name: Update mtime for incremental builds
127+
uses: chetan/git-restore-mtime-action@v2
128+
- name: CaseStudies (SwiftUI)
129+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="CaseStudies (SwiftUI)" xcodebuild-raw
130+
- name: CaseStudies (UIKit)
131+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="CaseStudies (UIKit)" xcodebuild-raw
132+
- name: Search
133+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Search" xcodebuild-raw
134+
- name: SyncUps
135+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SyncUps" xcodebuild-raw
136+
- name: SpeechRecognition
137+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="SpeechRecognition" xcodebuild-raw
138+
- name: TicTacToe
139+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="TicTacToe" xcodebuild-raw
140+
- name: Todos
141+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="Todos" xcodebuild-raw
142+
- name: VoiceMemos
143+
run: make DERIVED_DATA_PATH=~/.derivedData SCHEME="VoiceMemos" xcodebuild-raw
151144
check-macro-compatibility:
152145
name: Check Macro Compatibility
153146
runs-on: macos-latest
@@ -159,5 +152,3 @@ jobs:
159152
with:
160153
run-tests: false
161154
major-versions-only: true
162-
163-

0 commit comments

Comments
 (0)