-
-
Notifications
You must be signed in to change notification settings - Fork 397
670 lines (601 loc) · 25.5 KB
/
Copy pathbuild.yml
File metadata and controls
670 lines (601 loc) · 25.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
name: Build
on:
push:
branches:
- main
- v8.x
- release/**
pull_request:
types: [opened, synchronize, reopened, labeled]
# Concurrency configuration:
# - We use workflow-specific concurrency groups to prevent multiple build runs of the same code,
# which would waste CI resources without providing additional value.
# - For pull requests, we cancel in-progress builds when new commits are pushed since only the
# latest commit's build results matter for merge decisions.
# - For main branch pushes, we never cancel builds to ensure all release and sample builds complete,
# as broken builds on main could block releases and affect downstream consumers.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ready-to-merge-gate:
name: Ready-to-merge gate
uses: ./.github/workflows/ready-to-merge-workflow.yml
files-changed:
name: Detect File Changes
runs-on: ubuntu-latest
needs: ready-to-merge-gate
outputs:
run_build_for_prs: ${{ steps.changes.outputs.run_build_for_prs }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Get changed files
id: changes
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
# We had issues that the release build was broken on main.
# With this we catch potential issues already in the PR.
ios-swift-release:
name: Release Build of iOS Swift
# Run the job for PRs with related changes (including external contributors) or non-PR events.
# Don't run this on release branches, cause the SPM Package.swift points to the unreleased versions.
if: startsWith(github.ref, 'refs/heads/release/') == false && (github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true')
needs: files-changed
runs-on: macos-26
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
# As the DistributionSample project uses local SPM, xcodebuild resolves SPM dependencies for all
# sample projects. The Package.swift references binary targets, which in release branch commits points
# to non-existent download URLs. This creates chicken-egg failures when building these sample apps for
# a release commit build. When building these sample apps for a release commit, xcodebuild tries to
# resolve all SPM dependencies, including the binary targets pointing to these non-existent URLs. The
# sample projects don't use SPM for including Sentry. Only the DistributionSample uses local SPM.
# Therefore, we only keep the local DistributionSample reference in the Package.swift as a workaround.
- name: Only keep distribution lib and target in Package.swift
run: ./scripts/prepare-package.sh --remove-binary-targets true
- name: Setup Xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- name: Setup Ruby
uses: ruby/setup-ruby@89f90524b88a01fe6e0b732220432cc6142926af # v1.313.0
with:
bundler-cache: true
- run: make init-ci-build
- run: make xcode-ci
- name: Run Fastlane
# We only need to archive, not package the IPA, so we skip codesigning.
run: bundle exec fastlane build_ios_swift_without_codesigning
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
build-sample:
name: Sample ${{ matrix.scheme }} ${{ matrix.config }}
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true'
needs: files-changed
runs-on: macos-26
strategy:
fail-fast: false
matrix:
# other sample projects are built in ui-tests
include:
- scheme: watchOS-Swift WatchKit App
config: Debug
- scheme: macOS-SwiftUI
config: Debug
- scheme: SessionReplay-CameraTest
config: Debug
- scheme: iOS-Swift
config: Debug
- scheme: macOS-Swift
config: Debug
- scheme: tvOS-Swift
config: Debug
- scheme: visionOS-Swift
config: Debug
- scheme: iOS-SwiftUI
config: Debug
- scheme: iOS-ObjectiveC
config: Debug
- scheme: iOS-ObjectiveCpp-NoModules
config: Debug
- scheme: SPM
config: Debug
- scheme: DistributionSample
config: Debug
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
# Some sample projects use local SPM references. xcodebuild resolves SPM dependencies for the
# workspace, so Package.swift binary targets can be resolved even when building another scheme.
# On release branches these binary target URLs point to artifacts that do not exist yet, causing
# release commit builds to fail before the artifacts are published.
- name: Remove binary targets from Package.swift
run: ./scripts/prepare-package.sh --remove-binary-targets true
- name: Setup Xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- run: make init-ci-build
- run: make xcode-ci
# Note: Due to complexity in implementing the CODE_SIGNING_ALLOWED flag in the sentry-xcodebuild.sh script,
# we did not yet migrate this step to use the script yet.
- run: |
set -o pipefail && NSUnbufferedIO=YES xcodebuild \
-workspace Sentry.xcworkspace \
-scheme '${{matrix.scheme}}' \
-configuration '${{matrix.config}}' \
CODE_SIGNING_ALLOWED="NO" \
build 2>&1 | tee raw-build-output.log | xcbeautify --preserve-unbeautified
- name: Archiving Raw Build Logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: ${{ failure() || cancelled() }}
with:
name: raw-build-output-scheme-${{matrix.scheme}}
path: |
raw-build-output.log
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
build-sample-binary:
name: Sample ${{ matrix.scheme }} ${{ matrix.config }}
# These samples depend on SentryObjC binary targets whose URLs point to
# unpublished artifacts on release branches.
if: startsWith(github.ref, 'refs/heads/release/') == false && (github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true')
needs: files-changed
runs-on: macos-26
strategy:
fail-fast: false
matrix:
include:
- scheme: iOS-ObjectiveC-Dynamic
config: Debug
- scheme: iOS-ObjectiveC-Static
config: Debug
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Setup Xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- run: make init-ci-build
- run: make xcode-ci
- run: |
set -o pipefail && NSUnbufferedIO=YES xcodebuild \
-workspace Sentry.xcworkspace \
-scheme '${{matrix.scheme}}' \
-configuration '${{matrix.config}}' \
CODE_SIGNING_ALLOWED="NO" \
build 2>&1 | tee raw-build-output.log | xcbeautify --preserve-unbeautified
- name: Archiving Raw Build Logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: ${{ failure() || cancelled() }}
with:
name: raw-build-output-scheme-${{matrix.scheme}}
path: |
raw-build-output.log
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
build-sample-spm:
name: Sample SPM ${{ matrix.name }}
# Don't run this on release branches, cause the SPM Package.swift points to the unreleased versions.
if: startsWith(github.ref, 'refs/heads/release/') == false && (github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true')
needs: files-changed
runs-on: macos-26
strategy:
fail-fast: false
matrix:
include:
- name: iOS
make-target: build-sample-iOS-SwiftUI-SPM
- name: watchOS
make-target: build-sample-watchOS-SwiftUI-SPM
- name: tvOS
make-target: build-sample-tvOS-SwiftUI-SPM
- name: macOS
make-target: build-sample-macOS-SwiftUI-SPM
- name: visionOS
make-target: build-sample-visionOS-SwiftUI-SPM
steps:
- name: Checkout Repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Setup Xcode
id: setup-xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- name: Resolve test destination
id: resolve-test-destination
uses: ./.github/actions/resolve-test-destination
with:
platform: iOS
- name: Install xcodegen
run: brew install xcodegen
- name: Build Sample
run: make ${{ matrix.make-target }}
env:
IOS_SIMULATOR_OS: ${{ steps.setup-xcode.outputs.ios-simulator-os }}
IOS_DEVICE_NAME: ${{ steps.resolve-test-destination.outputs.TEST_DEVICE }}
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
check-macOS-CLI-Xcode-no-UI-framework:
name: macOS CLI (NoUIFramework) builds and has no AppKit/UIKit
# Don't run this on release branches, cause the SPM Package.swift points to the unreleased versions.
if: startsWith(github.ref, 'refs/heads/release/') == false && (github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true')
needs: files-changed
runs-on: macos-26
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Setup Xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- name: Build macOS-CLI-Xcode sample
run: |
set -o pipefail && xcodebuild \
-project "Samples/macOS-CLI-Xcode/macOS-CLI-Xcode.xcodeproj" \
-scheme macOS-CLI-Xcode \
-configuration Debug \
-destination 'platform=macOS' \
-derivedDataPath "$GITHUB_WORKSPACE/cli-xcode-build" \
CODE_SIGNING_ALLOWED="NO" build | xcbeautify --preserve-unbeautified
- name: Ensure CLI binary does not link AppKit
run: ./scripts/check-ui-framework-linkage.sh --configuration Debug --derived-data "$GITHUB_WORKSPACE/cli-xcode-build" --linkage unlinked --module macOS-CLI-Xcode --framework AppKit
- name: Ensure CLI binary does not link UIKit
run: ./scripts/check-ui-framework-linkage.sh --configuration Debug --derived-data "$GITHUB_WORKSPACE/cli-xcode-build" --linkage unlinked --module macOS-CLI-Xcode --framework UIKit
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
build-distribution:
name: Build the distribution framework
runs-on: macos-26
# Don't run this on release branches, cause the SPM Package.swift points to the unreleased versions.
if: startsWith(github.ref, 'refs/heads/release/') == false && (github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true')
needs: files-changed
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Setup Xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- run: |
set -o pipefail && NSUnbufferedIO=YES xcodebuild \
-workspace . \
-scheme SentryDistribution \
-sdk iphoneos \
-destination 'generic/platform=iphoneos' \
build | tee raw-build-output-spm.log | xcbeautify --preserve-unbeautified
shell: sh
- name: Upload SPM Build Logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: ${{ failure() || cancelled() }}
with:
name: raw-build-output-spm
path: |
raw-build-output-spm.log
build-spm:
name: Build with SPM
runs-on: macos-26
# Don't run this on release branches, cause the SPM Package.swift points to the unreleased versions.
if: startsWith(github.ref, 'refs/heads/release/') == false && (github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true')
needs: files-changed
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Setup Xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- run: |
set -o pipefail && NSUnbufferedIO=YES xcodebuild \
-workspace . \
-scheme SentrySPM \
-sdk watchos \
-destination 'generic/platform=watchOS' \
build | tee raw-build-output-spm-watchos.log | xcbeautify --preserve-unbeautified
shell: sh
- run: |
set -o pipefail && NSUnbufferedIO=YES xcodebuild \
-workspace . \
-scheme SentrySPM \
-sdk iphoneos \
-destination 'generic/platform=iphoneos' \
build | tee raw-build-output-spm-iphoneos.log | xcbeautify --preserve-unbeautified
shell: sh
- name: Upload SPM Build Logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: ${{ failure() || cancelled() }}
with:
name: raw-build-output-spm
path: |
raw-build-output-spm-watchos.log
raw-build-output-spm-iphoneos.log
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
check-debug-without-UIKit:
name: Check no UIKit linkage (DebugWithoutUIKit)
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true'
needs: files-changed
runs-on: macos-26
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Setup Xcode
id: setup-xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- name: Resolve test destination
id: resolve-test-destination
uses: ./.github/actions/resolve-test-destination
with:
platform: iOS
- name: Build for Debug
env:
REF: ${{ github.ref }}
IOS_SIMULATOR_OS: ${{ steps.setup-xcode.outputs.ios-simulator-os }}
IOS_DEVICE_NAME: ${{ steps.resolve-test-destination.outputs.TEST_DEVICE }}
run: |
./scripts/sentry-xcodebuild.sh \
--platform iOS \
--os "$IOS_SIMULATOR_OS" \
--ref "${REF}" \
--command build \
--device "$IOS_DEVICE_NAME" \
--configuration DebugWithoutUIKit \
--derived-data uikit-check-build
- name: Ensure UIKit is not linked
run: ./scripts/check-ui-framework-linkage.sh --configuration DebugWithoutUIKit --derived-data uikit-check-build --linkage unlinked --module SentryWithoutUIKit
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
check-release-without-UIKit:
name: Check no UIKit linkage (ReleaseWithoutUIKit)
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true'
needs: files-changed
runs-on: macos-26
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Setup Xcode
id: setup-xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- name: Resolve test destination
id: resolve-test-destination
uses: ./.github/actions/resolve-test-destination
with:
platform: iOS
- name: Build for Release
env:
REF: ${{ github.ref }}
IOS_SIMULATOR_OS: ${{ steps.setup-xcode.outputs.ios-simulator-os }}
IOS_DEVICE_NAME: ${{ steps.resolve-test-destination.outputs.TEST_DEVICE }}
run: |
./scripts/sentry-xcodebuild.sh \
--platform iOS \
--os "$IOS_SIMULATOR_OS" \
--ref "${REF}" \
--command build \
--device "$IOS_DEVICE_NAME" \
--configuration ReleaseWithoutUIKit \
--derived-data uikit-check-build
- name: Ensure UIKit is not linked
run: ./scripts/check-ui-framework-linkage.sh --configuration ReleaseWithoutUIKit --derived-data uikit-check-build --linkage unlinked --module SentryWithoutUIKit
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
check-debug-with-UIKit:
name: Check UIKit linkage (Debug)
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true'
needs: files-changed
runs-on: macos-26
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Setup Xcode
id: setup-xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- name: Resolve test destination
id: resolve-test-destination
uses: ./.github/actions/resolve-test-destination
with:
platform: iOS
- name: Build for Debug
env:
REF: ${{ github.ref }}
IOS_SIMULATOR_OS: ${{ steps.setup-xcode.outputs.ios-simulator-os }}
IOS_DEVICE_NAME: ${{ steps.resolve-test-destination.outputs.TEST_DEVICE }}
run: |
./scripts/sentry-xcodebuild.sh \
--platform iOS \
--os "$IOS_SIMULATOR_OS" \
--ref "${REF}" \
--command build \
--device "$IOS_DEVICE_NAME" \
--configuration Debug \
--derived-data uikit-check-build
- name: Ensure UIKit is linked
run: ./scripts/check-ui-framework-linkage.sh --configuration Debug --derived-data uikit-check-build --linkage linked --module Sentry
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
check-release-with-UIKit:
name: Check UIKit linkage (Release)
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true'
needs: files-changed
runs-on: macos-26
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Setup Xcode
id: setup-xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- name: Resolve test destination
id: resolve-test-destination
uses: ./.github/actions/resolve-test-destination
with:
platform: iOS
- name: Build for Release
env:
REF: ${{ github.ref }}
IOS_SIMULATOR_OS: ${{ steps.setup-xcode.outputs.ios-simulator-os }}
IOS_DEVICE_NAME: ${{ steps.resolve-test-destination.outputs.TEST_DEVICE }}
run: |
./scripts/sentry-xcodebuild.sh \
--platform iOS \
--os "$IOS_SIMULATOR_OS" \
--ref "${REF}" \
--command build \
--device "$IOS_DEVICE_NAME" \
--configuration Release \
--derived-data uikit-check-build
- name: Ensure UIKit is linked
run: ./scripts/check-ui-framework-linkage.sh --configuration Release --derived-data uikit-check-build --linkage linked --module Sentry
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
check-release-with-AppKit:
name: Check AppKit linkage (Release)
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true'
needs: files-changed
runs-on: macos-26
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Setup Xcode
id: setup-xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- name: Resolve test destination
id: resolve-test-destination
uses: ./.github/actions/resolve-test-destination
with:
platform: macOS
- name: Build for Release
env:
REF: ${{ github.ref }}
run: |
./scripts/sentry-xcodebuild.sh \
--platform macOS \
--os latest \
--ref "${REF}" \
--command build \
--configuration Release \
--derived-data appkit-check-build
- name: Ensure AppKit is linked
run: ./scripts/check-ui-framework-linkage.sh --configuration Release --derived-data appkit-check-build --linkage linked --module Sentry --framework AppKit
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
check-release-without-AppKit:
name: Check no AppKit linkage (ReleaseWithoutUIKit)
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true'
needs: files-changed
runs-on: macos-26
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Setup Xcode
id: setup-xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- name: Resolve test destination
id: resolve-test-destination
uses: ./.github/actions/resolve-test-destination
with:
platform: macOS
- name: Build for Release
env:
REF: ${{ github.ref }}
run: |
./scripts/sentry-xcodebuild.sh \
--platform macOS \
--os latest \
--ref "${REF}" \
--command build \
--configuration ReleaseWithoutUIKit \
--derived-data no-appkit-check-build
- name: Ensure AppKit is not linked
run: ./scripts/check-ui-framework-linkage.sh --configuration ReleaseWithoutUIKit --derived-data no-appkit-check-build --linkage unlinked --module SentryWithoutUIKit --framework AppKit
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
# The compiler only evaluates SentryAsyncSafeLogs that get printed based on the SENTRY_ASYNC_SAFE_LOG_LEVEL.
# So if the level is set to error, which is the default, and a SENTRY_ASYNC_SAFE_LOG_DEBUG has a compiler error,
# you only get the compiler error when setting the SENTRY_ASYNC_SAFE_LOG_LEVEL to SENTRY_ASYNC_SAFE_LOG_LEVEL_DEBUG or lower.
check-compiling-async-safe-logs:
name: Check compiling Async Safe Logs
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_build_for_prs == 'true'
needs: files-changed
runs-on: macos-26
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
# If the SentryAsyncSafeLog doesn't contain the SENTRY_ASYNC_SAFE_LOG_LEVEL_ERROR this fails.
- name: Async Safe Log Level is Error
run: grep -c "SENTRY_ASYNC_SAFE_LOG_LEVEL SENTRY_ASYNC_SAFE_LOG_LEVEL_ERROR" Sources/Sentry/SentryAsyncSafeLog.h
- name: Set Async Safe Log Level to Debug
run: |
sed -i '' 's/#define SENTRY_ASYNC_SAFE_LOG_LEVEL SENTRY_ASYNC_SAFE_LOG_LEVEL_ERROR/#define SENTRY_ASYNC_SAFE_LOG_LEVEL SENTRY_ASYNC_SAFE_LOG_LEVEL_TRACE/' Sources/Sentry/SentryAsyncSafeLog.h
shell: bash
- name: Setup Xcode
id: setup-xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- name: Resolve test destination
id: resolve-test-destination
uses: ./.github/actions/resolve-test-destination
with:
platform: iOS
- name: Build for Debug
env:
REF: ${{ github.ref }}
IOS_SIMULATOR_OS: ${{ steps.setup-xcode.outputs.ios-simulator-os }}
IOS_DEVICE_NAME: ${{ steps.resolve-test-destination.outputs.TEST_DEVICE }}
run: |
./scripts/sentry-xcodebuild.sh \
--platform iOS \
--os "$IOS_SIMULATOR_OS" \
--ref "${REF}" \
--command build \
--device "$IOS_DEVICE_NAME" \
--configuration Debug
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
build-required-check:
needs:
[
files-changed,
ios-swift-release,
build-sample,
build-sample-binary,
build-sample-spm,
check-macOS-CLI-Xcode-no-UI-framework,
build-distribution,
build-spm,
check-debug-without-UIKit,
check-release-without-UIKit,
check-debug-with-UIKit,
check-release-with-UIKit,
check-release-with-AppKit,
check-release-without-AppKit,
check-compiling-async-safe-logs,
ready-to-merge-gate,
]
name: Build
# This is necessary since a failed/skipped dependent job would cause this job to be skipped
if: always()
runs-on: ubuntu-latest
steps:
# If any jobs we depend on fails gets cancelled or times out, this job will fail.
# Skipped jobs are not considered failures.
- name: Check for failures
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: |
echo "One of the build jobs has failed." && exit 1