15
15
jobs :
16
16
build-sentry-native :
17
17
name : sentry-native (${{ matrix.os }})
18
- runs-on : ${{ matrix.os }}-latest
18
+ runs-on : ${{ matrix.os }}
19
19
strategy :
20
20
fail-fast : false
21
21
matrix :
22
- os : [ubuntu, windows, macos]
22
+ # Pin macos to get the version of XCode that we need: https://github.com/actions/runner-images/issues/10703
23
+ os : [ubuntu-latest, windows-latest, macos-15]
23
24
24
25
steps :
25
26
- name : Checkout
35
36
enableCrossOsArchive : true
36
37
37
38
- name : Free Disk Space (Ubuntu)
38
- if : matrix .os == 'ubuntu-latest '
39
+ if : runner .os == 'Linux '
39
40
uses : jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
40
41
with :
41
42
android : true
@@ -63,31 +64,20 @@ jobs:
63
64
strategy :
64
65
fail-fast : false
65
66
matrix :
66
- os : [ubuntu-latest, windows-latest, macos-latest]
67
+ # Pin macos to get the version of XCode that we need: https://github.com/actions/runner-images/issues/10703
68
+ os : [ubuntu-latest, windows-latest, macos-15]
67
69
68
70
steps :
69
71
- name : Cancel Previous Runs
70
72
if : github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')
71
73
uses : styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # Tag: 0.12.1
72
74
73
75
- name : Setup Xcode
74
- if : matrix .os == 'macos-latest '
76
+ if : runner .os == 'macOS '
75
77
run : |
76
78
sudo xcode-select --switch /Applications/Xcode_${{env.XCODE_VERSION}}.app/Contents/Developer
77
79
xcodebuild -version
78
80
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
-
91
81
- name : Checkout
92
82
uses : actions/checkout@v4
93
83
with :
96
86
97
87
# We use macOS for the final publishing build so we we get all the iOS/macCatalyst targets in the packages
98
88
- name : Set Environment Variables
99
- if : startsWith(matrix .os, 'macos')
89
+ if : runner .os == 'macOS'
100
90
run : echo "CI_PUBLISHING_BUILD=true" >> $GITHUB_ENV
101
91
102
92
- name : Download sentry-native (Linux)
@@ -133,6 +123,12 @@ jobs:
133
123
- name : Restore .NET Dependencies
134
124
run : dotnet restore Sentry-CI-Build-${{ runner.os }}.slnf --nologo
135
125
126
+ - name : Install Android SDKs
127
+ if : runner.os == 'macOS'
128
+ run : |
129
+ dotnet build src/Sentry/Sentry.csproj -t:InstallAndroidDependencies -f:net7.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/"
130
+ dotnet build src/Sentry/Sentry.csproj -t:InstallAndroidDependencies -f:net8.0-android -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/"
131
+
136
132
- name : Build
137
133
run : dotnet build Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-restore --nologo -v:minimal -flp:logfile=build.log -p:CopyLocalLockFileAssemblies=true
138
134
@@ -173,7 +169,8 @@ jobs:
173
169
strategy :
174
170
fail-fast : false
175
171
matrix :
176
- os : [ubuntu-latest, windows-latest, macos-latest]
172
+ # Pin macos to get the version of XCode that we need: https://github.com/actions/runner-images/issues/10703
173
+ os : [ubuntu-latest, windows-latest, macos-15]
177
174
178
175
steps :
179
176
- uses : actions/checkout@v4
@@ -183,6 +180,7 @@ jobs:
183
180
sparse-checkout : |
184
181
Directory.Build.props
185
182
integration-test
183
+ .github
186
184
- name : Fetch Nuget Packages
187
185
uses : actions/download-artifact@v4
188
186
with :
@@ -195,26 +193,8 @@ jobs:
195
193
sudo apt update
196
194
sudo apt install libcurl4-openssl-dev
197
195
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
196
+ - name : Setup Environment
197
+ uses : ./.github/actions/environment
218
198
219
199
- name : Test
220
200
uses : getsentry/github-workflows/sentry-cli/integration-test/@v2
0 commit comments