Skip to content

Commit 06b2949

Browse files
committed
Try to parametrize executors to use the min Xcode version for some jobs
1 parent 8c5340f commit 06b2949

File tree

5 files changed

+32
-2
lines changed

5 files changed

+32
-2
lines changed

.circleci/configurations/commands.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ commands:
7979
type: string
8080

8181
steps:
82+
- run:
83+
name: Move to Node 18 if Needed
84+
command:
85+
node_version=$(node -v)
86+
major_version=$(echo $node_version | cut -c 2- | cut -d '.' -f 1)
87+
if [[ $major_version < 18 ]]; then
88+
nvm install 18.18.0
89+
else
90+
echo 'We have the right node version!'
91+
fi
8292
- restore_cache:
8393
keys:
8494
- << parameters.yarn_base_cache_key >>-{{ arch }}-{{ checksum "yarn.lock" }}

.circleci/configurations/executors.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,10 @@ executors:
3636
resource_class: macos.x86.medium.gen2
3737
environment:
3838
- BUILD_FROM_SOURCE: true
39+
reactnativeios-lts:
40+
<<: *defaults
41+
macos:
42+
xcode: '14.1.0'
43+
resource_class: macos.x86.medium.gen2
44+
environment:
45+
- BUILD_FROM_SOURCE: true

.circleci/configurations/jobs.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ jobs:
387387
# JOBS: Test iOS Template
388388
# -------------------------
389389
test_ios_template:
390-
executor: reactnativeios
391390
parameters:
392391
flavor:
393392
default: "Debug"
@@ -430,6 +429,11 @@ jobs:
430429
cocoapods_cache_key:
431430
type: string
432431
default: *template_cocoapods_cache_key
432+
executor:
433+
description: The executor to use
434+
default: reactnativeios
435+
type: string
436+
executor: << parameters.executor >>
433437
environment:
434438
- PROJECT_NAME: "iOSTemplateProject"
435439
- HERMES_WS_DIR: *hermes_workspace_root
@@ -502,7 +506,7 @@ jobs:
502506
# JOBS: Test iOS RNTester
503507
# -------------------------
504508
test_ios_rntester:
505-
executor: reactnativeios
509+
506510
parameters:
507511
jsengine:
508512
default: "Hermes"
@@ -527,6 +531,11 @@ jobs:
527531
description: whether unit tests should run or not.
528532
default: false
529533
type: boolean
534+
executor:
535+
description: The executor to use
536+
default: reactnativeios
537+
type: string
538+
executor: << parameters.executor >>
530539
steps:
531540
- checkout_code_with_cache
532541
- run_yarn

.circleci/configurations/test_workflows/testAll.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
ruby_version: "3.2.0"
6161
architecture: "NewArch"
6262
flavor: "Debug"
63+
executor: reactnativeios-lts
6364
- test_ios_template:
6465
requires:
6566
- build_npm_package
@@ -152,6 +153,7 @@
152153
name: "Test RNTester with Ruby 3.2.0"
153154
ruby_version: "3.2.0"
154155
architecture: "NewArch"
156+
executor: reactnativeios-lts
155157
- test_ios_rntester:
156158
requires:
157159
- build_hermes_macos

.circleci/configurations/test_workflows/testIOS.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
ruby_version: "3.2.0"
5252
architecture: "NewArch"
5353
flavor: "Debug"
54+
executor: reactnativeios-lts
5455
- test_ios_template:
5556
requires:
5657
- build_npm_package
@@ -143,6 +144,7 @@
143144
name: "Test RNTester with Ruby 3.2.0"
144145
ruby_version: "3.2.0"
145146
architecture: "NewArch"
147+
executor: reactnativeios-lts
146148
- test_ios_rntester:
147149
requires:
148150
- build_hermes_macos

0 commit comments

Comments
 (0)