add warning if requesting x64 on apple silicon runners (#300)

This commit is contained in:
Ian Butterworth
2024-11-17 23:41:16 -05:00
committed by GitHub
parent 2fa18025fe
commit c861e46bed
5 changed files with 25 additions and 2 deletions

3
lib/setup-julia.js generated
View File

@@ -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