-
Notifications
You must be signed in to change notification settings - Fork 79
/
Copy pathios_build.yml
138 lines (135 loc) · 4.8 KB
/
ios_build.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
description: Builds the iOS app at the given path with the given build scheme
parameters:
# For this job
checkout:
description: Boolean for whether or not to checkout as a first step. Default is false.
type: boolean
default: false
attach_workspace:
description: Boolean for whether or not to attach to an existing workspace. Default is true.
type: boolean
default: true
workspace_root:
description: Workspace root path that is either an absolute path or a path relative to the working directory. Defaults to '.' (the working directory).
type: string
default: .
start_metro:
description: If we should start the Metro packager in the background for this job.
type: boolean
default: false
pod_install_directory:
type: string
default: ""
description: The location of the "ios" directory for `pod install`. Will skip `pod install` if missing.
pod_cache:
description: Save and restore the CocoaPods cache? Defaults to true
type: boolean
default: true
yarn_cache:
description: Should we cache after yarn install? Defaults to true
type: boolean
default: true
yarn_cache_folder:
description: The path to the yarn cache folder
type: string
default: "/tmp/yarn"
# For the iOS build command
project_type:
description: If the iOS app is built using a project file (*.xcodeproj) or a workspace.
type: enum
enum: ["project", "workspace"]
default: "project"
project_path:
description: The path to the Xcode project (*.xcodeproj) or the Xcode workspace (*.xcworkspace) that you want to build, relative to the root of the repository.
type: string
build_configuration:
description: The build configuration to use. This is normally either "Debug" or "Release" but you may have custom build configuration configured for your app.
type: string
default: "Debug"
derived_data_path:
description: The path to the directory to place the derived data, relative to the root of the repository.
type: string
default: "ios/build"
device:
description: The type of device you want to build for.
type: string
default: "iPhone 11"
scheme:
description: The scheme to use.
type: string
on_after_initialize:
description: A custom command to run right after yarn install.
type: string
default: ""
xcodebuild_cache:
description: Should we cache after Xcode build? Defaults to true
type: boolean
default: true
# For macos executor
node_version:
description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1").
type: string
default: "16"
homebrew_cache:
description: Should we cache after brew install? Defaults to true
type: boolean
default: true
homebrew_update:
description: Should we run brew update? Defaults to true
type: boolean
default: true
xcode_version:
description: The version of Xcode to use. See here for the list of supported versions https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions
type: string
default: "12.5.1"
resource_class:
description: You can use whatever resource class your plan has access to. See https://circleci.com/docs/using-macos/#available-resource-classes
type: string
default: macos.x86.medium.gen2
executor:
name: macos
xcode_version: <<parameters.xcode_version>>
resource_class: <<parameters.resource_class>>
steps:
- when:
condition: <<parameters.checkout>>
steps:
- checkout
- when:
condition: <<parameters.attach_workspace>>
steps:
- attach_workspace:
at: <<parameters.workspace_root>>
- setup_macos_executor:
node_version: <<parameters.node_version>>
homebrew_cache: <<parameters.homebrew_cache>>
homebrew_update: <<parameters.homebrew_update>>
android: false
detox: false
- yarn_install:
cache: <<parameters.yarn_cache>>
cache_folder: <<parameters.yarn_cache_folder>>
- when:
condition: <<parameters.on_after_initialize>>
steps:
- run:
name: "on_after_initialize"
command: <<parameters.on_after_initialize>>
- when:
condition: <<parameters.start_metro>>
steps:
- metro_start
- when:
condition: <<parameters.pod_install_directory>>
steps:
- pod_install:
pod_install_directory: <<parameters.pod_install_directory>>
cache: <<parameters.pod_cache>>
- ios_build:
project_path: <<parameters.project_path>>
derived_data_path: <<parameters.derived_data_path>>
device: <<parameters.device>>
build_configuration: <<parameters.build_configuration>>
scheme: <<parameters.scheme>>
project_type: <<parameters.project_type>>
cache: <<parameters.xcodebuild_cache>>