mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 02:56:54 +08:00
add warning if requesting x64 on apple silicon runners (#300)
This commit is contained in:
7
.github/workflows/example-builds.yml
vendored
7
.github/workflows/example-builds.yml
vendored
@@ -27,6 +27,13 @@ jobs:
|
|||||||
exclude:
|
exclude:
|
||||||
- os: macOS-latest
|
- os: macOS-latest
|
||||||
julia-arch: x86
|
julia-arch: x86
|
||||||
|
include:
|
||||||
|
- os: macOS-latest
|
||||||
|
julia-arch: aarch64
|
||||||
|
julia-version: 'lts'
|
||||||
|
- os: macOS-latest
|
||||||
|
julia-arch: aarch64
|
||||||
|
julia-version: '1'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -194,12 +194,18 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
julia-version: ['1.0', '1.2.0', '^1.3.0-rc1']
|
julia-version: ['1.0', '1.2.0', '^1.3.0-rc1']
|
||||||
julia-arch: [x64, x86]
|
julia-arch: [x64, x86, aarch64]
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
# 32-bit Julia binaries are not available on macOS
|
# exclude unavailable/unwanted architectures
|
||||||
exclude:
|
exclude:
|
||||||
- os: macOS-latest
|
- os: macOS-latest
|
||||||
julia-arch: x86
|
julia-arch: x86
|
||||||
|
- os: macOS-latest
|
||||||
|
julia-arch: x64 # can be run but via rosetta on apple silicon runners
|
||||||
|
- os: ubuntu-latest
|
||||||
|
julia-arch: aarch64
|
||||||
|
- os: windows-latest
|
||||||
|
julia-arch: aarch64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
3
dist/index.js
vendored
3
dist/index.js
vendored
@@ -580,6 +580,9 @@ function run() {
|
|||||||
if (!originalArchInput) { // if `originalArchInput` is an empty string
|
if (!originalArchInput) { // if `originalArchInput` is an empty string
|
||||||
throw new Error(`Arch input must not be null`);
|
throw new Error(`Arch input must not be null`);
|
||||||
}
|
}
|
||||||
|
if (originalArchInput == 'x64' && os.platform() == 'darwin' && os.arch() == 'arm64') {
|
||||||
|
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).');
|
||||||
|
}
|
||||||
let processedArchInput;
|
let processedArchInput;
|
||||||
if (originalArchInput == "default") {
|
if (originalArchInput == "default") {
|
||||||
// If the user sets the `arch` input to `default`, then we use the
|
// If the user sets the `arch` input to `default`, then we use the
|
||||||
|
|||||||
3
lib/setup-julia.js
generated
3
lib/setup-julia.js
generated
@@ -88,6 +88,9 @@ function run() {
|
|||||||
if (!originalArchInput) { // if `originalArchInput` is an empty string
|
if (!originalArchInput) { // if `originalArchInput` is an empty string
|
||||||
throw new Error(`Arch input must not be null`);
|
throw new Error(`Arch input must not be null`);
|
||||||
}
|
}
|
||||||
|
if (originalArchInput == 'x64' && os.platform() == 'darwin' && os.arch() == 'arm64') {
|
||||||
|
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).');
|
||||||
|
}
|
||||||
let processedArchInput;
|
let processedArchInput;
|
||||||
if (originalArchInput == "default") {
|
if (originalArchInput == "default") {
|
||||||
// If the user sets the `arch` input to `default`, then we use the
|
// If the user sets the `arch` input to `default`, then we use the
|
||||||
|
|||||||
@@ -62,6 +62,10 @@ async function run() {
|
|||||||
throw new Error(`Arch input must not be null`)
|
throw new Error(`Arch input must not be null`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (originalArchInput == 'x64' && os.platform() == 'darwin' && os.arch() == 'arm64') {
|
||||||
|
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).')
|
||||||
|
}
|
||||||
|
|
||||||
let processedArchInput: string;
|
let processedArchInput: string;
|
||||||
if (originalArchInput == "default") {
|
if (originalArchInput == "default") {
|
||||||
// If the user sets the `arch` input to `default`, then we use the
|
// If the user sets the `arch` input to `default`, then we use the
|
||||||
|
|||||||
Reference in New Issue
Block a user