Skip to content

Commit c55fcba

Browse files
committed
ci(macos): run x64 workflows with Rosetta 2
1 parent c1bf2e6 commit c55fcba

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,13 +1068,15 @@ jobs:
10681068
run: |
10691069
cargo install cargo-cache --no-default-features --features ci-autoclean
10701070
cargo-cache
1071-
10721071
# This is ci/actions-templates/macos-builds-template.yaml
10731072
# Do not edit this file in .github/workflows
10741073
build-macos-x86_64: # job-name skip-aarch64
1075-
runs-on: macos-13 # skip-aarch64
10761074
env: # skip-aarch64
10771075
MACOSX_DEPLOYMENT_TARGET: 10.12 # skip-aarch64
1076+
defaults: # skip-aarch64
1077+
run: # skip-aarch64
1078+
shell: arch -x86_64 bash -e {0} # skip-aarch64
1079+
runs-on: macos-latest
10781080
permissions:
10791081
id-token: write
10801082
contents: read
@@ -1200,13 +1202,12 @@ jobs:
12001202
# https://github.com/actions/cache/issues/403 and
12011203
# https://github.com/rust-lang/cargo/issues/8603.
12021204
run: sudo /usr/sbin/purge
1203-
12041205
# This is ci/actions-templates/macos-builds-template.yaml
12051206
# Do not edit this file in .github/workflows
12061207
build-macos-aarch64: # job-name skip-x86_64
1207-
runs-on: macos-latest # skip-x86_64
12081208
env: # skip-x86_64
12091209
MACOSX_DEPLOYMENT_TARGET: 11.0 # skip-x86_64
1210+
runs-on: macos-latest
12101211
permissions:
12111212
id-token: write
12121213
contents: read

ci/actions-templates/macos-builds-template.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
jobs: # skip-x86_64 skip-aarch64
2-
32
# This is ci/actions-templates/macos-builds-template.yaml
43
# Do not edit this file in .github/workflows
54
build-macos-aarch64: # job-name skip-x86_64
6-
runs-on: macos-latest # skip-x86_64
75
env: # skip-x86_64
86
MACOSX_DEPLOYMENT_TARGET: 11.0 # skip-x86_64
97
build-macos-x86_64: # job-name skip-aarch64
10-
runs-on: macos-13 # skip-aarch64
118
env: # skip-aarch64
129
MACOSX_DEPLOYMENT_TARGET: 10.12 # skip-aarch64
10+
defaults: # skip-aarch64
11+
run: # skip-aarch64
12+
shell: arch -x86_64 bash -e {0} # skip-aarch64
13+
runs-on: macos-latest
1314
permissions:
1415
id-token: write
1516
contents: read

0 commit comments

Comments
 (0)