11name : Build iOS
22
3+ permissions :
4+ contents : read
5+
36on :
47 push :
58 branches :
3336 - ' **/*.podspec'
3437 - ' **/react-native.config.js'
3538 - ' **/nitro.json'
39+ workflow_dispatch :
3640
3741env :
3842 USE_CCACHE : 1
3943
40-
4144concurrency :
4245 group : ${{ github.workflow }}-${{ github.ref }}
4346 cancel-in-progress : true
4447
4548jobs :
46- build_new :
47- name : Build iOS Example App (new architecture )
49+ build :
50+ name : Build iOS Example App (${{ matrix.arch }} )
4851 runs-on : macOS-15
52+ strategy :
53+ fail-fast : false
54+ matrix :
55+ arch : [new, old]
4956 steps :
5057 - uses : actions/checkout@v6
5158 - uses : oven-sh/setup-bun@v2
52-
5359 - name : Setup Xcode
5460 uses : maxim-lobanov/setup-xcode@v1
5561 with :
5662 xcode-version : 16.4
5763
58- - name : Install npm dependencies (bun)
59- run : bun install
60-
61- - name : Setup Ruby (bundle)
62- uses : ruby/setup-ruby@v1
63- with :
64- ruby-version : 2.7.2
65- bundler-cache : true
66- working-directory : example/ios
67-
68- - name : Install xcpretty
69- run : gem install xcpretty
70-
71- - name : Restore Pods cache
72- uses : actions/cache@v4
73- with :
74- path : example/ios/Pods
75- key : ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock') }}
76- restore-keys : |
77- ${{ runner.os }}-pods-
78- - name : Install Pods
79- working-directory : example/ios
80- run : pod install
81- - name : Build App
82- working-directory : example/ios
83- run : " set -o pipefail && xcodebuild \
84- CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
85- -derivedDataPath build -UseModernBuildSystem=YES \
86- -workspace NitroFsExample.xcworkspace \
87- -scheme NitroFsExample \
88- -sdk iphonesimulator \
89- -configuration Debug \
90- -destination 'platform=iOS Simulator,name=iPhone 16' \
91- build \
92- CODE_SIGNING_ALLOWED=NO | xcpretty"
93-
94- build_old :
95- name : Build iOS Example App (old architecture)
96- runs-on : macOS-15
97- steps :
98- - uses : actions/checkout@v6
99- - uses : oven-sh/setup-bun@v2
100-
101- - name : Setup Xcode
102- uses : maxim-lobanov/setup-xcode@v1
103- with :
104- xcode-version : 16.4
105-
106- - name : Install npm dependencies (bun)
64+ - name : Install dependencies (bun)
10765 run : bun install
10866
10967 - name : Disable new architecture in Podfile
68+ if : matrix.arch == 'old'
11069 run : sed -i "" "s/ENV\['RCT_NEW_ARCH_ENABLED'\] = '1'/ENV['RCT_NEW_ARCH_ENABLED'] = '0'/g" example/ios/Podfile
11170
112- - name : Restore buildcache
113- uses : mikehardy/buildcache-action@v2
114- continue-on-error : true
115-
11671 - name : Setup Ruby (bundle)
11772 uses : ruby/setup-ruby@v1
11873 with :
119- ruby-version : 2.7.2
74+ ruby-version : ' 3.2 '
12075 bundler-cache : true
12176 working-directory : example/ios
12277
12378 - name : Install xcpretty
12479 run : gem install xcpretty
12580
126- - name : Restore Pods cache
127- uses : actions/cache@v4
128- with :
129- path : example/ios/Pods
130- key : ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock') }}
131- restore-keys : |
132- ${{ runner.os }}-pods-
81+ # - name: Cache CocoaPods
82+ # uses: actions/cache@v4
83+ # with:
84+ # path: example/ios/Pods
85+ # key: ${{ runner.os }}-pods-${{ hashFiles('example/ios/Podfile') }}
86+ # restore-keys: |
87+ # ${{ runner.os }}-pods-
88+
13389 - name : Install Pods
13490 working-directory : example/ios
13591 run : pod install
92+
13693 - name : Build App
13794 working-directory : example/ios
138- run : " set -o pipefail && xcodebuild \
139- CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
140- -derivedDataPath build -UseModernBuildSystem=YES \
141- -workspace NitroFsExample.xcworkspace \
142- -scheme NitroFsExample \
143- -sdk iphonesimulator \
144- -configuration Debug \
145- -destination 'platform=iOS Simulator,name=iPhone 16' \
146- build \
147- CODE_SIGNING_ALLOWED=NO | xcpretty"
95+ run : |
96+ set -o pipefail && xcodebuild \
97+ CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
98+ -derivedDataPath build -UseModernBuildSystem=YES \
99+ -workspace NitroFsExample.xcworkspace \
100+ -scheme NitroFsExample \
101+ -sdk iphonesimulator \
102+ -configuration Debug \
103+ -destination 'platform=iOS Simulator,name=iPhone 16' \
104+ build \
105+ CODE_SIGNING_ALLOWED=NO | xcpretty
0 commit comments