-
-
Notifications
You must be signed in to change notification settings - Fork 37
77 lines (65 loc) · 2.12 KB
/
build-ios-simulator.yml
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
name: Create an iOS Simulator build
on:
push:
paths:
- '*'
- '.github/workflows/build-ios-simulator.yml'
- 'ios/**'
- 'src/**'
- '!**/*.md'
branches:
- main
jobs:
build-ios-simulator:
name: Create an iOS Simulator build
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
# Setup Web environment to install packages.
- name: Setup Web environment
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
# Here '--frozen-lockfile' will only use commited 'yarn.lock', and will throw error if some update is needed
- name: Install node_modules
run: yarn install --frozen-lockfile
# improve iOS build compilation time
- name: Restore buildcache
uses: mikehardy/buildcache-action@v2
continue-on-error: true
- name: Restore Pods cache
uses: actions/cache@v3
with:
path: |
ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }}
restore-keys: ${{ runner.os }}-pods-
- name: Install Pod files
run: npx pod-install ios
- name: Install xcpretty
run: gem install xcpretty
- name: Run simulator build command
working-directory: ios
run: |
set -o pipefail
xcodebuild \
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
-scheme RN_Animations \
-workspace RN_Animations.xcworkspace \
-sdk iphonesimulator \
-configuration Release \
-derivedDataPath build | xcpretty
- name: Store build .app file as zip
working-directory: ios
run: |
cd build/Build/Products/Release-iphonesimulator
mkdir -p output
zip -r -y -o output/RN_Animations.zip RN_Animations.app
- name: Save build file as artifact
uses: actions/upload-artifact@v3
with:
name: rn_animation_samples_ios
path: ios/build/Build/Products/Release-iphonesimulator/output