@@ -16,21 +16,31 @@ jobs:
16
16
strategy :
17
17
fail-fast : false
18
18
matrix :
19
- # Pin ubuntu to ensure mono is installed
20
- # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
21
- os : [ubuntu-22.04, windows-latest, macos-15]
19
+ include :
20
+ - os : ubuntu-22.04 # Pin ubuntu to ensure mono is installed
21
+ - os : macos-15 # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
22
+ - os : windows-latest
23
+ - os : windows-11-arm
24
+ target : Windows-arm64
22
25
23
26
steps :
24
27
- name : Checkout
25
28
uses : actions/checkout@v4
26
29
27
30
- run : git submodule update --init modules/sentry-native
28
31
32
+ # zstd is needed for cross OS actions/cache but missing from windows-11-arm
33
+ # https://github.com/actions/partner-runner-images/issues/99
34
+ - name : Install zstd on Windows ARM64
35
+ if : runner.os == 'Windows' && runner.arch == 'ARM64'
36
+ shell : pwsh
37
+ run : choco install zstandard
38
+
29
39
- uses : actions/cache@v4
30
40
id : cache
31
41
with :
32
42
path : src/Sentry/Platforms/Native/sentry-native
33
- key : sentry-native-${{ runner.os }}-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
43
+ key : sentry-native-${{ matrix.target || runner.os }}-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
34
44
enableCrossOsArchive : true
35
45
36
46
- name : Remove unused applications
54
64
strategy :
55
65
fail-fast : false
56
66
matrix :
57
- # Pin ubuntu to ensure mono is installed
58
- # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
59
- os : [ubuntu-22.04, windows-latest, macos-15]
67
+ include :
68
+ - os : ubuntu-22.04 # Pin ubuntu to ensure mono is installed
69
+ - os : macos-15 # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
70
+ - os : windows-latest
71
+ - os : windows-11-arm
72
+ target : Windows-arm64
60
73
61
74
steps :
62
75
- name : Cancel Previous Runs
72
85
- name : Remove unused applications
73
86
uses : ./.github/actions/freediskspace
74
87
88
+ - name : Setup Environment
89
+ uses : ./.github/actions/environment
90
+
75
91
# We use macOS for the final publishing build so we get all the iOS/macCatalyst targets in the packages
76
92
- name : Set Environment Variables
77
93
if : runner.os == 'macOS'
@@ -94,36 +110,42 @@ jobs:
94
110
fail-on-cache-miss : true
95
111
96
112
- name : Download sentry-native (Windows)
97
- if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (runner.os == 'Windows') }}
113
+ if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (runner.os == 'Windows' && runner.arch == 'X64' ) }}
98
114
uses : actions/cache/restore@v4
99
115
with :
100
116
path : src/Sentry/Platforms/Native/sentry-native
101
117
key : sentry-native-Windows-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
102
118
fail-on-cache-miss : true
103
119
enableCrossOsArchive : true
104
120
105
- - name : Setup Environment
106
- uses : ./.github/actions/environment
121
+ - name : Download sentry-native (Windows arm64)
122
+ if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (runner.os == 'Windows' && runner.arch == 'ARM64') }}
123
+ uses : actions/cache/restore@v4
124
+ with :
125
+ path : src/Sentry/Platforms/Native/sentry-native
126
+ key : sentry-native-Windows-arm64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
127
+ fail-on-cache-miss : true
128
+ enableCrossOsArchive : true
107
129
108
130
- name : Build Native Dependencies
109
131
uses : ./.github/actions/buildnative
110
132
111
133
- name : Restore .NET Dependencies
112
- run : dotnet restore Sentry-CI-Build-${{ runner.os }}.slnf --nologo
134
+ run : dotnet restore Sentry-CI-Build-${{ matrix.target || runner.os }}.slnf --nologo
113
135
114
136
- name : Build
115
137
id : build
116
- run : dotnet build Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-restore --nologo -v:minimal -flp:logfile=build.log -p:CopyLocalLockFileAssemblies=true -bl:build.binlog
138
+ run : dotnet build Sentry-CI-Build-${{ matrix.target || runner.os }}.slnf -c Release --no-restore --nologo -v:minimal -flp:logfile=build.log -p:CopyLocalLockFileAssemblies=true -bl:build.binlog
117
139
118
140
- name : Upload build logs
119
141
if : ${{ steps.build.outcome != 'skipped' }}
120
142
uses : actions/upload-artifact@v4
121
143
with :
122
- name : ${{ runner.os }}-build-logs
144
+ name : ${{ matrix.target || runner.os }}-build-logs
123
145
path : build.binlog
124
146
125
147
- name : Test
126
- run : dotnet test Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-build --nologo -l GitHubActions -l "trx;LogFilePrefix=testresults_${{ runner.os }}" --collect "XPlat Code Coverage"
148
+ run : dotnet test Sentry-CI-Build-${{ matrix.target || runner.os }}.slnf -c Release --no-build --nologo -l GitHubActions -l "trx;LogFilePrefix=testresults_${{ runner.os }}" --collect "XPlat Code Coverage"
127
149
128
150
- name : Upload code coverage
129
151
uses : codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24
@@ -132,16 +154,16 @@ jobs:
132
154
if : failure()
133
155
uses : actions/upload-artifact@v4
134
156
with :
135
- name : ${{ runner.os }}-verify-test-results
157
+ name : ${{ matrix.target || runner.os }}-verify-test-results
136
158
path : " **/*.received.*"
137
159
138
- # To save time and disk space, we only create and archive the Nuget packages when we're actually releasing.
160
+ # To save time and disk space, we only create and archive the NuGet packages when we're actually releasing.
139
161
140
- - name : Create Nuget Packages
162
+ - name : Create NuGet Packages
141
163
if : env.CI_PUBLISHING_BUILD == 'true'
142
- run : dotnet pack Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-build --nologo
164
+ run : dotnet pack Sentry-CI-Build-${{ matrix.target || runner.os }}.slnf -c Release --no-build --nologo
143
165
144
- - name : Archive Nuget Packages
166
+ - name : Archive NuGet Packages
145
167
if : env.CI_PUBLISHING_BUILD == 'true'
146
168
uses : actions/upload-artifact@v4
147
169
with :
@@ -159,9 +181,11 @@ jobs:
159
181
strategy :
160
182
fail-fast : false
161
183
matrix :
162
- # Pin ubuntu to ensure mono is installed
163
- # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
164
- os : [ubuntu-22.04, windows-latest, macos-15]
184
+ include :
185
+ - os : ubuntu-22.04 # Pin ubuntu to ensure mono is installed
186
+ - os : macos-15 # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
187
+ - os : windows-latest
188
+ - os : windows-11-arm
165
189
166
190
steps :
167
191
- uses : actions/checkout@v4
@@ -173,7 +197,7 @@ jobs:
173
197
integration-test
174
198
.github
175
199
176
- - name : Fetch Nuget Packages
200
+ - name : Fetch NuGet Packages
177
201
uses : actions/download-artifact@v4
178
202
with :
179
203
name : ${{ github.sha }}
@@ -195,6 +219,7 @@ jobs:
195
219
196
220
197
221
trim-analysis :
222
+ needs : build-sentry-native
198
223
name : Trim analysis
199
224
runs-on : macos-15
200
225
@@ -205,7 +230,7 @@ jobs:
205
230
submodules : recursive
206
231
fetch-depth : 2 # default is 1 and codecov needs > 1
207
232
208
- # We use macOS for the final publishing build so we get all the iOS/macCatalyst targets in the packages
233
+ # We use macOS for the final publishing build so we get all the iOS/Mac Catalyst targets in the packages
209
234
- name : Set Environment Variables
210
235
run : echo "CI_PUBLISHING_BUILD=true" >> $GITHUB_ENV
211
236
0 commit comments