mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 11:29:02 +00:00
* Add `BUN_DEBUG` flag to control where debug logs go * Update all the actions * Configure temp * use spawn instead of rm * Use CLOSE_RANGE_CLOEXEC * Make some tests more reproducible * Update hot.test.ts * Detect file descriptor leaks and wait for stdout * Update runner.node.mjs * Update preload.ts --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
141 lines
4.2 KiB
YAML
141 lines
4.2 KiB
YAML
name: bun-linux
|
|
|
|
concurrency:
|
|
group: bun-linux-aarch64-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "src/**/*"
|
|
- "test/**/*"
|
|
- "packages/bun-usockets/src/**/*"
|
|
- "packages/bun-uws/src/**/*"
|
|
- "CMakeLists.txt"
|
|
- "build.zig"
|
|
- "Makefile"
|
|
- "Dockerfile"
|
|
- ".github/workflows/bun-linux-aarch64.yml"
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "src/**/*"
|
|
- "test/**/*"
|
|
- "packages/bun-usockets/src/**/*"
|
|
- "packages/bun-uws/src/**/*"
|
|
- "CMakeLists.txt"
|
|
- "build.zig"
|
|
- "Makefile"
|
|
- "Dockerfile"
|
|
- ".github/workflows/bun-linux-aarch64.yml"
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
linux:
|
|
name: ${{matrix.tag}}
|
|
runs-on: ${{matrix.runner}}
|
|
if: github.repository_owner == 'oven-sh'
|
|
timeout-minutes: 90
|
|
permissions: write-all
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- cpu: native
|
|
tag: linux-aarch64
|
|
arch: aarch64
|
|
build_arch: arm64
|
|
runner: linux-arm64
|
|
build_machine_arch: aarch64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: false
|
|
ref: ${{github.sha}}
|
|
clean: true
|
|
- run: |
|
|
bash ./scripts/update-submodules.sh
|
|
- uses: docker/setup-buildx-action@v3
|
|
id: buildx
|
|
with:
|
|
install: true
|
|
- name: Run
|
|
run: |
|
|
rm -rf ${{runner.temp}}/release
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- run: |
|
|
mkdir -p /tmp/.buildx-cache-${{matrix.tag}}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: false
|
|
cache-from: type=local,src=/tmp/.buildx-cache-${{matrix.tag}}
|
|
cache-to: type=local,dest=/tmp/.buildx-cache-${{matrix.tag}}
|
|
build-args: |
|
|
ARCH=${{matrix.arch}}
|
|
BUILDARCH=${{matrix.build_arch}}
|
|
BUILD_MACHINE_ARCH=${{matrix.build_machine_arch}}
|
|
CPU_TARGET=${{matrix.cpu}}
|
|
GIT_SHA=${{github.sha}}
|
|
platforms: linux/${{matrix.build_arch}}
|
|
target: artifact
|
|
outputs: type=local,dest=${{runner.temp}}/release
|
|
- name: Zip
|
|
run: |
|
|
# if zip is not found
|
|
if [ ! -x "$(command -v zip)" ]; then
|
|
sudo apt-get update && sudo apt-get install -y zip --no-install-recommends
|
|
fi
|
|
|
|
if [ ! -x "$(command -v strip)" ]; then
|
|
sudo apt-get update && sudo apt-get install -y binutils --no-install-recommends
|
|
fi
|
|
|
|
cd ${{runner.temp}}/release
|
|
chmod +x bun-profile bun
|
|
|
|
mkdir bun-${{matrix.tag}}-profile
|
|
mkdir bun-${{matrix.tag}}
|
|
|
|
strip bun
|
|
|
|
mv bun-profile bun-${{matrix.tag}}-profile/bun-profile
|
|
mv bun bun-${{matrix.tag}}/bun
|
|
|
|
zip -r bun-${{matrix.tag}}-profile.zip bun-${{matrix.tag}}-profile
|
|
zip -r bun-${{matrix.tag}}.zip bun-${{matrix.tag}}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: bun-${{matrix.tag}}-profile
|
|
path: ${{runner.temp}}/release/bun-${{matrix.tag}}-profile.zip
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: bun-${{matrix.tag}}
|
|
path: ${{runner.temp}}/release/bun-${{matrix.tag}}.zip
|
|
- name: Release
|
|
id: release
|
|
uses: ncipollo/release-action@v1
|
|
if: |
|
|
github.repository_owner == 'oven-sh'
|
|
&& github.ref == 'refs/heads/main'
|
|
with:
|
|
prerelease: true
|
|
body: "This canary release of Bun corresponds to the commit [${{ github.sha }}]"
|
|
allowUpdates: true
|
|
replacesArtifacts: true
|
|
generateReleaseNotes: true
|
|
artifactErrorsFailBuild: true
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
name: "Canary (${{github.sha}})"
|
|
tag: "canary"
|
|
artifacts: "${{runner.temp}}/release/bun-${{matrix.tag}}.zip,${{runner.temp}}/release/bun-${{matrix.tag}}-profile.zip"
|