Skip to content

Commit 43daf79

Browse files
committed
Try to parametrize executors to use the min Xcode version for some jobs
1 parent 0239776 commit 43daf79

File tree

5 files changed

+33
-2
lines changed

5 files changed

+33
-2
lines changed

.circleci/configurations/commands.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@ 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+
88+
if [[ $major_version < 18 ]]; then
89+
nvm install 18.18.0
90+
else
91+
echo 'We have the right node version!'
92+
fi
8293
- restore_cache:
8394
keys:
8495
- << 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
@@ -386,7 +386,6 @@ jobs:
386386
# JOBS: Test iOS Template
387387
# -------------------------
388388
test_ios_template:
389-
executor: reactnativeios
390389
parameters:
391390
flavor:
392391
default: "Debug"
@@ -424,6 +423,11 @@ jobs:
424423
cocoapods_cache_key:
425424
type: string
426425
default: *template_cocoapods_cache_key
426+
executor:
427+
description: The executor to use
428+
default: reactnativeios
429+
type: string
430+
executor: << parameters.executor >>
427431
environment:
428432
- PROJECT_NAME: "iOSTemplateProject"
429433
- HERMES_WS_DIR: *hermes_workspace_root
@@ -492,7 +496,7 @@ jobs:
492496
# JOBS: Test iOS RNTester
493497
# -------------------------
494498
test_ios_rntester:
495-
executor: reactnativeios
499+
496500
parameters:
497501
jsengine:
498502
default: "Hermes"
@@ -517,6 +521,11 @@ jobs:
517521
description: whether unit tests should run or not.
518522
default: false
519523
type: boolean
524+
executor:
525+
description: The executor to use
526+
default: reactnativeios
527+
type: string
528+
executor: << parameters.executor >>
520529
steps:
521530
- checkout_code_with_cache
522531
- run_yarn

.circleci/configurations/test_workflows/testAll.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
ruby_version: "3.2.0"
6262
architecture: "NewArch"
6363
flavor: "Debug"
64+
executor: reactnativeios-lts
6465
- test_ios_template:
6566
requires:
6667
- build_npm_package
@@ -82,6 +83,7 @@
8283
name: "Test RNTester with Ruby 3.2.0"
8384
ruby_version: "3.2.0"
8485
architecture: "NewArch"
86+
executor: reactnativeios-lts
8587
- test_ios_rntester:
8688
requires:
8789
- build_hermes_macos

.circleci/configurations/test_workflows/testIOS.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
ruby_version: "3.2.0"
5353
architecture: "NewArch"
5454
flavor: "Debug"
55+
executor: reactnativeios-lts
5556
- test_ios_template:
5657
requires:
5758
- build_npm_package
@@ -73,6 +74,7 @@
7374
name: "Test RNTester with Ruby 3.2.0"
7475
ruby_version: "3.2.0"
7576
architecture: "NewArch"
77+
executor: reactnativeios-lts
7678
- test_ios_rntester:
7779
requires:
7880
- build_hermes_macos

0 commit comments

Comments
 (0)