diff --git a/README.md b/README.md index 9c82b1af..71633e3e 100644 --- a/README.md +++ b/README.md @@ -711,8 +711,7 @@ jobs: executed with `bash --noprofile --norc -eo pipefail {0}` thus ignoring updated on bash profile files made by `conda init bash`. See [Github Actions Documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#custom-shell) - and - [thread](https://github.com/orgs/community/discussions/25061). + and [thread](https://github.com/orgs/community/discussions/25061). - Sh shells do not use `~/.profile` or `~/.bashrc` so these shells need to be explicitely declared as `shell: sh -l {0}` on steps that need to be properly activated (or use a default shell). This is because sh shells are executed diff --git a/action.yml b/action.yml index a244e6f0..697be4d2 100644 --- a/action.yml +++ b/action.yml @@ -235,8 +235,8 @@ inputs: default: "" architecture: description: - 'Architecture of Miniconda that should be installed. Available options on - GitHub-hosted runners are "x86" and "x64". Default is "x64".' + 'Architecture of Miniconda that should be installed. Default is "x64". The + CPU architecture of the runner is not detected by the workflow.' required: false default: "x64" clean-patched-environment-file: diff --git a/src/constants.ts b/src/constants.ts index 1e65b614..9d9c281a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -17,10 +17,14 @@ export const MINICONDA_BASE_URL: string = /** Processor architectures supported by Miniconda */ export const MINICONDA_ARCHITECTURES: types.IArchitectures = { + aarch64: "aarch64", + arm64: "arm64", + ppc64le: "ppc64le", + s390x: "s390x", x64: "x86_64", + x86_64: "x86_64", x86: "x86", - ARM64: "aarch64", // To be supported by github runners - ARM32: "armv7l", // To be supported by github runners + arm32: "armv7l", // To be supported by github runners }; /** Processor architectures supported by Miniforge */ diff --git a/src/installer/download-miniconda.ts b/src/installer/download-miniconda.ts index 2414519f..cc7dea27 100644 --- a/src/installer/download-miniconda.ts +++ b/src/installer/download-miniconda.ts @@ -47,10 +47,15 @@ export async function downloadMiniconda( inputs: types.IActionInputs ): Promise { // Check valid arch - const arch: string = constants.MINICONDA_ARCHITECTURES[inputs.architecture]; + let arch: string = + constants.MINICONDA_ARCHITECTURES[inputs.architecture.toLowerCase()]; if (!arch) { throw new Error(`Invalid arch "${inputs.architecture}"!`); } + // Backwards compatibility: ARM64 used to map to aarch64 + if (arch === "arm64" && constants.IS_LINUX) { + arch = constants.MINICONDA_ARCHITECTURES["aarch64"]; + } let extension: string = constants.IS_UNIX ? "sh" : "exe"; let osName: string = constants.OS_NAMES[process.platform];