@@ -14,68 +14,93 @@ concurrency:
14
14
cancel-in-progress : true
15
15
16
16
jobs :
17
- library-swift-latest :
18
- name : Library
17
+ xcodebuild :
18
+ name : xcodebuild
19
19
runs-on : macos-14
20
20
strategy :
21
21
matrix :
22
- xcode :
23
- - 15.4
24
- - 16_beta_6
25
- config :
26
- - debug
27
- - release
22
+ command : [test, '']
23
+ platform : [iOS, macOS, tvOS, watchOS, visionOS, macCatalyst]
24
+ xcode : [15.2, 15.4, 16_beta_6]
25
+ exclude :
26
+ - {xcode: 15.2, command: test}
27
+ - {xcode: 15.4, command: ''}
28
+ - {xcode: 15.2, platform: macCatalyst}
29
+ - {xcode: 15.2, platform: tvOS}
30
+ - {xcode: 15.2, platform: visionOS}
31
+ - {xcode: 15.2, platform: watchOS}
32
+ - {xcode: 16_beta_6, command: ''}
33
+ - {xcode: 16_beta_6, platform: macCatalyst}
34
+ - {xcode: 16_beta_6, platform: tvOS}
35
+ - {xcode: 16_beta_6, platform: visionOS}
36
+ - {xcode: 16_beta_6, platform: watchOS}
37
+ include :
38
+ - {xcode: 15.2, skip_release: 1}
28
39
steps :
29
40
- uses : actions/checkout@v4
30
41
- name : Select Xcode ${{ matrix.xcode }}
31
42
run : sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
32
- - name : Build ${{ matrix.config }}
33
- run : make CONFIG=${{ matrix.config }} build-all-platforms
34
- - name : Run ${{ matrix.config }} tests
35
- if : matrix.xcode == '15.4'
36
- run : make CONFIG=${{ matrix.config }} test-library
43
+ - name : Cache derived data
44
+ uses : actions/cache@v3
45
+ with :
46
+ path : |
47
+ ~/.derivedData
48
+ key : |
49
+ deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
50
+ restore-keys : |
51
+ deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
52
+ - name : Set IgnoreFileSystemDeviceInodeChanges flag
53
+ run : defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
54
+ - name : Update mtime for incremental builds
55
+ uses : chetan/git-restore-mtime-action@v2
56
+ - name : Debug
57
+ run : make COMMAND="${{ matrix.command }}" CONFIG=Debug PLATFORM="${{ matrix.platform }}" xcodebuild
58
+ - name : Release
59
+ if : matrix.skip_release != '1'
60
+ run : make COMMAND="${{ matrix.command }}" CONFIG=Release PLATFORM="${{ matrix.platform }}" xcodebuild
37
61
38
- # library-evolution:
39
- # name: Library (evolution)
40
- # runs-on: macos-14
41
- # steps:
42
- # - uses: actions/checkout@v4
43
- # - name: Select Xcode 15.4
44
- # run: sudo xcode-select -s /Applications/Xcode_15.4.app
45
- # - name: Build for library evolution
46
- # run: make build-for-library-evolution
47
-
48
- library-compatibility :
49
- name : Library (Swift 5.9)
50
- runs-on : macos-14
51
- strategy :
52
- matrix :
53
- config :
54
- - debug
55
- - release
56
- steps :
57
- - uses : actions/checkout@v4
58
- - name : Select Xcode 15.2
59
- run : sudo xcode-select -s /Applications/Xcode_15.2.app
60
- - name : Build ${{ matrix.config }}
61
- run : swift build -c ${{ matrix.config }}
62
-
63
- benchmarks :
64
- name : Benchmarks
62
+ library-evolution :
63
+ name : Library (evolution)
65
64
runs-on : macos-14
66
65
steps :
67
66
- uses : actions/checkout@v4
68
67
- name : Select Xcode 15.4
69
68
run : sudo xcode-select -s /Applications/Xcode_15.4.app
70
- - name : Run benchmark
71
- run : make benchmark
69
+ - name : Build for library evolution
70
+ run : make build-for-library-evolution
72
71
73
72
examples :
74
73
name : Examples
75
74
runs-on : macos-14
76
75
steps :
77
76
- uses : actions/checkout@v4
77
+ - name : Cache derived data
78
+ uses : actions/cache@v3
79
+ with :
80
+ path : ~/.derivedData
81
+ key : |
82
+ deriveddata-examples-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift', '**/Examples/**/*.swift') }}
83
+ restore-keys : |
84
+ deriveddata-examples-
78
85
- name : Select Xcode 15.4
79
86
run : sudo xcode-select -s /Applications/Xcode_15.4.app
80
- - name : Run tests
81
- run : make test-examples
87
+ - name : Set IgnoreFileSystemDeviceInodeChanges flag
88
+ run : defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
89
+ - name : Update mtime for incremental builds
90
+ uses : chetan/git-restore-mtime-action@v2
91
+ - name : CaseStudies (SwiftUI)
92
+ run : make SCHEME="CaseStudies (SwiftUI)" test-example
93
+ - name : CaseStudies (UIKit)
94
+ run : make SCHEME="CaseStudies (UIKit)" test-example
95
+ - name : Search
96
+ run : make SCHEME="Search" test-example
97
+ - name : SyncUps
98
+ run : make SCHEME="SyncUps" test-example
99
+ - name : SpeechRecognition
100
+ run : make SCHEME="SpeechRecognition" test-example
101
+ - name : TicTacToe
102
+ run : make SCHEME="TicTacToe" test-example
103
+ - name : Todos
104
+ run : make SCHEME="Todos" test-example
105
+ - name : VoiceMemos
106
+ run : make SCHEME="VoiceMemos" test-example
0 commit comments