@@ -16,21 +16,31 @@ jobs:
1616 strategy :
1717 fail-fast : false
1818 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
2225
2326 steps :
2427 - name : Checkout
2528 uses : actions/checkout@v4
2629
2730 - run : git submodule update --init modules/sentry-native
2831
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+
2939 - uses : actions/cache@v4
3040 id : cache
3141 with :
3242 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') }}
3444 enableCrossOsArchive : true
3545
3646 - name : Remove unused applications
5464 strategy :
5565 fail-fast : false
5666 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
6073
6174 steps :
6275 - name : Cancel Previous Runs
7285 - name : Remove unused applications
7386 uses : ./.github/actions/freediskspace
7487
88+ - name : Setup Environment
89+ uses : ./.github/actions/environment
90+
7591 # We use macOS for the final publishing build so we get all the iOS/macCatalyst targets in the packages
7692 - name : Set Environment Variables
7793 if : runner.os == 'macOS'
@@ -94,36 +110,42 @@ jobs:
94110 fail-on-cache-miss : true
95111
96112 - 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' ) }}
98114 uses : actions/cache/restore@v4
99115 with :
100116 path : src/Sentry/Platforms/Native/sentry-native
101117 key : sentry-native-Windows-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
102118 fail-on-cache-miss : true
103119 enableCrossOsArchive : true
104120
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
107129
108130 - name : Build Native Dependencies
109131 uses : ./.github/actions/buildnative
110132
111133 - 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
113135
114136 - name : Build
115137 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
117139
118140 - name : Upload build logs
119141 if : ${{ steps.build.outcome != 'skipped' }}
120142 uses : actions/upload-artifact@v4
121143 with :
122- name : ${{ runner.os }}-build-logs
144+ name : ${{ matrix.target || runner.os }}-build-logs
123145 path : build.binlog
124146
125147 - 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"
127149
128150 - name : Upload code coverage
129151 uses : codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24
@@ -132,16 +154,16 @@ jobs:
132154 if : failure()
133155 uses : actions/upload-artifact@v4
134156 with :
135- name : ${{ runner.os }}-verify-test-results
157+ name : ${{ matrix.target || runner.os }}-verify-test-results
136158 path : " **/*.received.*"
137159
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.
139161
140- - name : Create Nuget Packages
162+ - name : Create NuGet Packages
141163 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
143165
144- - name : Archive Nuget Packages
166+ - name : Archive NuGet Packages
145167 if : env.CI_PUBLISHING_BUILD == 'true'
146168 uses : actions/upload-artifact@v4
147169 with :
@@ -159,9 +181,11 @@ jobs:
159181 strategy :
160182 fail-fast : false
161183 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
165189
166190 steps :
167191 - uses : actions/checkout@v4
@@ -173,7 +197,7 @@ jobs:
173197 integration-test
174198 .github
175199
176- - name : Fetch Nuget Packages
200+ - name : Fetch NuGet Packages
177201 uses : actions/download-artifact@v4
178202 with :
179203 name : ${{ github.sha }}
@@ -195,6 +219,7 @@ jobs:
195219
196220
197221 trim-analysis :
222+ needs : build-sentry-native
198223 name : Trim analysis
199224 runs-on : macos-15
200225
@@ -205,7 +230,7 @@ jobs:
205230 submodules : recursive
206231 fetch-depth : 2 # default is 1 and codecov needs > 1
207232
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
209234 - name : Set Environment Variables
210235 run : echo "CI_PUBLISHING_BUILD=true" >> $GITHUB_ENV
211236
0 commit comments