Skip to content

Commit 7d260a6

Browse files
committed
ci: add platform-specific bun install flags
1 parent 88c5f6b commit 7d260a6

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: "Setup Bun"
22
description: "Setup Bun with caching and install dependencies"
3+
inputs:
4+
install-flags:
5+
description: "Additional flags to pass to 'bun install'"
6+
required: false
7+
default: ""
38
runs:
49
using: "composite"
510
steps:
@@ -46,8 +51,8 @@ runs:
4651
# e.g. ./patches/ for standard-openapi
4752
# https://github.com/oven-sh/bun/issues/28147
4853
if [ "$RUNNER_OS" = "Windows" ]; then
49-
bun install --linker hoisted
54+
bun install --linker hoisted ${{ inputs.install-flags }}
5055
else
51-
bun install
56+
bun install ${{ inputs.install-flags }}
5257
fi
5358
shell: bash

.github/workflows/publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,22 +405,28 @@ jobs:
405405
- host: macos-latest
406406
target: x86_64-apple-darwin
407407
platform_flag: --mac --x64
408+
bun_install_flags: --os=darwin --cpu=x64
408409
- host: macos-latest
409410
target: aarch64-apple-darwin
410411
platform_flag: --mac --arm64
412+
bun_install_flags: --os=darwin --cpu=arm64
411413
# github-hosted: blacksmith lacks ARM64 MSVC cross-compilation toolchain
412414
- host: "windows-2025"
413415
target: aarch64-pc-windows-msvc
414416
platform_flag: --win --arm64
417+
bun_install_flags: --os=win32 --cpu=arm64
415418
- host: "blacksmith-4vcpu-windows-2025"
416419
target: x86_64-pc-windows-msvc
417420
platform_flag: --win
421+
bun_install_flags: --os=win32 --cpu=x64
418422
- host: "blacksmith-4vcpu-ubuntu-2404"
419423
target: x86_64-unknown-linux-gnu
420424
platform_flag: --linux
425+
bun_install_flags: --os=linux --cpu=x64
421426
- host: "blacksmith-4vcpu-ubuntu-2404"
422427
target: aarch64-unknown-linux-gnu
423428
platform_flag: --linux
429+
bun_install_flags: --os=linux --cpu=arm64
424430
runs-on: ${{ matrix.settings.host }}
425431
steps:
426432
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)