Skip to content

Commit 1f2df7f

Browse files
committed
fix - install unzip and extend setup-bun to handle ARM64 Blacksmith runners
Blacksmith's ubuntu-2404 runners run on ARM64 hardware (RUNNER_ARCH=ARM64). The previous action only built an explicit bun download URL for X64, so ARM64 fell through to oven-sh/setup-bun@v2's default path which downloads bun-linux-aarch64.zip and extracts it via the system unzip command. Blacksmith's ARM64 Ubuntu image doesn't pre-install unzip, causing all e2e and unit CI jobs to fail at the Setup Bun step. Two changes: - Add a Linux step that installs unzip if not already present (direct fix) - Rewrite the URL construction with case/esac covering both X64 and ARM64 for all OS variants, replacing the x64-only if block (architecture fix)
1 parent 23b2cc8 commit 1f2df7f

1 file changed

Lines changed: 21 additions & 10 deletions

File tree

.github/actions/setup-bun/action.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,30 @@ description: "Setup Bun with caching and install dependencies"
33
runs:
44
using: "composite"
55
steps:
6-
- name: Get baseline download URL
6+
- name: Ensure unzip is available
7+
if: runner.os == 'Linux'
8+
shell: bash
9+
# oven-sh/setup-bun extracts the downloaded zip via the system `unzip` command
10+
# on Linux. Blacksmith's ARM64 ubuntu-2404 runners don't pre-install it.
11+
run: command -v unzip >/dev/null 2>&1 || sudo apt-get install -y --no-install-recommends unzip
12+
13+
- name: Get bun download URL
714
id: bun-url
815
shell: bash
916
run: |
10-
if [ "$RUNNER_ARCH" = "X64" ]; then
11-
V=$(node -p "require('./package.json').packageManager.split('@')[1]")
12-
case "$RUNNER_OS" in
13-
macOS) OS=darwin ;;
14-
Linux) OS=linux ;;
15-
Windows) OS=windows ;;
16-
esac
17-
echo "url=https://github.com/oven-sh/bun/releases/download/bun-v${V}/bun-${OS}-x64-baseline.zip" >> "$GITHUB_OUTPUT"
18-
fi
17+
V=$(node -p "require('./package.json').packageManager.split('@')[1]")
18+
case "$RUNNER_OS" in
19+
macOS) OS=darwin ;;
20+
Linux) OS=linux ;;
21+
Windows) OS=windows ;;
22+
*) exit 0 ;;
23+
esac
24+
case "$RUNNER_ARCH" in
25+
X64) ARCH=x64-baseline ;;
26+
ARM64) ARCH=aarch64 ;;
27+
*) exit 0 ;;
28+
esac
29+
echo "url=https://github.com/oven-sh/bun/releases/download/bun-v${V}/bun-${OS}-${ARCH}.zip" >> "$GITHUB_OUTPUT"
1930
2031
- name: Setup Bun
2132
uses: oven-sh/setup-bun@v2

0 commit comments

Comments
 (0)