|
| 1 | +description: Builds the iOS app at the given path with the given build scheme |
| 2 | + |
| 3 | +executor: macos |
| 4 | + |
| 5 | +parameters: |
| 6 | + # For this job |
| 7 | + checkout: |
| 8 | + description: Boolean for whether or not to checkout as a first step. Default is false. |
| 9 | + type: boolean |
| 10 | + default: false |
| 11 | + attach_workspace: |
| 12 | + description: Boolean for whether or not to attach to an existing workspace. Default is true. |
| 13 | + type: boolean |
| 14 | + default: true |
| 15 | + workspace_root: |
| 16 | + description: Workspace root path that is either an absolute path or a path relative to the working directory. Defaults to '.' (the working directory). |
| 17 | + type: string |
| 18 | + default: . |
| 19 | + start_metro: |
| 20 | + description: If we should start the Metro packager in the background for this job. |
| 21 | + type: boolean |
| 22 | + default: false |
| 23 | + # For the iOS build command |
| 24 | + project_type: |
| 25 | + description: If the iOS app is built using a project file (*.xcodeproj) or a workspace. |
| 26 | + type: enum |
| 27 | + enum: ["project", "workspace"] |
| 28 | + default: "project" |
| 29 | + project_path: |
| 30 | + 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. |
| 31 | + type: string |
| 32 | + build_configuration: |
| 33 | + description: The build configuration to use. This is normally either "Debug" or "Release" but you may have custom build configuration configured for your app. |
| 34 | + type: string |
| 35 | + default: "Debug" |
| 36 | + derived_data_path: |
| 37 | + description: The path to the directory to place the derived data, relative to the root of the repository. |
| 38 | + type: string |
| 39 | + default: "ios/build" |
| 40 | + device: |
| 41 | + description: The type of device you want to build for. |
| 42 | + type: string |
| 43 | + default: "iPhone X" |
| 44 | + scheme: |
| 45 | + description: The scheme to use. |
| 46 | + type: string |
| 47 | + |
| 48 | +steps: |
| 49 | + - when: |
| 50 | + condition: <<parameters.checkout>> |
| 51 | + steps: |
| 52 | + - checkout |
| 53 | + - when: |
| 54 | + condition: <<parameters.attach_workspace>> |
| 55 | + steps: |
| 56 | + - attach_workspace: |
| 57 | + at: <<parameters.workspace_root>> |
| 58 | + - setup_macos_executor |
| 59 | + - yarn_install |
| 60 | + - when: |
| 61 | + condition: <<parameters.start_metro>> |
| 62 | + steps: |
| 63 | + - metro_start |
| 64 | + - ios_build: |
| 65 | + project_path: <<parameters.project_path>> |
| 66 | + derived_data_path: <<parameters.derived_data_path>> |
| 67 | + device: <<parameters.device>> |
| 68 | + build_configuration: <<parameters.build_configuration>> |
| 69 | + scheme: <<parameters.scheme>> |
| 70 | + project_type: <<parameters.project_type>> |
0 commit comments