Repository navigation
67 lines (61 loc) · 2.3 KB
/
Copy pathios.yml
File metadata and controls
67 lines (61 loc) · 2.3 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
name: iOS
on:
workflow_call:
inputs:
affected:
description: Skip jobs when this toolchain is unaffected
type: boolean
default: true
workflow_dispatch:
inputs:
affected:
description: Skip jobs when this toolchain is unaffected
type: boolean
default: true
concurrency:
group: iOS-${{github.ref_name}}-${{github.event_name == 'pull_request' && github.event.pull_request.number || github.sha}}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
permissions:
contents: read
env:
CI: true
# No step-security/harden-runner step: that action only supports Ubuntu, and iOS builds must run on
# macOS. This workflow needs no secrets.
jobs:
test:
name: Build & Test (theme library)
if: ${{ inputs.affected == true }}
runs-on: macos-15
timeout-minutes: 30
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
# Same commands as `yarn nx run cds-ios:test` / `cds-ios:build` (packages/cds-ios/project.json),
# invoked directly so this workflow needs no Yarn, Node, or the JS install.
- name: Swift test
working-directory: packages/cds-ios
run: swift test
- name: Swift build (release)
working-directory: packages/cds-ios
run: swift build -c release
simulator-build:
name: iOS Simulator build (gallery app)
if: ${{ inputs.affected == true }}
runs-on: macos-15
timeout-minutes: 30
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install XcodeGen
run: brew install xcodegen
# Regenerate the (git-ignored) Xcode project from project.yml, then compile the iOS app
# target for a simulator. This validates that the gallery sources — and the local
# packages/cds-ios dependency — compile for the iOS SDK. Mirrors `yarn nx run ios-gallery:build`.
- name: Generate Xcode project
working-directory: apps/ios-gallery
run: xcodegen generate
- name: Build CDSGalleryiOS for the Simulator
working-directory: apps/ios-gallery
run: |
xcodebuild -project CDSGallery.xcodeproj -scheme CDSGalleryiOS \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath .build/xcode \
build