-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (105 loc) · 3.35 KB
/
Copy pathobjective-c-xcode.yml
File metadata and controls
125 lines (105 loc) · 3.35 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
name: Xcode Build & Analyze
on:
push:
branches: [ main, master ]
pull_request:
workflow_dispatch:
concurrency:
group: xcode-${{ github.ref }}
cancel-in-progress: true
jobs:
build-analyze:
runs-on: macos-15
env:
SCHEME: RandomTimeriOS
CONFIGURATION: Debug
DESTINATION: platform=iOS Simulator,OS=18.5,name=iPhone 16
RESULT_BUNDLE: BuildResults.xcresult
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.4"
- name: Show Xcode version
run: xcodebuild -version
- name: Cache SwiftPM
uses: actions/cache@v4
with:
path: |
~/Library/Caches/org.swift.swiftpm
~/Library/Developer/Xcode/DerivedData/**/SourcePackages
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Clean, Build, Analyze
run: |
set -eo pipefail
xcodebuild \
-scheme "$SCHEME" \
-configuration "$CONFIGURATION" \
-destination "$DESTINATION" \
-resultBundlePath "$RESULT_BUNDLE" \
clean build analyze \
| xcpretty
- name: Publish Xcode annotations
if: ${{ !cancelled() }}
uses: gmazzo/publish-report-annotations@v1
with:
# This action scans report paths; point it at your xcresult
reports:
${{ env.RESULT_BUNDLE }}
# Optional: fail the job if analyzer produced errors (keep false if you prefer “warnings only”)
failOnError: false
- name: Upload xcresult
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ env.RESULT_BUNDLE }}
path: ${{ env.RESULT_BUNDLE }}
build-analyze-watchos:
name: watchOS Build & Analyze
runs-on: macos-15
env:
SCHEME: RandomTimerWatchOS Watch App
CONFIGURATION: Debug
DESTINATION: generic/platform=watchOS
RESULT_BUNDLE: BuildResults-watchOS.xcresult
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.4"
- name: Show Xcode version
run: xcodebuild -version
- name: Cache SwiftPM
uses: actions/cache@v4
with:
path: |
~/Library/Caches/org.swift.swiftpm
~/Library/Developer/Xcode/DerivedData/**/SourcePackages
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Clean, Build, Analyze (watchOS)
run: |
set -eo pipefail
xcodebuild \
-scheme "$SCHEME" \
-configuration "$CONFIGURATION" \
-destination "$DESTINATION" \
-resultBundlePath "$RESULT_BUNDLE" \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY="" \
clean build analyze \
| xcpretty
- name: Upload xcresult (watchOS)
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ env.RESULT_BUNDLE }}
path: ${{ env.RESULT_BUNDLE }}