Skip to content

Commit

Permalink
Revert "chore: use cloud hosted m1 runners for apple silicon devices (#…
Browse files Browse the repository at this point in the history
…27257)"

This reverts commit 78ad0d5.
  • Loading branch information
AtofStryker committed Jul 19, 2023
1 parent cb61525 commit 97e3c64
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
41 changes: 26 additions & 15 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'update-v8-snapshot-cache-on-develop'
- 'jordanpowell88/angular-tsconfig'
- 'fix/chrome_crash_recovery'

# usually we don't build Mac app - it takes a long time
Expand All @@ -42,7 +41,6 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: ['jordanpowell88/angular-tsconfig', << pipeline.git.branch >> ]
- equal: [ 'mschile/issue-26900_browserCriClient', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
Expand All @@ -54,7 +52,6 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'jordanpowell88/angular-tsconfig', << pipeline.git.branch >> ]
- equal: [ 'mschile/issue-26900_browserCriClient', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
Expand All @@ -75,7 +72,7 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'chore/use_cloud_m1_runners', << pipeline.git.branch >> ]
- equal: [ 'mschile/issue-26900_browserCriClient', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -122,11 +119,8 @@ executors:
environment:
PLATFORM: windows

# see https://circleci.com/docs/configuration-reference/#macos-execution-environment
darwin-arm64: &darwin-arm64-executor
macos:
xcode: "14.2.0"
resource_class: macos.m1.large.gen1
machine: true
environment:
PLATFORM: darwin

Expand Down Expand Up @@ -1361,7 +1355,13 @@ jobs:
steps:
- restore_cached_workspace
- restore_cached_system_tests_deps
# TODO: Remove this once we switch off self-hosted M1 runners
- when:
condition:
equal: [ *darwin-arm64-executor, << parameters.executor >> ]
steps:
- run: rm -f /tmp/cypress/junit/*
- unless:
condition:
or:
- 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
Expand All @@ -1370,21 +1370,21 @@ jobs:
name: Run v8 integration tests
command: |
source ./scripts/ensure-node.sh
yarn test-integration --scope "'@tooling/packherd'"
yarn test-integration --scope "'@tooling/{packherd,v8-snapshot,electron-mksnapshot}'"
- verify-mocha-results:
expectedResultCount: 1
- unless:
expectedResultCount: 3
- when:
condition:
or:
- 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
- equal: [ *linux-arm64-executor, << parameters.executor >> ]
steps:
- run:
name: Run v8 integration tests
command: |
source ./scripts/ensure-node.sh
yarn test-integration --scope "'@tooling/{packherd,v8-snapshot,electron-mksnapshot}'"
yarn test-integration --scope "'@tooling/packherd'"
- verify-mocha-results:
expectedResultCount: 3
expectedResultCount: 1
- store_test_results:
path: /tmp/cypress
- store-npm-logs
Expand Down Expand Up @@ -1520,6 +1520,12 @@ jobs:
parallelism: 1
steps:
- restore_cached_workspace
# TODO: Remove this once we switch off self-hosted M1 runners
- when:
condition:
equal: [ *darwin-arm64-executor, << parameters.executor >> ]
steps:
- run: rm -f /tmp/cypress/junit/*
- run: yarn workspace @packages/server test-unit cloud/environment_spec.ts
- verify-mocha-results:
expectedResultCount: 1
Expand Down Expand Up @@ -2859,11 +2865,13 @@ darwin-arm64-workflow: &darwin-arm64-workflow
- node_modules_install:
name: darwin-arm64-node-modules-install
executor: darwin-arm64
resource_class: cypress-io/latest_m1
only-cache-for-root-user: true

- build:
name: darwin-arm64-build
executor: darwin-arm64
resource_class: cypress-io/latest_m1
requires:
- darwin-arm64-node-modules-install

Expand All @@ -2875,23 +2883,26 @@ darwin-arm64-workflow: &darwin-arm64-workflow
- test-runner:commit-status-checks
- test-runner:build-binary
executor: darwin-arm64
resource_class: large
resource_class: cypress-io/latest_m1
requires:
- darwin-arm64-build

- v8-integration-tests:
name: darwin-arm64-v8-integration-tests
executor: darwin-arm64
resource_class: cypress-io/latest_m1
requires:
- darwin-arm64-build
- driver-integration-memory-tests:
name: darwin-arm64-driver-integration-memory-tests
executor: darwin-arm64
resource_class: cypress-io/latest_m1
requires:
- darwin-arm64-build
- server-unit-tests-cloud-environment:
name: darwin-arm64-server-unit-tests-cloud-environment
executor: darwin-arm64
resource_class: cypress-io/latest_m1
requires:
- darwin-arm64-build

Expand Down
2 changes: 2 additions & 0 deletions scripts/circle-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ async function prepareCircleCache () {
.replace(/(.*?)\/node_modules/, '$1_node_modules')
.replace(BASE_DIR, CACHE_DIR)

// self-hosted M1 doesn't always clear this directory between runs, so remove it
await fsExtra.remove(dest)
await fsExtra.move(src, dest)
}),
)
Expand Down

0 comments on commit 97e3c64

Please sign in to comment.