Skip to content

Commit 3bdd3d6

Browse files
committed
Add commands to build the iOS project
1 parent 4cce8fd commit 3bdd3d6

File tree

3 files changed

+77
-1
lines changed

3 files changed

+77
-1
lines changed

src/commands/android_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ steps:
5858
key: gradle-home-cache-{{ checksum "~/.tmp/checksumfiles/build.gradle" }}-{{ checksum "~/.tmp/checksumfiles/settings.gradle" }}
5959

6060
- run:
61-
name: Build Android Debug APK
61+
name: Build Android APK
6262
command: "cd <<parameters.project_path>> && chmod +x gradlew && ./gradlew --build-cache --max-workers 2 --continue assemble<<parameters.build_type>> assembleAndroidTest -DtestBuildType=<<parameters.build_type>> --stacktrace"
6363

6464
- run:

src/commands/ios_build_project.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
description: Builds the iOS app at the given path with the given build scheme and configuration. This should be run only after installing NPM dependencies. If you are using Cocoapods then please use the "ios_build_workspace" command.
2+
3+
parameters:
4+
project_path:
5+
description: The path to the Xcode project (*.xcodeproj) you want to build, relative to the root of the repository.
6+
type: string
7+
derived_data_path:
8+
description: The path to the directory to place the derived data, relative to the root of the repository.
9+
type: string
10+
default: "ios/build"
11+
device:
12+
description: The type of device you want to build for.
13+
type: string
14+
default: "iPhone X"
15+
configuration:
16+
description: The build configuration to use. This is normally either "Debug" or "Release" but you may have custom build configuration configured for your app.
17+
type: string
18+
default: "Debug"
19+
scheme:
20+
description: The scheme to use.
21+
type: string
22+
23+
steps:
24+
- restore_cache:
25+
name: Restoring iOS Build caches
26+
keys:
27+
- ios-build-cache-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/package.json" }}-{{ .Environment.CACHE_VERSION }}
28+
29+
- run:
30+
name: Build iOS Project
31+
command: "export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -project <<parameters.project_path>> -destination 'platform=iOS Simulator,name=<<parameters.device>>' -scheme <<parameters.scheme>> -parallelizeTargets -configuration <<parameters.configuration>> -derivedDataPath <<parameters.derived_data_path>> -UseModernBuildSystem=YES | xcpretty -k"
32+
33+
- save_cache:
34+
name: Saving iOS Build Cache
35+
paths:
36+
- <<parameters.derived_data_path>>/Build
37+
key: ios-build-cache-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/package.json" }}-{{ .Environment.CACHE_VERSION }}
38+
when: always

src/commands/ios_build_workspace.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
description: Builds the iOS app at the given path with the given build scheme and configuration. This should be run only after installing NPM dependencies. If you do not use Xcode workspaces then please use the "ios_build_project" command.
2+
3+
parameters:
4+
workspace_path:
5+
description: The path to the Xcode workspace (*.xcworkspace) you want to build, relative to the root of the repository.
6+
type: string
7+
derived_data_path:
8+
description: The path to the directory to place the derived data, relative to the root of the repository.
9+
type: string
10+
default: "ios/build"
11+
device:
12+
description: The type of device you want to build for.
13+
type: string
14+
default: "iPhone X"
15+
configuration:
16+
description: The build configuration to use. This is normally either "Debug" or "Release" but you may have custom build configuration configured for your app.
17+
type: string
18+
default: "Debug"
19+
scheme:
20+
description: The scheme to use.
21+
type: string
22+
23+
steps:
24+
- restore_cache:
25+
name: Restoring iOS Build caches
26+
keys:
27+
- ios-build-cache-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/package.json" }}-{{ .Environment.CACHE_VERSION }}
28+
29+
- run:
30+
name: Build iOS Workspace
31+
command: "export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace <<parameters.workspace_path>> -destination 'platform=iOS Simulator,name=<<parameters.device>>' -scheme <<parameters.scheme>> -parallelizeTargets -configuration <<parameters.configuration>> -derivedDataPath <<parameters.derived_data_path>> -UseModernBuildSystem=YES | xcpretty -k"
32+
33+
- save_cache:
34+
name: Saving iOS Build Cache
35+
paths:
36+
- <<parameters.derived_data_path>>/Build
37+
key: ios-build-cache-{{ arch }}-{{ checksum "~/.tmp/checksumfiles/package.json" }}-{{ .Environment.CACHE_VERSION }}
38+
when: always

0 commit comments

Comments
 (0)