diff --git a/src/action.ts b/src/action.ts index 70309a9..d4cae93 100644 --- a/src/action.ts +++ b/src/action.ts @@ -161,7 +161,7 @@ function getEffectiveArch(os: string, arch: string): string { warning( [ "⚠️ Bun does not provide native arm64 builds for Windows.", - "Using x64 build which will run through Microsoft's x64 emulation layer.", + "Using x64-baseline build which will run through Microsoft's x64 emulation layer.", "This may result in reduced performance and potential compatibility issues.", "💡 For best performance, consider using x64 Windows runners or other platforms with native support.", ].join("\n"), @@ -173,6 +173,15 @@ function getEffectiveArch(os: string, arch: string): string { return arch; } +function getEffectiveAvx2(os: string, arch: string, avx2?: boolean): boolean { + // Temporary workaround for absence of arm64 builds on Windows (#130) + if (os === "win32" && arch === "arm64") { + return false; + } + + return avx2 ?? true; +} + function getDownloadUrl(options: Input): string { const { customUrl } = options; if (customUrl) { @@ -184,7 +193,9 @@ function getDownloadUrl(options: Input): string { const earch = encodeURIComponent( getEffectiveArch(os ?? process.platform, arch ?? process.arch), ); - const eavx2 = encodeURIComponent(avx2 ?? true); + const eavx2 = encodeURIComponent( + getEffectiveAvx2(os ?? process.platform, arch ?? process.arch, avx2), + ); const eprofile = encodeURIComponent(profile ?? false); const { href } = new URL( `${eversion}/${eos}/${earch}?avx2=${eavx2}&profile=${eprofile}`, @@ -217,9 +228,6 @@ async function getRevision(exe: string): Promise { const revision = await getExecOutput(exe, ["--revision"], { ignoreReturnCode: true, }); - console.log(revision.stdout); - console.log(revision.stderr); - console.log(revision.exitCode); if (revision.exitCode === 0 && /^\d+\.\d+\.\d+/.test(revision.stdout)) { return revision.stdout.trim(); }