diff --git a/.github/workflows/example-builds.yml b/.github/workflows/example-builds.yml index 62caf58d..862fc369 100644 --- a/.github/workflows/example-builds.yml +++ b/.github/workflows/example-builds.yml @@ -27,6 +27,13 @@ jobs: exclude: - os: macOS-latest julia-arch: x86 + include: + - os: macOS-latest + julia-arch: aarch64 + julia-version: 'lts' + - os: macOS-latest + julia-arch: aarch64 + julia-version: '1' steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index a20b3d50..045e39a6 100644 --- a/README.md +++ b/README.md @@ -194,12 +194,18 @@ jobs: strategy: matrix: 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] - # 32-bit Julia binaries are not available on macOS + # exclude unavailable/unwanted architectures exclude: - os: macOS-latest 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: - uses: actions/checkout@v4 diff --git a/dist/index.js b/dist/index.js index fa1564be..638ebd1b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -580,6 +580,9 @@ function run() { if (!originalArchInput) { // if `originalArchInput` is an empty string 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; if (originalArchInput == "default") { // If the user sets the `arch` input to `default`, then we use the diff --git a/lib/setup-julia.js b/lib/setup-julia.js index 471adfd0..cb5e5c88 100644 --- a/lib/setup-julia.js +++ b/lib/setup-julia.js @@ -88,6 +88,9 @@ function run() { if (!originalArchInput) { // if `originalArchInput` is an empty string 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; if (originalArchInput == "default") { // If the user sets the `arch` input to `default`, then we use the diff --git a/src/setup-julia.ts b/src/setup-julia.ts index 9ff3990a..587dc67b 100644 --- a/src/setup-julia.ts +++ b/src/setup-julia.ts @@ -62,6 +62,10 @@ async function run() { 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; if (originalArchInput == "default") { // If the user sets the `arch` input to `default`, then we use the