Skip to content

Commit c861e46

Browse files
add warning if requesting x64 on apple silicon runners (#300)
1 parent 2fa1802 commit c861e46

File tree

5 files changed

+25
-2
lines changed

5 files changed

+25
-2
lines changed

.github/workflows/example-builds.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ jobs:
2727
exclude:
2828
- os: macOS-latest
2929
julia-arch: x86
30+
include:
31+
- os: macOS-latest
32+
julia-arch: aarch64
33+
julia-version: 'lts'
34+
- os: macOS-latest
35+
julia-arch: aarch64
36+
julia-version: '1'
3037

3138
steps:
3239
- uses: actions/checkout@v4

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,18 @@ jobs:
194194
strategy:
195195
matrix:
196196
julia-version: ['1.0', '1.2.0', '^1.3.0-rc1']
197-
julia-arch: [x64, x86]
197+
julia-arch: [x64, x86, aarch64]
198198
os: [ubuntu-latest, windows-latest, macOS-latest]
199-
# 32-bit Julia binaries are not available on macOS
199+
# exclude unavailable/unwanted architectures
200200
exclude:
201201
- os: macOS-latest
202202
julia-arch: x86
203+
- os: macOS-latest
204+
julia-arch: x64 # can be run but via rosetta on apple silicon runners
205+
- os: ubuntu-latest
206+
julia-arch: aarch64
207+
- os: windows-latest
208+
julia-arch: aarch64
203209
204210
steps:
205211
- uses: actions/checkout@v4

dist/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,9 @@ function run() {
580580
if (!originalArchInput) { // if `originalArchInput` is an empty string
581581
throw new Error(`Arch input must not be null`);
582582
}
583+
if (originalArchInput == 'x64' && os.platform() == 'darwin' && os.arch() == 'arm64') {
584+
core.warning('[setup-julia] x64 arch has been requested on a macOS runner that has an arm64 (Apple Silicon) architecture. You may have meant to use the "aarch64" arch instead (or left it unspecified for the correct default).');
585+
}
583586
let processedArchInput;
584587
if (originalArchInput == "default") {
585588
// If the user sets the `arch` input to `default`, then we use the

lib/setup-julia.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/setup-julia.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ async function run() {
6262
throw new Error(`Arch input must not be null`)
6363
}
6464

65+
if (originalArchInput == 'x64' && os.platform() == 'darwin' && os.arch() == 'arm64') {
66+
core.warning('[setup-julia] x64 arch has been requested on a macOS runner that has an arm64 (Apple Silicon) architecture. You may have meant to use the "aarch64" arch instead (or left it unspecified for the correct default).')
67+
}
68+
6569
let processedArchInput: string;
6670
if (originalArchInput == "default") {
6771
// If the user sets the `arch` input to `default`, then we use the

0 commit comments

Comments
 (0)