Skip to content

Commit b0315b1

Browse files
authored
chore: revert circle M1 runners for MacStadium VM (#27328)
* Revert "chore: use cloud hosted m1 runners for apple silicon devices (#27257)" This reverts commit 78ad0d5. * chore: reverted runner and trying new m1 runner on macstadium [run ci] [run ci] run ci run ci chore: bump cache (uising person over admin) [run ci] chore: test build artifacts [run ci] bump cache [run ci] update cache
1 parent cb61525 commit b0315b1

File tree

3 files changed

+34
-21
lines changed

3 files changed

+34
-21
lines changed

Diff for: .circleci/cache-version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Bump this version to force CI to re-create the cache from scratch.
22

3-
06-07-23
3+
07-19-23

Diff for: .circleci/workflows.yml

+31-20
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ mainBuildFilters: &mainBuildFilters
3030
- /^release\/\d+\.\d+\.\d+$/
3131
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
3232
- 'update-v8-snapshot-cache-on-develop'
33-
- 'jordanpowell88/angular-tsconfig'
34-
- 'fix/chrome_crash_recovery'
33+
- 'revert-runner'
3534

3635
# usually we don't build Mac app - it takes a long time
3736
# but sometimes we want to really confirm we are doing the right thing
@@ -42,8 +41,7 @@ macWorkflowFilters: &darwin-workflow-filters
4241
- equal: [ develop, << pipeline.git.branch >> ]
4342
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
4443
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
45-
- equal: ['jordanpowell88/angular-tsconfig', << pipeline.git.branch >> ]
46-
- equal: [ 'mschile/issue-26900_browserCriClient', << pipeline.git.branch >> ]
44+
- equal: [ 'revert-runner', << pipeline.git.branch >> ]
4745
- matches:
4846
pattern: /^release\/\d+\.\d+\.\d+$/
4947
value: << pipeline.git.branch >>
@@ -54,8 +52,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
5452
- equal: [ develop, << pipeline.git.branch >> ]
5553
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
5654
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
57-
- equal: [ 'jordanpowell88/angular-tsconfig', << pipeline.git.branch >> ]
58-
- equal: [ 'mschile/issue-26900_browserCriClient', << pipeline.git.branch >> ]
55+
- equal: [ 'revert-runner', << pipeline.git.branch >> ]
5956
- matches:
6057
pattern: /^release\/\d+\.\d+\.\d+$/
6158
value: << pipeline.git.branch >>
@@ -75,7 +72,7 @@ windowsWorkflowFilters: &windows-workflow-filters
7572
- equal: [ develop, << pipeline.git.branch >> ]
7673
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
7774
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
78-
- equal: [ 'chore/use_cloud_m1_runners', << pipeline.git.branch >> ]
75+
- equal: [ 'revert-runner', << pipeline.git.branch >> ]
7976
- matches:
8077
pattern: /^release\/\d+\.\d+\.\d+$/
8178
value: << pipeline.git.branch >>
@@ -122,11 +119,8 @@ executors:
122119
environment:
123120
PLATFORM: windows
124121

125-
# see https://circleci.com/docs/configuration-reference/#macos-execution-environment
126122
darwin-arm64: &darwin-arm64-executor
127-
macos:
128-
xcode: "14.2.0"
129-
resource_class: macos.m1.large.gen1
123+
machine: true
130124
environment:
131125
PLATFORM: darwin
132126

@@ -145,7 +139,7 @@ commands:
145139
- run:
146140
name: Check current branch to persist artifacts
147141
command: |
148-
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "update-v8-snapshot-cache-on-develop" && "$CIRCLE_BRANCH" != "jordanpowell88/angular-tsconfig" ]]; then
142+
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "update-v8-snapshot-cache-on-develop" && "$CIRCLE_BRANCH" != "revert-runner" ]]; then
149143
echo "Not uploading artifacts or posting install comment for this branch."
150144
circleci-agent step halt
151145
fi
@@ -435,7 +429,7 @@ commands:
435429
node_version=$(cat .node-version)
436430
source ./scripts/ensure-node.sh
437431
echo "Installing Yarn"
438-
npm install yarn -g # ensure yarn is installed with the correct node engine
432+
npm install yarn --location=global # ensure yarn is installed with the correct node engine
439433
yarn check-node-version
440434
- run:
441435
name: Check Node
@@ -1361,7 +1355,13 @@ jobs:
13611355
steps:
13621356
- restore_cached_workspace
13631357
- restore_cached_system_tests_deps
1358+
# TODO: Remove this once we switch off self-hosted M1 runners
13641359
- when:
1360+
condition:
1361+
equal: [ *darwin-arm64-executor, << parameters.executor >> ]
1362+
steps:
1363+
- run: rm -f /tmp/cypress/junit/*
1364+
- unless:
13651365
condition:
13661366
or:
13671367
- equal: [ *linux-arm64-executor, << parameters.executor >> ] # TODO: Figure out how to support linux-arm64 when we get to linux arm64 build: https://github.com/cypress-io/cypress/issues/23557
@@ -1370,21 +1370,21 @@ jobs:
13701370
name: Run v8 integration tests
13711371
command: |
13721372
source ./scripts/ensure-node.sh
1373-
yarn test-integration --scope "'@tooling/packherd'"
1373+
yarn test-integration --scope "'@tooling/{packherd,v8-snapshot,electron-mksnapshot}'"
13741374
- verify-mocha-results:
1375-
expectedResultCount: 1
1376-
- unless:
1375+
expectedResultCount: 3
1376+
- when:
13771377
condition:
13781378
or:
1379-
- equal: [ *linux-arm64-executor, << parameters.executor >> ] # TODO: Figure out how to support linux-arm64 when we get to linux arm64 build: https://github.com/cypress-io/cypress/issues/23557
1379+
- equal: [ *linux-arm64-executor, << parameters.executor >> ]
13801380
steps:
13811381
- run:
13821382
name: Run v8 integration tests
13831383
command: |
13841384
source ./scripts/ensure-node.sh
1385-
yarn test-integration --scope "'@tooling/{packherd,v8-snapshot,electron-mksnapshot}'"
1385+
yarn test-integration --scope "'@tooling/packherd'"
13861386
- verify-mocha-results:
1387-
expectedResultCount: 3
1387+
expectedResultCount: 1
13881388
- store_test_results:
13891389
path: /tmp/cypress
13901390
- store-npm-logs
@@ -1520,6 +1520,12 @@ jobs:
15201520
parallelism: 1
15211521
steps:
15221522
- restore_cached_workspace
1523+
# TODO: Remove this once we switch off self-hosted M1 runners
1524+
- when:
1525+
condition:
1526+
equal: [ *darwin-arm64-executor, << parameters.executor >> ]
1527+
steps:
1528+
- run: rm -f /tmp/cypress/junit/*
15231529
- run: yarn workspace @packages/server test-unit cloud/environment_spec.ts
15241530
- verify-mocha-results:
15251531
expectedResultCount: 1
@@ -2859,11 +2865,13 @@ darwin-arm64-workflow: &darwin-arm64-workflow
28592865
- node_modules_install:
28602866
name: darwin-arm64-node-modules-install
28612867
executor: darwin-arm64
2868+
resource_class: cypress-io/m1-macstadium
28622869
only-cache-for-root-user: true
28632870

28642871
- build:
28652872
name: darwin-arm64-build
28662873
executor: darwin-arm64
2874+
resource_class: cypress-io/m1-macstadium
28672875
requires:
28682876
- darwin-arm64-node-modules-install
28692877

@@ -2875,23 +2883,26 @@ darwin-arm64-workflow: &darwin-arm64-workflow
28752883
- test-runner:commit-status-checks
28762884
- test-runner:build-binary
28772885
executor: darwin-arm64
2878-
resource_class: large
2886+
resource_class: cypress-io/m1-macstadium
28792887
requires:
28802888
- darwin-arm64-build
28812889

28822890
- v8-integration-tests:
28832891
name: darwin-arm64-v8-integration-tests
28842892
executor: darwin-arm64
2893+
resource_class: cypress-io/m1-macstadium
28852894
requires:
28862895
- darwin-arm64-build
28872896
- driver-integration-memory-tests:
28882897
name: darwin-arm64-driver-integration-memory-tests
28892898
executor: darwin-arm64
2899+
resource_class: cypress-io/m1-macstadium
28902900
requires:
28912901
- darwin-arm64-build
28922902
- server-unit-tests-cloud-environment:
28932903
name: darwin-arm64-server-unit-tests-cloud-environment
28942904
executor: darwin-arm64
2905+
resource_class: cypress-io/m1-macstadium
28952906
requires:
28962907
- darwin-arm64-build
28972908

Diff for: scripts/circle-cache.js

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ async function prepareCircleCache () {
6969
.replace(/(.*?)\/node_modules/, '$1_node_modules')
7070
.replace(BASE_DIR, CACHE_DIR)
7171

72+
// self-hosted M1 doesn't always clear this directory between runs, so remove it
73+
await fsExtra.remove(dest)
7274
await fsExtra.move(src, dest)
7375
}),
7476
)

0 commit comments

Comments
 (0)