11name : Verify Changes
2-
32on :
43 merge_group :
54 pull_request :
109jobs :
1110 lint :
1211 name : Lint
13- runs-on : macos-15
12+ runs-on : macos-26
1413 steps :
1514 - name : Checkout
1615 uses : actions/checkout@v4
@@ -20,10 +19,11 @@ jobs:
2019 - name : Lint
2120 run : |
2221 Scripts/lint
22+
2323 build-and-test :
2424 name : Build and Test (${{ matrix.platform }})
2525 needs : lint
26- runs-on : macos-15
26+ runs-on : macos-26
2727 strategy :
2828 fail-fast : false
2929 matrix :
@@ -36,31 +36,40 @@ jobs:
3636# xcode_destination: "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)"
3737# - platform: watchOS
3838# xcode_destination: "platform=watchOS Simulator,name=Apple Watch Series 10 (46mm)"
39+
3940 env :
4041 DEV_BUILDS : DevBuilds/Sources
42+ OTHER_XCBEAUTIFY_FLAGS : --renderer github-actions
4143 XCCOV_PRETTY_VERSION : 1.2.0
4244 XCODE_SCHEME : DevTesting
4345 XCODE_DESTINATION : ${{ matrix.xcode_destination }}
4446 XCODE_TEST_PLAN : DevTesting
47+ XCODE_TEST_PRODUCTS_PATH : .build/DevTesting.xctestproducts
48+
4549 steps :
50+ - name : Select Xcode 26.0.0
51+ run : |
52+ sudo xcode-select -s /Applications/Xcode_26.0.0.app
53+
4654 - name : Checkout
4755 uses : actions/checkout@v4
56+
4857 - name : Checkout DevBuilds
4958 uses : actions/checkout@v4
5059 with :
5160 repository : DevKitOrganization/DevBuilds
5261 path : DevBuilds
53- - name : Download xccovPretty
62+
63+ - name : Restore XCTestProducts
5464 if : github.event_name != 'push'
55- run : |
56- gh release download ${{ env.XCCOV_PRETTY_VERSION }} \
57- --repo DevKitOrganization/xccovPretty \
58- --pattern "xccovPretty-macos.tar.gz" \
59- -O - | tar -xz
60- chmod +x xccovPretty
61- env :
62- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
65+ id : cache-xctestproducts-restore
66+ uses : actions/cache/restore@v4
67+ with :
68+ path : ${{ env.XCODE_TEST_PRODUCTS_PATH }}
69+ key : cache-xctestproducts-${{ github.workflow }}-${{ github.sha }}
70+
6371 - uses : irgaly/xcode-cache@v1
72+ if : steps.cache-xctestproducts-restore.outputs.cache-hit != 'true'
6473 with :
6574 key : xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.platform }}-${{ github.sha }}
6675 restore-keys : |
@@ -70,55 +79,72 @@ jobs:
7079 sourcepackages-directory : .build/DerivedData/SourcePackages
7180 swiftpm-package-resolved-file : Package.resolved
7281 verbose : true
73- - name : Select Xcode 26.0.0
74- run : |
75- sudo xcode-select -s /Applications/Xcode_26.0.0.app
82+
7683 - name : Build for Testing
77- run : |
78- "$DEV_BUILDS"/build_and_test.sh --action build-for-testing
79- - name : Test
84+ id : build-for-testing
85+ if : steps.cache-xctestproducts-restore.outputs.cache-hit != 'true'
86+ run : ${{ env.DEV_BUILDS }}/build_and_test.sh --action build-for-testing
87+
88+ - name : Test Without Building
89+ id : test-without-building
8090 if : github.event_name != 'push'
81- run : |
82- "$DEV_BUILDS"/build_and_test.sh --action test
91+ run : ${{ env.DEV_BUILDS }}/build_and_test.sh --action test-without-building
92+
93+ - name : Save XCTestProducts
94+ if : failure() && steps.cache-xctestproducts-restore.outputs.cache-hit != 'true'
95+ uses : actions/cache/save@v4
96+ with :
97+ path : ${{ env.XCODE_TEST_PRODUCTS_PATH }}
98+ key : ${{ steps.cache-xctestproducts-restore.outputs.cache-primary-key }}
99+
83100 - name : Log Code Coverage
84101 if : github.event_name != 'push'
102+ env :
103+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
85104 run : |
86- xcrun xccov view --report .build/DevTesting_test.xcresult --json \
87- | ./xccovPretty --github-comment \
88- > .build/xccovPretty-${{ matrix.platform }}.output
89- - name : Upload Logs
90- uses : actions/upload-artifact@v4
105+ gh release download ${{ env.XCCOV_PRETTY_VERSION }} \
106+ --repo DevKitOrganization/xccovPretty \
107+ --pattern "xccovPretty-macos.tar.gz" \
108+ -O - \
109+ | tar -xz
110+ chmod +x xccovPretty
111+
112+ xcrun xccov view --report .build/DevTesting_test-without-building.xcresult --json \
113+ | ./xccovPretty --github-comment \
114+ > .build/xccovPretty-${{ matrix.platform }}.output
115+
116+ - name : Upload Logs and XCResults
91117 if : success() || failure()
92- with :
93- name : Logs-${{ matrix.platform }}
94- path : .build/*.log
95- include-hidden-files : true
96- - name : Upload XCResults
97118 uses : actions/upload-artifact@v4
98- if : success() || failure()
99119 with :
100- name : XCResults-${{ matrix.platform }}
101- path : .build/*.xcresult
120+ name : Logs_and_XCResults-${{ matrix.platform }}
121+ path : |
122+ .build/*.log
123+ .build/*.xcresult
102124 include-hidden-files : true
125+
103126 - name : Upload xccovPretty output
104127 if : github.event_name != 'push'
105128 uses : actions/upload-artifact@v4
106129 with :
107130 name : xccovPrettyOutput-${{ matrix.platform }}
108131 path : .build/xccovPretty-${{ matrix.platform }}.output
109132 include-hidden-files : true
133+
110134 post-pr-comments :
111135 name : Post PR Comments
112136 needs : build-and-test
137+ if : ${{ github.event_name == 'pull_request' }}
113138 permissions :
114139 pull-requests : write
115140 runs-on : ubuntu-latest
116- if : ${{ github.event_name == 'pull_request' }}
141+
117142 steps :
118143 - name : Download xccovPretty output
119144 uses : actions/download-artifact@v4
120145 with :
121146 name : xccovPrettyOutput-macOS
147+
122148 - name : Post Code Coverage Comment
123149 uses : thollander/actions-comment-pull-request@v3
124150 with :
0 commit comments