Skip to content

Commit 17110ed

Browse files
committed
feat(CI): Update workflow
1 parent 75cd4ea commit 17110ed

10 files changed

+365
-73
lines changed

.github/package.xcworkspace/xcshareddata/xcschemes/InterceptionMacrosPluginTests.xcscheme

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "InterceptionMacrosPluginTests"
18+
BuildableName = "InterceptionMacrosPluginTests"
19+
BlueprintName = "InterceptionMacrosPluginTests"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
824
</BuildAction>
925
<TestAction
1026
buildConfiguration = "Debug"
@@ -42,6 +58,15 @@
4258
savedToolIdentifier = ""
4359
useCustomWorkingDirectory = "NO"
4460
debugDocumentVersioning = "YES">
61+
<MacroExpansion>
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "InterceptionMacrosPluginTests"
65+
BuildableName = "InterceptionMacrosPluginTests"
66+
BlueprintName = "InterceptionMacrosPluginTests"
67+
ReferencedContainer = "container:">
68+
</BuildableReference>
69+
</MacroExpansion>
4570
</ProfileAction>
4671
<AnalyzeAction
4772
buildConfiguration = "Debug">

.github/package.xcworkspace/xcshareddata/xcschemes/InterceptionMacrosTests.xcscheme

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "InterceptionMacrosTests"
18+
BuildableName = "InterceptionMacrosTests"
19+
BlueprintName = "InterceptionMacrosTests"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
824
</BuildAction>
925
<TestAction
1026
buildConfiguration = "Debug"
@@ -42,6 +58,15 @@
4258
savedToolIdentifier = ""
4359
useCustomWorkingDirectory = "NO"
4460
debugDocumentVersioning = "YES">
61+
<MacroExpansion>
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "InterceptionMacrosTests"
65+
BuildableName = "InterceptionMacrosTests"
66+
BlueprintName = "InterceptionMacrosTests"
67+
ReferencedContainer = "container:">
68+
</BuildableReference>
69+
</MacroExpansion>
4570
</ProfileAction>
4671
<AnalyzeAction
4772
buildConfiguration = "Debug">

.github/package.xcworkspace/xcshareddata/xcschemes/InterceptionTests.xcscheme

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "InterceptionTests"
18+
BuildableName = "InterceptionTests"
19+
BlueprintName = "InterceptionTests"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
824
</BuildAction>
925
<TestAction
1026
buildConfiguration = "Debug"
@@ -42,6 +58,15 @@
4258
savedToolIdentifier = ""
4359
useCustomWorkingDirectory = "NO"
4460
debugDocumentVersioning = "YES">
61+
<MacroExpansion>
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "InterceptionTests"
65+
BuildableName = "InterceptionTests"
66+
BlueprintName = "InterceptionTests"
67+
ReferencedContainer = "container:">
68+
</BuildableReference>
69+
</MacroExpansion>
4570
</ProfileAction>
4671
<AnalyzeAction
4772
buildConfiguration = "Debug">

.github/workflows/ci.yml

Lines changed: 119 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,135 @@ on:
77
pull_request:
88
branches:
99
- '*'
10+
workflow_dispatch:
1011

1112
concurrency:
1213
group: ci-${{ github.ref }}
1314
cancel-in-progress: true
1415

1516
jobs:
16-
library-swift-latest:
17-
name: Library
17+
test-library:
18+
name: test-library
1819
if: |
1920
!contains(github.event.head_commit.message, '[ci skip]') &&
2021
!contains(github.event.head_commit.message, '[ci skip test]') &&
2122
!contains(github.event.head_commit.message, '[ci skip library-swift-latest]')
22-
runs-on: macos-13
23-
timeout-minutes: 30
23+
runs-on: macos-14
2424
strategy:
25+
fail-fast: false
2526
matrix:
26-
config:
27-
- debug
28-
- release
27+
platform: [iOS, macOS, tvOS, watchOS, macCatalyst]
28+
xcode: ['15.4', '16.1']
29+
config: [Debug]
30+
command: [test]
31+
scheme: [Interception]
2932
steps:
30-
- uses: actions/checkout@v4
31-
- name: Select Xcode 15.2
32-
run: sudo xcode-select -s /Applications/Xcode_15.2.app
33-
- name: Run test
34-
run: make test
33+
- uses: actions/checkout@v4
34+
with:
35+
submodules: true
36+
- name: Select Xcode ${{ matrix.xcode }}
37+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
38+
- name: Cache derived data
39+
uses: actions/cache@v3
40+
with:
41+
path: |
42+
~/.derivedData
43+
key: |
44+
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
45+
restore-keys: |
46+
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
47+
- name: Set IgnoreFileSystemDeviceInodeChanges flag
48+
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
49+
- name: Update mtime for incremental builds
50+
uses: chetan/git-restore-mtime-action@v2
51+
- name: test-library (${{ matrix.config }})
52+
uses: capturecontext/[email protected]
53+
with:
54+
command: xcodebuild
55+
subcommand: ${{ matrix.command }}
56+
platform: ${{ matrix.platform }}
57+
scheme: ${{ matrix.scheme }}
58+
config: ${{ matrix.config }}
59+
test-library-macros:
60+
name: test-library-macros
61+
if: |
62+
!contains(github.event.head_commit.message, '[ci skip]') &&
63+
!contains(github.event.head_commit.message, '[ci skip test]') &&
64+
!contains(github.event.head_commit.message, '[ci skip library-swift-latest]')
65+
runs-on: macos-14
66+
strategy:
67+
fail-fast: false
68+
matrix:
69+
platform: [iOS, macOS, tvOS, watchOS, macCatalyst]
70+
xcode: ['15.4', '16.1']
71+
config: [Debug]
72+
command: [test]
73+
scheme: [Interception]
74+
steps:
75+
- uses: actions/checkout@v4
76+
with:
77+
submodules: true
78+
- name: Select Xcode ${{ matrix.xcode }}
79+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
80+
- name: Cache derived data
81+
uses: actions/cache@v3
82+
with:
83+
path: |
84+
~/.derivedData
85+
key: |
86+
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
87+
restore-keys: |
88+
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
89+
- name: Set IgnoreFileSystemDeviceInodeChanges flag
90+
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
91+
- name: Update mtime for incremental builds
92+
uses: chetan/git-restore-mtime-action@v2
93+
- name: test-library-macros (${{ matrix.config }})
94+
uses: capturecontext/[email protected]
95+
with:
96+
command: xcodebuild-macros
97+
subcommand: ${{ matrix.command }}
98+
platform: ${{ matrix.platform }}
99+
scheme: ${{ matrix.scheme }}
100+
config: ${{ matrix.config }}
101+
test-library-macros-plugin:
102+
name: test-library-macros-plugin
103+
if: |
104+
!contains(github.event.head_commit.message, '[ci skip]') &&
105+
!contains(github.event.head_commit.message, '[ci skip test]') &&
106+
!contains(github.event.head_commit.message, '[ci skip library-swift-latest]')
107+
runs-on: macos-14
108+
strategy:
109+
matrix:
110+
platform: [macOS]
111+
xcode: ['16.1']
112+
command: [test]
113+
config: [Debug]
114+
scheme: [Interception]
115+
steps:
116+
- uses: actions/checkout@v4
117+
with:
118+
submodules: true
119+
- name: Select Xcode ${{ matrix.xcode }}
120+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
121+
- name: Cache derived data
122+
uses: actions/cache@v3
123+
with:
124+
path: |
125+
~/.derivedData
126+
key: |
127+
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
128+
restore-keys: |
129+
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
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: test-library-macros-plugin (${{ matrix.config }})
135+
uses: capturecontext/[email protected]
136+
with:
137+
command: xcodebuild-macros-plugin
138+
subcommand: ${{ matrix.command }}
139+
platform: ${{ matrix.platform }}
140+
scheme: ${{ matrix.scheme }}
141+
config: ${{ matrix.config }}

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "swift-package-action"]
2+
path = swift-package-action
3+
url = [email protected]:capturecontext/swift-package-action.git

.swiftpm/xcode/xcshareddata/xcschemes/InterceptionMacrosPluginTests.xcscheme

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "InterceptionMacrosPluginTests"
18+
BuildableName = "InterceptionMacrosPluginTests"
19+
BlueprintName = "InterceptionMacrosPluginTests"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
824
</BuildAction>
925
<TestAction
1026
buildConfiguration = "Debug"
@@ -42,6 +58,15 @@
4258
savedToolIdentifier = ""
4359
useCustomWorkingDirectory = "NO"
4460
debugDocumentVersioning = "YES">
61+
<MacroExpansion>
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "InterceptionMacrosPluginTests"
65+
BuildableName = "InterceptionMacrosPluginTests"
66+
BlueprintName = "InterceptionMacrosPluginTests"
67+
ReferencedContainer = "container:">
68+
</BuildableReference>
69+
</MacroExpansion>
4570
</ProfileAction>
4671
<AnalyzeAction
4772
buildConfiguration = "Debug">

.swiftpm/xcode/xcshareddata/xcschemes/InterceptionMacrosTests.xcscheme

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "InterceptionMacrosTests"
18+
BuildableName = "InterceptionMacrosTests"
19+
BlueprintName = "InterceptionMacrosTests"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
824
</BuildAction>
925
<TestAction
1026
buildConfiguration = "Debug"
@@ -42,6 +58,15 @@
4258
savedToolIdentifier = ""
4359
useCustomWorkingDirectory = "NO"
4460
debugDocumentVersioning = "YES">
61+
<MacroExpansion>
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "InterceptionMacrosTests"
65+
BuildableName = "InterceptionMacrosTests"
66+
BlueprintName = "InterceptionMacrosTests"
67+
ReferencedContainer = "container:">
68+
</BuildableReference>
69+
</MacroExpansion>
4570
</ProfileAction>
4671
<AnalyzeAction
4772
buildConfiguration = "Debug">

.swiftpm/xcode/xcshareddata/xcschemes/InterceptionTests.xcscheme

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "InterceptionTests"
18+
BuildableName = "InterceptionTests"
19+
BlueprintName = "InterceptionTests"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
824
</BuildAction>
925
<TestAction
1026
buildConfiguration = "Debug"
@@ -42,6 +58,15 @@
4258
savedToolIdentifier = ""
4359
useCustomWorkingDirectory = "NO"
4460
debugDocumentVersioning = "YES">
61+
<MacroExpansion>
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "InterceptionTests"
65+
BuildableName = "InterceptionTests"
66+
BlueprintName = "InterceptionTests"
67+
ReferencedContainer = "container:">
68+
</BuildableReference>
69+
</MacroExpansion>
4570
</ProfileAction>
4671
<AnalyzeAction
4772
buildConfiguration = "Debug">

0 commit comments

Comments
 (0)