-
Notifications
You must be signed in to change notification settings - Fork 31
64 lines (62 loc) · 1.92 KB
/
Copy pathreusable-build-workflow.yaml
File metadata and controls
64 lines (62 loc) · 1.92 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
on:
workflow_call:
inputs:
app:
required: true
type: string
ios:
default: "^26"
required: false
type: string
xcode:
default: "^26"
required: false
type: string
macos:
default: macos-latest
required: false
type: string
is_pr:
type: boolean
default: false
permissions:
contents: read
jobs:
build-ios:
runs-on: ${{ inputs.macos }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: ${{ inputs.is_pr }}
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
if: ${{ ! inputs.is_pr }}
with:
persist-credentials: false
ref: ${{ github.head_ref }}
- name: Install Dependencies
run: ./install.sh
- name: Install iOS 17 runtime if needed
if: ${{ inputs.ios == '^17' }}
run: xcodes runtimes install "iOS 17.5"
- uses: mxcl/xcodebuild@d3ee9b419c1be9a988086c58fe0988f32d99cfc5 # v3.6.0
id: build
with:
xcode: ${{ inputs.xcode }}
platform: iOS
platform-version: ${{ inputs.ios }}
workspace: SalesforceMobileSDK-Hybrid.xcworkspace
scheme: ${{ inputs.app }}
action: build
verbosity: xcbeautify
- name: Archive build logs on failure
if: failure() && steps.build.outcome == 'failure'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: xcode-build-logs-${{ inputs.app }}-ios${{ inputs.ios }}
path: |
~/Library/Developer/Xcode/DerivedData/**/Logs/Build/*.xcactivitylog
~/Library/Logs/DiagnosticReports/**
if-no-files-found: ignore
retention-days: 14