Skip to content

Commit 7de7795

Browse files
B4nanclaude
andauthored
fix(pnpm-install): skip swap setup on ARM64 runners (#276)
`pierotofy/set-swap-space@v1.0` runs: SWAP_FILE=$(swapon --show=NAME | tail -n 1) sudo swapoff $SWAP_FILE On ARM64 GitHub runners (`ubuntu-22.04-arm64`, `ubuntu-22.04-N-core-arm64`, etc.) there is no pre-allocated swap, so `swapon --show` returns empty, `SWAP_FILE` is empty, and `swapoff` exits with `bad usage` (exit 16). Every job using this composite action then fails before pnpm install even runs. x86_64 runners ship with an existing swap file, so the action works there. Skip the swap step on ARM64; install runs fine with the runner's default memory (apify-core's monorepo uses ~30 GB RAM ARM64 boxes). x86_64 behaviour is unchanged. Discovered while migrating apify/apify-core to pnpm. The full CI suite runs on ARM64 there, so every job in apify-core PRs that uses this action fails on the swap step. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a60657d commit 7de7795

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

pnpm-install/action.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ inputs:
1010
runs:
1111
using: "composite"
1212
steps:
13+
# Skip on ARM64: pierotofy/set-swap-space@v1.0 unconditionally calls
14+
# `swapoff $(swapon --show=NAME | tail -n 1)`, which on ARM64 GitHub
15+
# runners (no pre-allocated swap) resolves to `swapoff <empty>` and
16+
# exits non-zero with "swapoff: bad usage". x86_64 runners ship with
17+
# an existing swap file, so the action works there.
1318
- name: Set up swap space
14-
if: runner.os == 'Linux'
19+
if: runner.os == 'Linux' && runner.arch != 'ARM64'
1520
uses: pierotofy/set-swap-space@v1.0
1621
with:
1722
swap-size-gb: 10

0 commit comments

Comments
 (0)