-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (76 loc) · 2.35 KB
/
Copy pathios-ci.yml
File metadata and controls
89 lines (76 loc) · 2.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
name: iOS CI
on:
push:
branches: [ main, develop, master ]
pull_request:
branches: [ main, develop, master ]
jobs:
build:
name: Build and Test
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.4'
- name: Show Xcode version
run: xcodebuild -version
- name: Show available simulators
run: xcrun simctl list devicetypes
# TODO: Remove this once we have a way to install CocoaPods
# - name: Cache CocoaPods
# uses: actions/cache@v4
# with:
# path: Pods
# key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
# restore-keys: |
# ${{ runner.os }}-pods-
# - name: Install CocoaPods
# run: |
# sudo gem install cocoapods
# pod --version
# - name: Install Pod Dependencies
# run: |
# pod install --repo-update
- name: Build for iOS Simulator
run: |
xcodebuild \
-workspace RemoteShutter.xcworkspace \
-scheme RemoteCam \
-destination 'platform=iOS Simulator,OS=18.3.1,name=iPhone 16' \
-configuration Debug \
clean build \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Run Tests (if available)
run: |
xcodebuild \
-workspace RemoteShutter.xcworkspace \
-scheme RemoteCam \
-destination 'platform=iOS Simulator,OS=18.3.1,name=iPhone 16' \
-configuration Debug \
test \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
continue-on-error: true
- name: Archive for Release (if main branch)
if: github.ref == 'refs/heads/main'
run: |
xcodebuild \
-workspace RemoteShutter.xcworkspace \
-scheme RemoteCam \
-configuration Release \
-archivePath RemoteShutter.xcarchive \
archive \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Upload Build Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: build-logs
path: |
~/Library/Developer/Xcode/DerivedData/**/Logs/**
retention-days: 5