Open na4ma4 opened 5 months ago
Is it still happening? I'm not able to repro with all macOS runners available: https://github.com/magefile/mage-action/actions/runs/11550066329?pr=341
Interesting that your runs seem to pull the mage binary from the actions cache but when I test it, it's downloading it from the repo artifacts.
It still happens for me, I wonder how it got downloaded into the cache the first time for your runs.
I'm looking through previous runs in this repository, but here's the relevant line
Ok, so if I make a runner for macos-13
(which is x64) and run it first, it caches the binary, then when the macos-latest
runs it uses the cached binary and works.
So the issue is that it's trying to download ARM64
for macos when it needs to use x64
.
https://github.com/magefile/mage-action/blob/master/src/installer.ts#L103-L108
const getFilename = (semver: string): string => {
const platform: string = osPlat == 'win32' ? 'Windows' : osPlat == 'darwin' ? 'macOS' : 'Linux';
const arch: string = osArch == 'x64' ? '64bit' : osArch == 'arm64' ? 'ARM64' : '32bit';
const ext: string = osPlat == 'win32' ? 'zip' : 'tar.gz';
return util.format('mage_%s_%s-%s.%s', semver, platform, arch, ext);
};
might need something like
const getFilename = (semver: string): string => {
const platform: string = osPlat == 'win32' ? 'Windows' : osPlat == 'darwin' ? 'macOS' : 'Linux';
const arch: string = osPlat == 'darwin' && osArch == 'arm64' ? '64bit' : osArch == 'x64' ? '64bit' : osArch == 'arm64' ? 'ARM64' : '32bit';
const ext: string = osPlat == 'win32' ? 'zip' : 'tar.gz';
return util.format('mage_%s_%s-%s.%s', semver, platform, arch, ext);
};
Support guidelines
I've found a bug and checked that ...
Description
When using the action on a macOS runner it will fail to download the release binary.
Expected behaviour
For the action to download the correct binary.
Actual behaviour
Steps to reproduce
runs-on: macos-latest
Repository URL
https://github.com/na4ma4/mage-macos-issue
Workflow run URL
https://github.com/na4ma4/mage-macos-issue/actions/runs/9638284485
YAML workflow
Workflow logs
logs_25224800589.zip
Additional info
No response