99 paths-ignore :
1010 - " **.md"
1111
12- env :
13- XCODE_VERSION : 16
14-
1512jobs :
1613 build-sentry-native :
1714 name : sentry-native (${{ matrix.os }})
18- runs-on : ${{ matrix.os }}-latest
15+ runs-on : ${{ matrix.os }}
1916 strategy :
2017 fail-fast : false
2118 matrix :
22- os : [ubuntu, windows, macos]
19+ # Pin macos to get the version of XCode that we need: https://github.com/actions/runner-images/issues/10703
20+ os : [ubuntu-latest, windows-latest, macos-15]
2321
2422 steps :
2523 - name : Checkout
3432 key : sentry-native-${{ runner.os }}-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
3533 enableCrossOsArchive : true
3634
37- - name : Free Disk Space (Ubuntu)
38- if : matrix.os == 'ubuntu-latest'
39- uses : jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
40- with :
41- android : true
42- dotnet : false
43- haskell : true
44- large-packages : false
45- docker-images : false
46- swap-storage : true
35+ - name : Remove unused applications
36+ uses : ./.github/actions/freediskspace
4737
4838 - name : Install build dependencies
4939 if : steps.cache.outputs.cache-hit != 'true' && runner.os == 'Linux'
@@ -63,40 +53,26 @@ jobs:
6353 strategy :
6454 fail-fast : false
6555 matrix :
66- os : [ubuntu-latest, windows-latest, macos-latest]
56+ # Pin macos to get the version of XCode that we need: https://github.com/actions/runner-images/issues/10703
57+ os : [ubuntu-latest, windows-latest, macos-15]
6758
6859 steps :
6960 - name : Cancel Previous Runs
7061 if : github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')
7162 uses : styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # Tag: 0.12.1
7263
73- - name : Setup Xcode
74- if : matrix.os == 'macos-latest'
75- run : |
76- sudo xcode-select --switch /Applications/Xcode_${{env.XCODE_VERSION}}.app/Contents/Developer
77- xcodebuild -version
78-
79- # We only use Xcode 16
80- - name : Remove unused applications
81- if : matrix.os == 'macos-latest'
82- run : |
83- df -hI /dev/disk3s1s1
84- sudo rm -rf /Applications/Xcode_14.3.1.app
85- sudo rm -rf /Applications/Xcode_15.0.1.app
86- sudo rm -rf /Applications/Xcode_15.1.app
87- sudo rm -rf /Applications/Xcode_15.2.app
88- sudo rm -rf /Applications/Xcode_15.3.app
89- df -hI /dev/disk3s1s1
90-
9164 - name : Checkout
9265 uses : actions/checkout@v4
9366 with :
9467 submodules : recursive
9568 fetch-depth : 2 # default is 1 and codecov needs > 1
9669
97- # We use macOS for the final publishing build so we we get all the iOS/macCatalyst targets in the packages
70+ - name : Remove unused applications
71+ uses : ./.github/actions/freediskspace
72+
73+ # We use macOS for the final publishing build so we get all the iOS/macCatalyst targets in the packages
9874 - name : Set Environment Variables
99- if : startsWith(matrix .os, 'macos')
75+ if : runner .os == 'macOS'
10076 run : echo "CI_PUBLISHING_BUILD=true" >> $GITHUB_ENV
10177
10278 - name : Download sentry-native (Linux)
@@ -133,14 +109,19 @@ jobs:
133109 - name : Restore .NET Dependencies
134110 run : dotnet restore Sentry-CI-Build-${{ runner.os }}.slnf --nologo
135111
112+ - name : Install Android SDKs
113+ if : runner.os == 'macOS'
114+ run : |
115+ dotnet build src/Sentry/Sentry.csproj -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/"
116+
136117 - name : Build
137118 run : dotnet build Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-restore --nologo -v:minimal -flp:logfile=build.log -p:CopyLocalLockFileAssemblies=true
138119
139120 - name : Test
140121 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"
141122
142123 - name : Upload code coverage
143- uses : codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238
124+ uses : codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a
144125
145126 - name : Upload build and test outputs
146127 if : failure()
@@ -173,7 +154,8 @@ jobs:
173154 strategy :
174155 fail-fast : false
175156 matrix :
176- os : [ubuntu-latest, windows-latest, macos-latest]
157+ # Pin macos to get the version of XCode that we need: https://github.com/actions/runner-images/issues/10703
158+ os : [ubuntu-latest, windows-latest, macos-15]
177159
178160 steps :
179161 - uses : actions/checkout@v4
@@ -183,6 +165,8 @@ jobs:
183165 sparse-checkout : |
184166 Directory.Build.props
185167 integration-test
168+ .github
169+
186170 - name : Fetch Nuget Packages
187171 uses : actions/download-artifact@v4
188172 with :
@@ -195,26 +179,8 @@ jobs:
195179 sudo apt update
196180 sudo apt install libcurl4-openssl-dev
197181
198- - uses : actions/setup-dotnet@v4
199- with :
200- dotnet-version : 8.0.x
201-
202- - name : Setup Xcode
203- if : matrix.os == 'macos-latest'
204- run : |
205- sudo xcode-select --switch /Applications/Xcode_${{env.XCODE_VERSION}}.app/Contents/Developer
206- xcodebuild -version
207-
208- # Needed for Android SDK setup step
209- - uses : actions/setup-java@v4
210- with :
211- distribution : ' temurin'
212- java-version : ' 17'
213-
214- - name : Setup Android SDK
215- uses : android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2
216-
217- - run : dotnet workload install android maui-android
182+ - name : Setup Environment
183+ uses : ./.github/actions/environment
218184
219185 - name : Test
220186 uses : getsentry/github-workflows/sentry-cli/integration-test/@v2
0 commit comments