11
11
12
12
jobs :
13
13
build-sentry-native :
14
- name : sentry-native (${{ matrix.container.image || matrix.os }})
14
+ name : sentry-native (${{ matrix.rid }})
15
15
runs-on : ${{ matrix.os }}
16
- container : ${{ matrix.container.image }}
16
+ container : ${{ matrix.container }}
17
17
strategy :
18
18
fail-fast : false
19
19
matrix :
20
20
include :
21
21
- os : ubuntu-22.04 # Pin ubuntu to ensure mono is installed
22
+ rid : linux-x64
22
23
- os : ubuntu-22.04-arm
24
+ rid : linux-arm64
23
25
target : Linux-arm64
24
26
- os : ubuntu-latest
27
+ rid : linux-musl-x64
25
28
target : Linux-musl
26
29
container :
27
30
image : ghcr.io/getsentry/sentry-dotnet-alpine:3.21
28
31
- os : macos-15 # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
32
+ rid : macos # universal (osx-arm64 + osx-x64)
29
33
- os : windows-latest
34
+ rid : win-x64
30
35
- os : windows-11-arm
36
+ rid : win-arm64
31
37
target : Windows-arm64
32
38
33
39
steps :
47
53
id : cache
48
54
with :
49
55
path : src/Sentry/Platforms/Native/sentry-native
50
- key : sentry-native-${{ matrix.target || runner.os }}-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
56
+ key : sentry-native-${{ matrix.rid }}-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
51
57
enableCrossOsArchive : true
52
58
53
59
- name : Remove unused applications
60
66
61
67
build :
62
68
needs : build-sentry-native
63
- name : .NET (${{ matrix.container.image || matrix.os }})
69
+ name : .NET (${{ matrix.rid }})
64
70
runs-on : ${{ matrix.os }}
65
71
container : ${{ matrix.container }}
66
72
@@ -69,19 +75,27 @@ jobs:
69
75
matrix :
70
76
include :
71
77
- os : ubuntu-22.04 # Pin ubuntu to ensure mono is installed
72
- target : Linux
78
+ rid : linux-x64
79
+ slnf : Sentry-CI-Build-Linux.slnf
73
80
- os : ubuntu-22.04-arm
74
- target : Linux-arm64
81
+ rid : linux-arm64
82
+ slnf : Sentry-CI-Build-Linux-arm64.slnf
75
83
- os : ubuntu-latest
76
- target : Linux-musl
84
+ rid : linux-musl-x64
85
+ slnf : Sentry-CI-Build-Linux-musl.slnf
77
86
container :
78
87
image : ghcr.io/getsentry/sentry-dotnet-alpine:3.21
79
88
volumes :
80
89
- /var/run/docker.sock:/var/run/docker.sock
81
90
- os : macos-15 # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
91
+ rid : macos # universal (osx-arm64 + osx-x64)
92
+ slnf : Sentry-CI-Build-macOS.slnf
82
93
- os : windows-latest
94
+ rid : win-x64
95
+ slnf : Sentry-CI-Build-Windows.slnf
83
96
- os : windows-11-arm
84
- target : Windows-arm64
97
+ rid : win-arm64
98
+ slnf : Sentry-CI-Build-Windows-arm64.slnf
85
99
86
100
steps :
87
101
- name : Cancel Previous Runs
@@ -106,53 +120,53 @@ jobs:
106
120
if : runner.os == 'macOS'
107
121
run : echo "CI_PUBLISHING_BUILD=true" >> $GITHUB_ENV
108
122
109
- - name : Download sentry-native (Linux )
110
- if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.target == 'Linux ') }}
123
+ - name : Download sentry-native (linux-x64 )
124
+ if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'linux-x64 ') }}
111
125
uses : actions/cache/restore@v4
112
126
with :
113
127
path : src/Sentry/Platforms/Native/sentry-native
114
- key : sentry-native-Linux -${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
128
+ key : sentry-native-linux-x64 -${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
115
129
fail-on-cache-miss : true
116
130
117
- - name : Download sentry-native (Linux arm64)
118
- if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.target == 'Linux -arm64') }}
131
+ - name : Download sentry-native (linux- arm64)
132
+ if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'linux -arm64') }}
119
133
uses : actions/cache/restore@v4
120
134
with :
121
135
path : src/Sentry/Platforms/Native/sentry-native
122
- key : sentry-native-Linux -arm64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
136
+ key : sentry-native-linux -arm64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
123
137
fail-on-cache-miss : true
124
138
125
- - name : Download sentry-native (Linux musl)
126
- if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.target == 'Linux -musl') }}
139
+ - name : Download sentry-native (linux- musl-x64 )
140
+ if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'linux -musl-x64 ') }}
127
141
uses : actions/cache/restore@v4
128
142
with :
129
143
path : src/Sentry/Platforms/Native/sentry-native
130
- key : sentry-native-Linux -musl-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
144
+ key : sentry-native-linux -musl-x64 -${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
131
145
fail-on-cache-miss : true
132
146
133
- - name : Download sentry-native (macOS )
134
- if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (runner.os == 'macOS ') }}
147
+ - name : Download sentry-native (macos )
148
+ if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'macos ') }}
135
149
uses : actions/cache/restore@v4
136
150
with :
137
151
path : src/Sentry/Platforms/Native/sentry-native
138
- key : sentry-native-macOS -${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
152
+ key : sentry-native-macos -${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
139
153
fail-on-cache-miss : true
140
154
141
- - name : Download sentry-native (Windows )
142
- if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (runner.os == 'Windows' && runner.arch == 'X64 ') }}
155
+ - name : Download sentry-native (win-x64 )
156
+ if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'win-x64 ') }}
143
157
uses : actions/cache/restore@v4
144
158
with :
145
159
path : src/Sentry/Platforms/Native/sentry-native
146
- key : sentry-native-Windows -${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
160
+ key : sentry-native-win-x64 -${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
147
161
fail-on-cache-miss : true
148
162
enableCrossOsArchive : true
149
163
150
- - name : Download sentry-native (Windows arm64)
151
- if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (runner.os == 'Windows' && runner.arch == 'ARM64 ') }}
164
+ - name : Download sentry-native (win- arm64)
165
+ if : ${{ (env.CI_PUBLISHING_BUILD == 'true') || (matrix.rid == 'win-arm64 ') }}
152
166
uses : actions/cache/restore@v4
153
167
with :
154
168
path : src/Sentry/Platforms/Native/sentry-native
155
- key : sentry-native-Windows -arm64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
169
+ key : sentry-native-win -arm64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
156
170
fail-on-cache-miss : true
157
171
enableCrossOsArchive : true
158
172
@@ -161,21 +175,21 @@ jobs:
161
175
uses : ./.github/actions/buildnative
162
176
163
177
- name : Restore .NET Dependencies
164
- run : dotnet restore Sentry-CI-Build- ${{ matrix.target || runner.os }}.slnf --nologo
178
+ run : dotnet restore ${{ matrix.slnf }} --nologo
165
179
166
180
- name : Build
167
181
id : build
168
- 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
182
+ run : dotnet build ${{ matrix.slnf }} -c Release --no-restore --nologo -v:minimal -flp:logfile=build.log -p:CopyLocalLockFileAssemblies=true -bl:build.binlog
169
183
170
184
- name : Upload build logs
171
185
if : ${{ steps.build.outcome != 'skipped' }}
172
186
uses : actions/upload-artifact@v4
173
187
with :
174
- name : ${{ matrix.target || runner.os }}-build-logs
188
+ name : ${{ matrix.rid }}-build-logs
175
189
path : build.binlog
176
190
177
191
- name : Test
178
- 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"
192
+ run : dotnet test ${{ matrix.slnf }} -c Release --no-build --nologo -l GitHubActions -l "trx;LogFilePrefix=testresults_${{ runner.os }}" --collect "XPlat Code Coverage"
179
193
180
194
- name : Upload code coverage
181
195
uses : codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24
@@ -184,11 +198,11 @@ jobs:
184
198
if : failure()
185
199
uses : actions/upload-artifact@v4
186
200
with :
187
- name : ${{ matrix.target || runner.os }}-verify-test-results
201
+ name : ${{ matrix.rid }}-verify-test-results
188
202
path : " **/*.received.*"
189
203
190
204
- name : Create NuGet Packages
191
- run : dotnet pack Sentry-CI-Build- ${{ matrix.target || runner.os }}.slnf -c Release --no-build --nologo
205
+ run : dotnet pack ${{ matrix.slnf }} -c Release --no-build --nologo
192
206
193
207
- name : Archive NuGet Packages
194
208
if : env.CI_PUBLISHING_BUILD == 'true'
@@ -258,7 +272,7 @@ jobs:
258
272
if : ${{ steps.msbuild.outcome != 'skipped' }}
259
273
uses : actions/upload-artifact@v4
260
274
with :
261
- name : ${{ matrix.target || runner.os }}-msbuild-logs
275
+ name : ${{ runner.os }}-msbuild-logs
262
276
path : |
263
277
msbuild.log
264
278
msbuild.binlog
@@ -283,7 +297,7 @@ jobs:
283
297
uses : actions/cache/restore@v4
284
298
with :
285
299
path : src/Sentry/Platforms/Native/sentry-native
286
- key : sentry-native-macOS -${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
300
+ key : sentry-native-macos -${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
287
301
fail-on-cache-miss : true
288
302
289
303
- name : Setup Environment
0 commit comments