aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-01-29 00:25:10 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-01-29 00:25:10 -0800
commit035d31904a592b70f4f99a06345af1e221f5c53f (patch)
treef6761f2ecb737655f8dc66cf5565858f954f79b0
parent192629c8ca9347bdf268ef4cee6be02fb09d6659 (diff)
downloadbun-035d31904a592b70f4f99a06345af1e221f5c53f.tar.gz
bun-035d31904a592b70f4f99a06345af1e221f5c53f.tar.zst
bun-035d31904a592b70f4f99a06345af1e221f5c53f.zip
Make the build less flaky
-rw-r--r--.github/workflows/bun-linux-aarch64.yml165
-rw-r--r--.github/workflows/bun-linux-build.yml9
2 files changed, 166 insertions, 8 deletions
diff --git a/.github/workflows/bun-linux-aarch64.yml b/.github/workflows/bun-linux-aarch64.yml
new file mode 100644
index 000000000..82a161d45
--- /dev/null
+++ b/.github/workflows/bun-linux-aarch64.yml
@@ -0,0 +1,165 @@
+name: bun-linux
+env:
+ REGISTRY: ghcr.io
+ IMAGE_NAME: ${{ github.repository }}
+ TEST_TAG: bun-test'
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - "src/**/*"
+ - "test/**/*"
+ - "build.zig"
+ - "Makefile"
+ - "Dockerfile"
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+jobs:
+ linux:
+ name: ${{matrix.tag}}
+ runs-on: ${{matrix.runner}}
+ timeout-minutes: 90
+ strategy:
+ matrix:
+ include:
+ - cpu: native
+ tag: linux-aarch64
+ arch: aarch64
+ build_arch: arm64
+ runner: linux-arm64
+ webkit_url: "https://github.com/oven-sh/WebKit/releases/download/dec30/bun-webkit-linux-arm64-lto.tar.gz"
+ webkit_basename: "bun-webkit-linux-arm64-lto"
+ build_machine_arch: aarch64
+
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: recursive
+ - uses: docker/setup-buildx-action@v2
+ id: buildx
+ with:
+ install: true
+ - name: Run
+ run: |
+ rm -rf ${{runner.temp}}/release
+ - name: Login to GitHub Container Registry
+ uses: docker/login-action@v2
+ 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@v3
+ 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}}
+ WEBKIT_URL=${{matrix.webkit_url}}
+ GIT_SHA=${{github.sha}}
+ WEBKIT_BASENAME=${{matrix.webkit_basename}}
+ 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@v3
+ with:
+ name: bun-${{matrix.tag}}-profile
+ path: ${{runner.temp}}/release/bun-${{matrix.tag}}-profile.zip
+ - uses: actions/upload-artifact@v3
+ with:
+ name: bun-${{matrix.tag}}
+ path: ${{runner.temp}}/release/bun-${{matrix.tag}}.zip
+ - uses: actions/upload-artifact@v3
+ with:
+ name: bun-obj-${{matrix.tag}}
+ path: ${{runner.temp}}/release/bun-obj
+ - uses: actions/upload-artifact@v3
+ with:
+ name: ${{matrix.tag}}-dependencies
+ path: ${{runner.temp}}/release/bun-dependencies
+ - 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"
+ - id: setup-bun
+ name: Setup Bun
+ uses: oven-sh/setup-bun@v0.1.8
+ if: |
+ github.repository_owner == 'oven-sh'
+ && github.ref == 'refs/heads/main'
+ with:
+ bun-version: canary
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ # - name: Sign Release
+ # id: sign-release
+ # if: |
+ # github.repository_owner == 'oven-sh'
+ # && github.ref == 'refs/heads/main'
+ # env:
+ # GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
+ # run: |
+ # echo "$GPG_PASSPHRASE" | bun run .scripts/sign-release.ts
+ # - name: Release Checksum
+ # id: release-checksum
+ # 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: "SHASUMS256.txt,SHASUMS256.txt.asc"
diff --git a/.github/workflows/bun-linux-build.yml b/.github/workflows/bun-linux-build.yml
index 83730da3e..836391b9a 100644
--- a/.github/workflows/bun-linux-build.yml
+++ b/.github/workflows/bun-linux-build.yml
@@ -32,6 +32,7 @@ jobs:
runs-on: ${{matrix.runner}}
timeout-minutes: 90
strategy:
+ fail-fast: false
matrix:
include:
- cpu: haswell
@@ -50,14 +51,6 @@ jobs:
webkit_url: "https://github.com/oven-sh/WebKit/releases/download/dec30/bun-webkit-linux-amd64-lto.tar.gz"
webkit_basename: "bun-webkit-linux-amd64-lto"
build_machine_arch: x86_64
- - cpu: native
- tag: linux-aarch64
- arch: aarch64
- build_arch: arm64
- runner: linux-arm64
- webkit_url: "https://github.com/oven-sh/WebKit/releases/download/dec30/bun-webkit-linux-arm64-lto.tar.gz"
- webkit_basename: "bun-webkit-linux-arm64-lto"
- build_machine_arch: aarch64
steps:
- uses: actions/checkout@v3