Skip to content

Commit 3fc5c53

Browse files
committed
feat: Skip Detox setup in ios_build job
1 parent 451e591 commit 3fc5c53

File tree

3 files changed

+46
-14
lines changed

3 files changed

+46
-14
lines changed

src/commands/setup_macos_executor.yml

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ parameters:
1313
description: Should we run brew update? Defaults to true
1414
type: boolean
1515
default: true
16+
android:
17+
description: Should we set up the Android build environment? Defaults to true
18+
type: boolean
19+
default: true
20+
detox:
21+
description: Should we set up Detox? Defaults to true
22+
type: boolean
23+
default: true
1624

1725
steps:
1826
- run:
@@ -27,7 +35,12 @@ steps:
2735
source $BASH_ENV
2836
2937
- when:
30-
condition: <<parameters.homebrew_cache>>
38+
condition:
39+
and:
40+
- <<parameters.homebrew_cache>>
41+
- or:
42+
- <<parameters.android>>
43+
- <<parameters.detox>>
3144
steps:
3245
- restore_cache:
3346
key: |
@@ -50,24 +63,42 @@ steps:
5063
command: node --version
5164

5265
- when:
53-
condition: <<parameters.homebrew_update>>
66+
condition:
67+
and:
68+
- <<parameters.homebrew_update>>
69+
- or:
70+
- <<parameters.android>>
71+
- <<parameters.detox>>
5472
steps:
5573
- run:
5674
name: Update brew
5775
command: brew update >/dev/null
5876

59-
- run:
60-
name: Configure Detox Environment
61-
command: |
62-
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
63-
HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/cask >/dev/null
64-
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
65-
HOMEBREW_NO_AUTO_UPDATE=1 brew install android-commandlinetools >/dev/null
66-
touch .watchmanconfig
67-
node -v
77+
- when:
78+
condition: <<parameters.android>>
79+
steps:
80+
run:
81+
name: Configure Android Build Environment
82+
command: |
83+
HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/cask >/dev/null
84+
HOMEBREW_NO_AUTO_UPDATE=1 brew install android-commandlinetools >/dev/null
85+
86+
- when:
87+
condition: <<parameters.detox>>
88+
steps:
89+
run:
90+
name: Configure Detox Environment
91+
command: |
92+
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
93+
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
6894
6995
- when:
70-
condition: <<parameters.homebrew_cache>>
96+
condition:
97+
and:
98+
- <<parameters.homebrew_cache>>
99+
- or:
100+
- <<parameters.android>>
101+
- <<parameters.detox>>
71102
steps:
72103
- save_cache:
73104
paths:

src/jobs/ios_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ steps:
8686
at: <<parameters.workspace_root>>
8787
- setup_macos_executor:
8888
node_version: <<parameters.node_version>>
89-
homebrew_cache: <<parameters.homebrew_cache>>
90-
homebrew_update: <<parameters.homebrew_update>>
89+
android: false
90+
detox: false
9191
- yarn_install:
9292
cache: <<parameters.yarn_cache>>
9393
cache_folder: <<parameters.yarn_cache_folder>>

src/jobs/ios_build_and_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ steps:
104104
at: <<parameters.workspace_root>>
105105
- setup_macos_executor:
106106
node_version: <<parameters.node_version>>
107+
android: false
107108
homebrew_cache: <<parameters.homebrew_cache>>
108109
homebrew_update: <<parameters.homebrew_update>>
109110
- ios_simulator_start:

0 commit comments

Comments
 (0)