Compare commits

...

24 Commits

Author SHA1 Message Date
Dylan Conway
b4781544a4 Update Dockerfile 2023-01-27 21:22:33 -08:00
Dylan Conway
d540b1c02e Update Dockerfile 2023-01-27 21:19:06 -08:00
Dylan Conway
3487b5f2af Update Dockerfile 2023-01-27 20:49:07 -08:00
Jarred Sumner
93712de047 Update Dockerfile 2023-01-27 20:40:06 -08:00
Jarred Sumner
1538cae769 WIP 2023-01-27 20:19:07 -08:00
Jarred Sumner
56447e42ed Update bun-linux-build.yml 2023-01-27 19:51:50 -08:00
Jarred Sumner
7d81f115cd WIP 2023-01-27 19:31:14 -08:00
Jarred Sumner
e9713db6ec WIP 2023-01-27 19:29:08 -08:00
Jarred Sumner
a7e666f818 wip 2023-01-27 19:25:03 -08:00
Jarred Sumner
d46c8d2fc8 Update bun-linux-build.yml 2023-01-27 18:57:22 -08:00
Jarred Sumner
981433bde1 versions 2023-01-27 18:55:09 -08:00
Jarred Sumner
a813889a98 Update bun-linux-build.yml 2023-01-27 18:44:03 -08:00
Jarred Sumner
e6e289eeca Update bun-linux-build.yml 2023-01-27 18:41:24 -08:00
Jarred Sumner
00fa9513dc Update bun-dependenies-build.yml 2023-01-27 17:55:57 -08:00
Jarred Sumner
8fc3d83eba Update bun-dependenies-build.yml 2023-01-27 17:46:27 -08:00
Jarred Sumner
01bddd6150 Update bun-dependenies-build.yml 2023-01-27 17:09:32 -08:00
Jarred Sumner
dac4d5af9d Update bun-dependenies-build.yml 2023-01-27 17:01:10 -08:00
Jarred Sumner
16ef9aa8c7 Update bun-dependenies-build.yml 2023-01-27 16:51:11 -08:00
Jarred Sumner
673388ed0b update 2023-01-27 16:49:16 -08:00
Jarred Sumner
a4605e1541 Update js_parser.zig 2023-01-27 16:23:30 -08:00
Jarred Sumner
fc01cecdc0 Update Dockerfile 2023-01-27 16:23:30 -08:00
Jarred Sumner
0fc1c717d1 Update bun-dependenies-build.yml 2023-01-27 16:23:30 -08:00
Jarred Sumner
46efe72f6c Update bun-dependenies-build.yml 2023-01-27 16:23:30 -08:00
Jarred Sumner
ce6024cce4 wip 2023-01-27 16:23:30 -08:00
4 changed files with 643 additions and 283 deletions

View File

@@ -27,18 +27,18 @@ on:
workflow_dispatch:
jobs:
linux:
name: ${{matrix.tag}}
linux-zig-build:
name: Zig ${{matrix.tag}}
runs-on: ${{matrix.runner}}
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
- cpu: haswell
tag: linux-x64
arch: x86_64
build_arch: amd64
runner: linux-amd64
runner: big-ubuntu
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
@@ -46,18 +46,18 @@ jobs:
tag: linux-x64-baseline
arch: x86_64
build_arch: amd64
runner: linux-amd64
runner: big-ubuntu
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
# - 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
@@ -76,78 +76,398 @@ jobs:
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
if: runner.arch == 'X64'
with:
context: .
push: false
cache-from: type=local,src=/tmp/.buildx-cache-${{matrix.tag}}
cache-to: type=local,dest=/tmp/.buildx-cache-${{matrix.tag}}
cache-from: type=gha
cache-to: type=gha,mode=min
build-args: |
ARCH=${{matrix.arch}}
BUILDARCH=${{matrix.build_arch}}
BUILD_MACHINE_ARCH=${{matrix.build_machine_arch}}
CPU_TARGET=${{matrix.cpu}}
ARCH=${{ matrix.arch }}
BUILDARCH=amd64
BUILD_MACHINE_ARCH=x86_64
CPU_TARGET=${{ matrix.cpu }}
TRIPLET=${{matrix.arch}}-linux-gnu
GIT_SHA=${{github.sha}}
platforms: linux/amd64
target: build_release_obj
outputs: type=local,dest=${{runner.temp}}/release
- name: Build and push
uses: docker/build-push-action@v3
if: runner.arch == 'ARM64'
with:
context: .
push: false
cache-from: type=gha
cache-to: type=gha,mode=min
build-args: |
ARCH=${{ matrix.arch }}
BUILDARCH=arm64
BUILD_MACHINE_ARCH=aarch64
CPU_TARGET=${{ matrix.cpu }}
TRIPLET=${{matrix.arch}}-linux-gnu
GIT_SHA=${{github.sha}}
platforms: linux/arm64
target: build_release_obj
outputs: type=local,dest=${{runner.temp}}/release
- uses: actions/upload-artifact@v3
with:
name: bun-obj-${{ matrix.tag }}
path: ${{runner.temp}}/release/bun.o
linux-dependencies-build:
name: Dependencies ${{matrix.tag}}
runs-on: ${{matrix.runner}}
strategy:
fail-fast: false
matrix:
include:
- cpu: haswell
tag: linux-x64
arch: x86_64
build_arch: amd64
runner: big-ubuntu
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: nehalem
tag: linux-x64-baseline
arch: x86_64
build_arch: amd64
runner: big-ubuntu
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
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 }}
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}-ccache-${{ matrix.tag }}-dependencies
restore-keys: ${{ runner.os }}-ccache-${{ matrix.tag }}-dependencies
- name: Build and push
uses: docker/build-push-action@v3
if: runner.arch == 'X64'
with:
context: .
push: false
cache-from: type=gha
cache-to: type=gha,mode=min
build-args: |
ARCH=${{ matrix.arch }}
BUILDARCH=amd64
BUILD_MACHINE_ARCH=x86_64
CPU_TARGET=${{ matrix.cpu }}
TRIPLET=${{matrix.arch}}-linux-gnu
GIT_SHA=${{github.sha}}
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
platforms: linux/amd64
target: compile-dependencies
outputs: type=local,dest=${{runner.temp}}/dependencies
- name: Build and push
uses: docker/build-push-action@v3
if: runner.arch == 'ARM64'
with:
context: .
push: false
cache-from: type=gha
cache-to: type=gha,mode=min
build-args: |
ARCH=${{ matrix.arch }}
BUILDARCH=arm64
BUILD_MACHINE_ARCH=aarch64
CPU_TARGET=${{ matrix.cpu }}
TRIPLET=${{matrix.arch}}-linux-gnu
GIT_SHA=${{github.sha}}
WEBKIT_URL=${{matrix.webkit_url}}
GIT_SHA=${{github.sha}}
WEBKIT_BASENAME=${{matrix.webkit_basename}}
CPU_COUNT=${{runner.cores}}
platforms: linux/arm64
target: compile-dependencies
outputs: type=local,dest=${{runner.temp}}/dependencies
- uses: actions/upload-artifact@v3
with:
name: bun-dependencies-${{ matrix.tag }}
path: ${{runner.temp}}/dependencies
linux-cpp-build:
name: C++ ${{matrix.tag}}
runs-on: ${{matrix.runner}}
strategy:
fail-fast: false
matrix:
include:
- cpu: haswell
tag: linux-x64
arch: x86_64
build_arch: amd64
runner: big-ubuntu
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: nehalem
tag: linux-x64-baseline
arch: x86_64
build_arch: amd64
runner: big-ubuntu
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
with:
submodules: recursive
- uses: docker/setup-buildx-action@v2
id: buildx
with:
install: true
- name: Run
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}}
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 }}
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}-ccache-${{ matrix.tag }}
restore-keys: ${{ runner.os }}-ccache-${{ matrix.tag }}
- name: Build and push
uses: docker/build-push-action@v3
if: runner.arch == 'X64'
with:
context: .
push: false
cache-from: type=gha
cache-to: type=gha,mode=min
build-args: |
ARCH=${{ matrix.arch }}
BUILDARCH=amd64
BUILD_MACHINE_ARCH=x86_64
CPU_TARGET=${{ matrix.cpu }}
TRIPLET=${{matrix.arch}}-linux-gnu
GIT_SHA=${{github.sha}}
WEBKIT_URL=${{matrix.webkit_url}}
GIT_SHA=${{github.sha}}
WEBKIT_BASENAME=${{matrix.webkit_basename}}
platforms: linux/amd64
target: build_release_cpp
outputs: type=local,dest=${{runner.temp}}/cpp
- name: Build and push
uses: docker/build-push-action@v3
if: runner.arch == 'ARM64'
with:
context: .
push: false
cache-from: type=gha
cache-to: type=gha,mode=min
build-args: |
ARCH=${{ matrix.arch }}
BUILDARCH=arm64
BUILD_MACHINE_ARCH=aarch64
CPU_TARGET=${{ matrix.cpu }}
TRIPLET=${{matrix.arch}}-linux-gnu
GIT_SHA=${{github.sha}}
WEBKIT_URL=${{matrix.webkit_url}}
GIT_SHA=${{github.sha}}
WEBKIT_BASENAME=${{matrix.webkit_basename}}
CPU_COUNT=${{runner.cores}}
platforms: linux/arm64
target: build_release_cpp
outputs: type=local,dest=${{runner.temp}}/cpp
- 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
name: bun-cpp-${{ matrix.tag }}
path: ${{runner.temp}}/cpp
linux-link-build:
name: Link ${{matrix.tag}}
runs-on: ${{matrix.runner}}
timeout-minutes: 90
needs: [linux-zig-build, linux-dependencies-build, linux-cpp-build]
strategy:
fail-fast: false
matrix:
include:
- cpu: haswell
tag: linux-x64
arch: x86_64
build_arch: amd64
runner: ubuntu-20.04
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
package: bun-linux-x64
- cpu: nehalem
tag: linux-x64-baseline
arch: x86_64
build_arch: amd64
runner: ubuntu-20.04
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
package: bun-linux-x64
# - 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
# package: bun-linux-arm64
steps:
- uses: actions/checkout@v3
with:
name: bun-${{matrix.tag}}
path: ${{runner.temp}}/release/bun-${{matrix.tag}}.zip
- name: Release
id: release
uses: ncipollo/release-action@v1
if: github.ref == 'refs/heads/main'
submodules: recursive
- uses: docker/setup-buildx-action@v2
id: buildx
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"
- uses: actions/upload-artifact@v3
install: true
- name: Run
run: |
rm -rf ${{runner.temp}}/release
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
name: bun-obj-${{matrix.tag}}
path: ${{runner.temp}}/release/bun-obj
- uses: actions/upload-artifact@v3
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
name: ${{matrix.tag}}-dependencies
path: ${{runner.temp}}/release/bun-dependencies
key: ${{ runner.os }}-ccache-${{ matrix.tag }}
restore-keys: ${{ runner.os }}-ccache-${{ matrix.tag }}
- name: Download from cache
uses: actions/download-artifact@v3
with:
name: bun-cpp-${{ matrix.tag }}
path: src/bun.js/bindings-obj
- name: Download from cache
uses: actions/download-artifact@v3
with:
name: bun-obj-${{ matrix.tag }}
path: ${{runner.temp}}/obj
- name: Download from cache
uses: actions/download-artifact@v3
with:
name: bun-dependencies-${{ matrix.tag }}
path: ${{env.BUN_DEPS_OUT_DIR}}
- name: Extract
env:
CPU_TARGET: ${{ matrix.cpu }}
JSC_BASE_DIR: ${{ runner.temp }}/bun-webkit
JSC_LIB: ${{ runner.temp }}/bun-webkit/lib
BUN_DEPLOY_DIR: ${{ runner.temp }}/release/bun
OBJ_DIR: ${{ runner.temp }}/bun-cpp-obj
BUN_DEPS_OUT_DIR: ${{runner.temp}}/bun-deps
BUN_RELEASE_DIR: ${{ runner.temp }}/release
WEBKIT_RELEASE_DIR: ${{ runner.temp }}/bun-webkit
WEBKIT_RELEASE_DIR_LTO: ${{ runner.temp }}/bun-webkit
run: |
mv ${{runner.temp}}/obj/* .
- name: Build and push
uses: docker/build-push-action@v3
if: runner.arch == 'X64'
env:
CPU_TARGET: ${{ matrix.cpu }}
JSC_BASE_DIR: ${{ runner.temp }}/bun-webkit
JSC_LIB: ${{ runner.temp }}/bun-webkit/lib
BUN_DEPLOY_DIR: ${{ runner.temp }}/release/bun
OBJ_DIR: ${{ runner.temp }}/bun-cpp-obj
BUN_DEPS_OUT_DIR: ${{runner.temp}}/bun-deps
BUN_RELEASE_DIR: ${{ runner.temp }}/release
WEBKIT_RELEASE_DIR: ${{ runner.temp }}/bun-webkit
WEBKIT_RELEASE_DIR_LTO: ${{ runner.temp }}/bun-webkit
with:
context: .
push: false
cache-from: type=gha
cache-to: type=gha,mode=min
build-args: |
ARCH=${{ matrix.arch }}
BUILDARCH=amd64
BUILD_MACHINE_ARCH=x86_64
CPU_TARGET=${{ matrix.cpu }}
TRIPLET=${{matrix.arch}}-linux-gnu
GIT_SHA=${{github.sha}}
BUN_DEPS_OUT_DIR=${{runner.temp}}/bun-deps
platforms: linux/amd64
target: link_release
outputs: type=local,dest=${{runner.temp}}/release
- name: Build and push
uses: docker/build-push-action@v3
if: runner.arch == 'ARM64'
env:
CPU_TARGET: ${{ matrix.cpu }}
JSC_BASE_DIR: ${{ runner.temp }}/bun-webkit
JSC_LIB: ${{ runner.temp }}/bun-webkit/lib
BUN_DEPLOY_DIR: ${{ runner.temp }}/release/bun
OBJ_DIR: ${{ runner.temp }}/bun-cpp-obj
BUN_DEPS_OUT_DIR: ${{runner.temp}}/bun-deps
BUN_RELEASE_DIR: ${{ runner.temp }}/release
WEBKIT_RELEASE_DIR: ${{ runner.temp }}/bun-webkit
WEBKIT_RELEASE_DIR_LTO: ${{ runner.temp }}/bun-webkit
with:
context: .
push: false
cache-from: type=gha
cache-to: type=gha,mode=min
build-args: |
ARCH=${{ matrix.arch }}
BUILDARCH=arm64
BUILD_MACHINE_ARCH=aarch64
CPU_TARGET=${{ matrix.cpu }}
TRIPLET=${{matrix.arch}}-linux-gnu
GIT_SHA=${{github.sha}}
WEBKIT_URL=${{matrix.webkit_url}}
WEBKIT_BASENAME=${{matrix.webkit_basename}}
BUN_DEPS_OUT_DIR=${{runner.temp}}/bun-deps
platforms: linux/arm64
target: link_release
outputs: type=local,dest=${{runner.temp}}/release
- name: Upload
uses: actions/upload-artifact@v3
with:
name: bun-${{ matrix.tag }}
path: ${{runner.temp}}/release

View File

@@ -21,6 +21,7 @@ ARG WEBKIT_URL="https://github.com/oven-sh/WebKit/releases/download/$WEBKIT_TAG/
ARG ZIG_URL="https://ziglang.org/builds/${ZIG_FILENAME}"
ARG GIT_SHA=""
ARG BUN_BASE_VERSION=0.5
ARG CPU_COUNT=10
FROM bitnami/minideb:bullseye as bun-base
@@ -441,6 +442,8 @@ ARG GIT_SHA
ARG TRIPLET
ARG BUN_DIR
ARG CPU_TARGET
ARG CPU_COUNT
ENV CPU_TARGET=${CPU_TARGET}
COPY --from=compile_release_obj /tmp/bun-${TRIPLET}-${GIT_SHA}/*.o /
@@ -457,6 +460,7 @@ ARG BUN_DEPS_OUT_DIR
ARG BUN_DIR
ARG CPU_TARGET
ENV CPU_TARGET=${CPU_TARGET}
ARG CPU_COUNT
COPY Makefile ${BUN_DIR}/Makefile
@@ -471,7 +475,7 @@ COPY src/deps/boringssl/include ${BUN_DIR}/src/deps/boringssl/include
ENV CCACHE_DIR=/ccache
RUN --mount=type=cache,target=/ccache cd $BUN_DIR && mkdir -p src/bun.js/bindings-obj && rm -rf $HOME/.cache zig-cache && mkdir -p $BUN_RELEASE_DIR && make webcrypto && \
make release-bindings -j10 && mv ${BUN_DEPS_OUT_DIR}/libwebcrypto.a /tmp && mv src/bun.js/bindings-obj/* /tmp
make release-bindings -j$CPU_COUNT && mv ${BUN_DEPS_OUT_DIR}/libwebcrypto.a /tmp && mv src/bun.js/bindings-obj/* /tmp
FROM bun-base as sqlite
@@ -499,7 +503,7 @@ RUN --mount=type=cache,target=/ccache cd $BUN_DIR && make sqlite
FROM scratch as build_release_cpp
COPY --from=compile_cpp /tmp/*.o /
COPY --from=compile_cpp /tmp/libwebcrypto.a /
COPY --from=compile_cpp /tmp/*.a /
FROM prepare_release as build_release
@@ -537,6 +541,39 @@ COPY --from=build_release_obj /*.o /tmp
COPY --from=build_release_cpp /*.o ${BUN_DIR}/src/bun.js/bindings-obj/
COPY --from=build_release_cpp /*.a ${BUN_DEPS_OUT_DIR}/
RUN cd $BUN_DIR && mkdir -p ${BUN_RELEASE_DIR} && make bun-relink copy-to-bun-release-dir && \
rm -rf $HOME/.cache zig-cache misctools package.json build-id completions build.zig $(BUN_DIR)/packages
FROM prepare_release as build_release_paralell
ARG DEBIAN_FRONTEND
ARG GITHUB_WORKSPACE
ARG ZIG_PATH
# Directory extracts to "bun-webkit"
ARG WEBKIT_DIR
ARG BUN_RELEASE_DIR
ARG BUN_DEPS_OUT_DIR
ARG BUN_DIR
ARG BUN_DEPLOY_DIR=/tmp/bun-out
ARG CPU_TARGET
ENV CPU_TARGET=${CPU_TARGET}
ENV BUN_DEPLOY_DIR=${BUN_DEPLOY_DIR}
COPY Makefile ${BUN_DIR}/Makefile
WORKDIR $BUN_DIR
ENV JSC_BASE_DIR=${WEBKIT_DIR}
ENV LIB_ICU_PATH=${WEBKIT_DIR}/lib
COPY ${BUN_DEPS_OUT_DIR}/*.a ${BUN_DEPS_OUT_DIR}/
COPY ${BUN_DEPS_OUT_DIR}/*.o ${BUN_DEPS_OUT_DIR}/
COPY ${BUN_DEPS_OUT_DIR}/*.o ${BUN_DEPS_OUT_DIR}/
COPY src/bun.js/bindings ${BUN_DIR}/src/bun.js/bindings
COPY bun.o ${BUN_DEPLOY_DIR}/
RUN cd $BUN_DIR && mkdir -p ${BUN_RELEASE_DIR} && make bun-relink copy-to-bun-release-dir && \
rm -rf $HOME/.cache zig-cache misctools package.json build-id completions build.zig $(BUN_DIR)/packages
@@ -586,43 +623,73 @@ CMD make headers \
# FROM bun-test-base as test_base
FROM scratch as compile-dependencies
# ARG DEBIAN_FRONTEND=noninteractive
# ARG GITHUB_WORKSPACE=/build
# ARG ZIG_PATH=${GITHUB_WORKSPACE}/zig
# # Directory extracts to "bun-webkit"
# ARG WEBKIT_DIR=${GITHUB_WORKSPACE}/bun-webkit
# ARG BUN_RELEASE_DIR=${GITHUB_WORKSPACE}/bun-release
# ARG BUN_DEPS_OUT_DIR=${GITHUB_WORKSPACE}/bun-deps
# ARG BUN_DIR=${GITHUB_WORKSPACE}/bun
ARG DEBIAN_FRONTEND
ARG GITHUB_WORKSPACE
ARG ZIG_PATH
ARG WEBKIT_DIR
ARG BUN_RELEASE_DIR
ARG BUN_DEPS_OUT_DIR
ARG BUN_DIR
ARG CPU_TARGET
# ARG BUILDARCH=amd64
# RUN groupadd -r chromium && useradd -d ${BUN_DIR} -M -r -g chromium -G audio,video chromium \
# && mkdir -p /home/chromium/Downloads && chown -R chromium:chromium /home/chromium
ENV CPU_TARGET=${CPU_TARGET}
# USER chromium
# WORKDIR $BUN_DIR
COPY --from=zlib ${BUN_DEPS_OUT_DIR}/*.a /
COPY --from=libarchive ${BUN_DEPS_OUT_DIR}/*.a /
COPY --from=boringssl ${BUN_DEPS_OUT_DIR}/*.a /
COPY --from=lolhtml ${BUN_DEPS_OUT_DIR}/*.a /
COPY --from=mimalloc ${BUN_DEPS_OUT_DIR}/*.o /
COPY --from=picohttp ${BUN_DEPS_OUT_DIR}/*.o /
COPY --from=sqlite ${BUN_DEPS_OUT_DIR}/*.o /
COPY --from=tinycc ${BUN_DEPS_OUT_DIR}/*.a /
COPY --from=uws ${BUN_DEPS_OUT_DIR}/*.a /
COPY --from=uws ${BUN_DEPS_OUT_DIR}/*.o /
COPY --from=c-ares ${BUN_DEPS_OUT_DIR}/*.a /
# ENV NPM_CLIENT bun
# ENV PATH "${BUN_DIR}/packages/bun-linux-x64:${BUN_DIR}/packages/bun-linux-aarch64:$PATH"
# ENV CI 1
# ENV BROWSER_EXECUTABLE /usr/bin/chromium
# COPY ./test ${BUN_DIR}/test
# COPY Makefile ${BUN_DIR}/Makefile
# COPY package.json ${BUN_DIR}/package.json
# COPY .docker/run-test.sh ${BUN_DIR}/run-test.sh
# COPY ./bun.lockb ${BUN_DIR}/bun.lockb
FROM bun-base-with-zig-and-webkit as run-link-step
# # # We don't want to worry about architecture differences in this image
# COPY --from=release /opt/bun/bin/bun ${BUN_DIR}/packages/bun-linux-aarch64/bun
# COPY --from=release /opt/bun/bin/bun ${BUN_DIR}/packages/bun-linux-x64/bun
ARG DEBIAN_FRONTEND
ARG GITHUB_WORKSPACE
ARG ZIG_PATH
# Directory extracts to "bun-webkit"
ARG WEBKIT_DIR
ARG BUN_RELEASE_DIR
ARG BUN_DEPS_OUT_DIR
ARG BUN_DEPLOY_DIR
ARG BUN_DIR
ARG CPU_TARGET
ENV CPU_TARGET=${CPU_TARGET}
# USER root
# RUN chgrp -R chromium ${BUN_DIR} && chmod g+rwx ${BUN_DIR} && chown -R chromium:chromium ${BUN_DIR}
# USER chromium
COPY Makefile ${BUN_DIR}/Makefile
# CMD [ "bash", "run-test.sh" ]
WORKDIR $BUN_DIR
# FROM release
ENV JSC_BASE_DIR=${WEBKIT_DIR}
ENV LIB_ICU_PATH=${WEBKIT_DIR}/lib
COPY ${BUN_DEPS_OUT_DIR}/*.a ${BUN_DEPS_OUT_DIR}/
COPY ${BUN_DEPS_OUT_DIR}/*.o ${BUN_DEPS_OUT_DIR}/
COPY ${BUN_RELEASE_DIR}/bun.o ${BUN_DEPLOY_DIR}/
COPY src/bun.js/bindings-obj/* ${BUN_DIR}/src/bun.js/bindings-obj/
RUN cd ${BUN_DIR} && mkdir -p ${BUN_RELEASE_DIR} && make bun-relink copy-to-bun-release-dir
FROM bun-base-with-zig-and-webkit as link_release
ARG DEBIAN_FRONTEND
ARG GITHUB_WORKSPACE
ARG ZIG_PATH
# Directory extracts to "bun-webkit"
ARG WEBKIT_DIR
ARG BUN_RELEASE_DIR
ARG BUN_DEPS_OUT_DIR
ARG BUN_DEPLOY_DIR
ARG BUN_DIR
ARG CPU_TARGET
ENV CPU_TARGET=${CPU_TARGET}
COPY --from=run-link-step ${BUN_RELEASE_DIR} /

BIN
bun.lockb

Binary file not shown.

File diff suppressed because it is too large Load Diff