Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS CI Release on macos-12 #690

Merged
merged 36 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
dbd19d1
Draft ios.yml
leotm Jun 15, 2022
e6b6a2f
Fix indentation
leotm Jun 15, 2022
e96f6cc
Update ios.yml
leotm Jun 16, 2022
5a16530
Build app for release
leotm Jun 19, 2022
04a51f5
Fix prod build error w Flipper, set env flag
leotm Jun 19, 2022
d5bee8a
Remove stale comment
leotm Jun 19, 2022
7fc5f25
Merge remote-tracking branch 'origin/master' into ci/ios
leotm Jul 25, 2022
60907d3
Temporarily add `npx react-native info`
leotm Jul 26, 2022
fe78ddb
Move `npx react-native info` after `yarn`
leotm Jul 26, 2022
f8e3488
Add release bundle step before build
leotm Jul 27, 2022
8a6f23e
Update bundle script
leotm Jul 27, 2022
98b9cd1
Update bundle script
leotm Jul 27, 2022
81cfc76
Merge remote-tracking branch 'origin/master' into ci/ios
leotm Jul 28, 2022
098a492
Update RN CLI from next (8.0.0-alpha.0) to 9.0.0-alpha.5
leotm Jul 28, 2022
582f3b3
Remove devDep @react-native-community/cli
leotm Jul 28, 2022
80e7354
Try bundling also to ios/MyApp/main.jsbundle
leotm Jul 28, 2022
73f02fd
Merge remote-tracking branch 'origin/master' into ci/ios
leotm Jul 30, 2022
74add54
Add debug before release bundle/build
leotm Jul 31, 2022
11f0c89
Merge branch 'master' into ci/ios
leotm Jul 31, 2022
c2bafa9
Fix yarn lockfile/cache conflict res
leotm Jul 31, 2022
776ba4d
Add normal pod install before debug
leotm Jul 31, 2022
0ea4d01
Comment debug pod install and build, working fine
leotm Aug 1, 2022
e2e96b7
Update pbxproj and xcscheme
leotm Aug 1, 2022
41ed14b
Disable Metro experimentalImportSupport
leotm Aug 3, 2022
d538833
Merge branch 'master' into ci/ios
leotm Aug 3, 2022
7def6f8
Resolve Yarn lockfile
leotm Aug 3, 2022
8f15810
Rename xcode.env prefix _ to .
leotm Aug 3, 2022
646dd74
Remove react-native-flipper
leotm Aug 3, 2022
42b2a06
Revert "Remove react-native-flipper"
leotm Aug 5, 2022
855d25b
Revert "Rename xcode.env prefix _ to ."
leotm Aug 5, 2022
a91c3fb
Revert "Disable Metro experimentalImportSupport"
leotm Aug 5, 2022
6e08fe6
Add index.js for iOS Release bundling
leotm Aug 5, 2022
cf060bf
Add back @react-native-community/cli 9.0.0-alpha.5
leotm Aug 5, 2022
8d0d2d2
Revert "Try bundling also to ios/MyApp/main.jsbundle"
leotm Aug 5, 2022
cfcc6ae
Revert "Comment debug pod install and build, working fine"
leotm Aug 5, 2022
a955a06
Update workflow comments
leotm Aug 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: iOS CI with Xcode

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build-ios:

runs-on: macos-12

# ruby: 2.7.6, 3.0.4, 3.1.2 (../.ruby-version: 2.7.5)
# CocoaPods: 1.11.3

steps:

- uses: actions/checkout@v3

# - uses: mikehardy/buildcache-action@v1

# yarn cache
# node_modules cache

- name: Install all project dependencies
run: yarn

- name: npx react-native info
run: npx react-native info

# - uses: ruby/setup-ruby@v1
# with:
# bundler-cache: true # bundle install and cache installed gems automatically
# - run: bundle exec rake

# - uses: setup/cocoapods # cache

- name: Install pods
run: cd ios && pod install && cd ..

- name: Build app for Debug
run: npx react-native run-ios --configuration Debug

# - name: Xcode clean
# run: xcodebuild clean

- name: Install pods (prod)
run: cd ios && PRODUCTION=1 pod install && cd ..
# --repo-update
# --clean-install

- name: Bundle app for release
run: npx react-native bundle --entry-file='index.ts' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'

- name: Build app for release
run: npx react-native run-ios --configuration Release
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ob1-npm-0.70.2-1b23ee5270-e36d9e7729.zip
Binary file not shown.
Binary file removed .yarn/cache/ob1-npm-0.70.3-b86ecc9472-5053160676.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Use index.ts
* Only here for iOS Release build bundling
*/

import { AppRegistry } from 'react-native'

import { name } from './app.json'
import Root from './src'

AppRegistry.registerComponent(name, () => Root)
6 changes: 1 addition & 5 deletions ios/MyApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
00E356EE1AD99517003FC87E /* MyAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MyAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* MyAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyAppTests.m; sourceTree = "<group>"; };
Expand All @@ -44,7 +43,6 @@
B3561C4B24410BD300AE4B32 /* MyApp-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MyApp-Bridging-Header.h"; sourceTree = "<group>"; };
B36B6748266D0E86007CD52E /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = "Launch Screen.storyboard"; path = "/Users/leo/Documents/GitHub/LeoTMApp/ios/Launch Screen.storyboard"; sourceTree = "<absolute>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
F52DFF8E484078E0BFF2BDBE /* Pods-MyApp-MyAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MyApp-MyAppTests.debug.xcconfig"; path = "Target Support Files/Pods-MyApp-MyAppTests/Pods-MyApp-MyAppTests.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -89,7 +87,6 @@
isa = PBXGroup;
children = (
B36B6748266D0E86007CD52E /* Launch Screen.storyboard */,
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
13B07FB01A68108700A75B9A /* AppDelegate.mm */,
13B07FB51A68108700A75B9A /* Images.xcassets */,
Expand All @@ -104,7 +101,6 @@
isa = PBXGroup;
children = (
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
7FF4B8C4D42B2E7AC629DD93 /* libPods-MyApp.a */,
39C30EA5EC35B0DE95DF8892 /* libPods-MyApp-MyAppTests.a */,
);
Expand Down Expand Up @@ -205,7 +201,7 @@
83CBB9F71A601CBA00E9B192 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1130;
LastUpgradeCheck = 1210;
ORGANIZATIONNAME = LeoTM;
TargetAttributes = {
00E356ED1AD99517003FC87E = {
Expand Down
2 changes: 1 addition & 1 deletion ios/MyApp.xcodeproj/xcshareddata/xcschemes/MyApp.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1210"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@babel/runtime": "7.18.9",
"@curveball/core": "0.19.0",
"@curveball/router": "0.4.1",
"@react-native-community/cli": "next",
"@react-native-community/cli": "9.0.0-alpha.5",
"@react-native-community/eslint-config": "3.0.3",
"@storybook/addon-actions": "6.5.9",
"@storybook/addon-controls": "6.5.9",
Expand Down
Loading