Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/lanes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const platforms = [
args: arch => ({
...ICU,
FREEBSD_ARCH: arch === "arm64" ? "aarch64" : "x86_64",
FREEBSD_VERSION: "14.3",
FREEBSD_VERSION: "14.4",
MARCH_FLAG: arch === "arm64" ? `${ARMV8} -mtune=ampere1` : NEHALEM,
}),
},
Expand Down
38 changes: 26 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ ARG USE_EXTERNAL_MIMALLOC="OFF"
ARG LINUX_ARCH="x86_64"

# The arm64 ubuntu:20.04, only ever copied from (see the aarch64 sysroot in `base`): nothing of it is run.
FROM --platform=linux/arm64 ubuntu:20.04 as rootfs-arm64
FROM --platform=linux/arm64 ubuntu:20.04@sha256:8feb4d8ca5354def3d8fce243717141ce31e2c428701f6682bd2fafe15388214 as rootfs-arm64

# `base` is the toolchain and nothing else: it takes no lane setting (LTO_FLAG, MARCH_FLAG, WEBKIT_RELEASE_TYPE, ...), so
# it is the same for every lane of an architecture. CI builds it once per change, keeps it in ghcr.io, and hands it to
# the lanes as `--build-context base=docker-image://...`, which replaces this stage (.github/workflows/ci.yml, the
# `image` job). Without that, it is built here like any other stage. Lane settings belong in `lane` below.
FROM ubuntu:20.04 as base
FROM ubuntu:20.04@sha256:8feb4d8ca5354def3d8fce243717141ce31e2c428701f6682bd2fafe15388214 as base

ARG LLVM_VERSION

Expand Down Expand Up @@ -62,25 +62,39 @@ RUN ( apt-get update || \
# Its lib/ sources stay, at /zstd/lib: the jsc shell builds the decoder from them to read that data
# (shell/CMakeLists.txt, BUN_ICU_ZSTD_SOURCE_DIR).
ARG ZSTD_VERSION=1.5.7
RUN curl -fsSL "https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}/zstd-${ZSTD_VERSION}.tar.gz" | tar xz -C /tmp \
ARG ZSTD_SHA256=eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3
RUN curl -fsSL --retry 5 --retry-connrefused \
"https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}/zstd-${ZSTD_VERSION}.tar.gz" \
-o /tmp/zstd.tar.gz \
&& echo "${ZSTD_SHA256} /tmp/zstd.tar.gz" | sha256sum -c - \
&& tar xzf /tmp/zstd.tar.gz -C /tmp \
&& make -C /tmp/zstd-${ZSTD_VERSION}/programs zstd -j$(nproc) \
&& cp /tmp/zstd-${ZSTD_VERSION}/programs/zstd /usr/local/bin/ \
&& mkdir /zstd && cp -r /tmp/zstd-${ZSTD_VERSION}/lib /zstd/lib && test -f /zstd/lib/zstd.h \
&& rm -rf /tmp/zstd-${ZSTD_VERSION} \
&& rm -rf /tmp/zstd-${ZSTD_VERSION} /tmp/zstd.tar.gz \
&& zstd --version

# Install Node (for icu/compress-data.ts; needs >=23.6 for default type stripping)
ARG NODE_VERSION=24.16.0
RUN curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/').tar.xz" \
| tar -xJ -C /usr/local --strip-components=1 \
ARG NODE_VERSION=24.22.1
ARG NODE_SHA256=6c172a9ab6718f7b801fb5a7bd486af2ee5e32758086a04b84fcce2aa77095e6
RUN curl -fsSL --retry 5 --retry-connrefused \
"https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" \
-o /tmp/node.tar.xz \
&& echo "${NODE_SHA256} /tmp/node.tar.xz" | sha256sum -c - \
&& tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 \
&& rm /tmp/node.tar.xz \
&& node --version

# Install modern CMake for Ubuntu
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null \
&& apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" \
&& apt-get update \
&& apt-get install -y cmake \
&& rm -rf /var/lib/apt/lists/*
ARG CMAKE_VERSION=4.4.4
ARG CMAKE_SHA256=e5bb807f7728cb60cd8b27ebc97a2edb469b68655f21e844a600c3575b76f5bb
RUN curl -fsSL --retry 5 --retry-connrefused \
"https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz" \
-o /tmp/cmake.tar.gz \
&& echo "${CMAKE_SHA256} /tmp/cmake.tar.gz" | sha256sum -c - \
&& tar xzf /tmp/cmake.tar.gz -C /usr/local --strip-components=1 \
&& rm /tmp/cmake.tar.gz \
&& cmake --version

# Install GCC 13 toolchain
# Mirrored from ppa:ubuntu-toolchain-r/test to a GitHub release so this image
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG DEFAULT_CFLAGS="-mno-omit-leaf-frame-pointer -g -fno-omit-frame-pointer -ffu
ARG USE_MIMALLOC="OFF"
ARG USE_EXTERNAL_MIMALLOC="OFF"

FROM ubuntu:24.04 AS base
FROM ubuntu:24.04@sha256:68ee22004a9109b44973313b02ff7b1de250f1de0f5ecb628d73f579aaff33ac AS base
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG LLVM_VERSION
Expand Down
14 changes: 10 additions & 4 deletions Dockerfile.freebsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ ARG WEBKIT_RELEASE_TYPE=Release
ARG LTO_FLAG=""
ARG LLVM_VERSION="23"
ARG LLVM_DEBS_SHA256="993eba8b8ca23ea4d6074643d52ff9397b411e6ac5af6b7b2ca09dca2b351011"
ARG FREEBSD_VERSION="14.3"
ARG FREEBSD_VERSION="14.4"
# base.txz in the MANIFEST beside it.
ARG FREEBSD_BASE_SHA256_amd64="769f60a6eea2938ad6b7943cfbcc17dfaf7d1f7ba59a32b869a00349302df853"
ARG FREEBSD_BASE_SHA256_arm64="c456bf75ee3d0b4da0b0b527402b0a9e61497f02756b2cc5801b51e80b3f90c4"
ARG FREEBSD_ARCH="x86_64"
ARG DEFAULT_CFLAGS="-mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -ffunction-sections -fdata-sections -faddrsig -fno-unwind-tables -fno-asynchronous-unwind-tables -DU_STATIC_IMPLEMENTATION=1 "
ARG USE_MIMALLOC="OFF"
Expand All @@ -13,12 +16,14 @@ ARG USE_EXTERNAL_MIMALLOC="OFF"
# but FreeBSD's libc++ headers generate notably more DWARF).
ARG DEBUG_CFLAGS="-g"

FROM ubuntu:24.04 AS base
FROM ubuntu:24.04@sha256:68ee22004a9109b44973313b02ff7b1de250f1de0f5ecb628d73f579aaff33ac AS base
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG LLVM_VERSION
ARG LLVM_DEBS_SHA256
ARG FREEBSD_VERSION
ARG FREEBSD_BASE_SHA256_amd64
ARG FREEBSD_BASE_SHA256_arm64
ARG FREEBSD_ARCH

RUN apt-get update && apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -51,13 +56,14 @@ ENV LD=lld-${LLVM_VERSION}
# and /usr/lib/libc++.* come from here.
RUN set -eux; \
case "${FREEBSD_ARCH}" in \
x86_64) FBSD_DL_ARCH="amd64" ;; \
aarch64) FBSD_DL_ARCH="arm64" ;; \
x86_64) FBSD_DL_ARCH="amd64"; FBSD_BASE_SHA256="${FREEBSD_BASE_SHA256_amd64}" ;; \
aarch64) FBSD_DL_ARCH="arm64"; FBSD_BASE_SHA256="${FREEBSD_BASE_SHA256_arm64}" ;; \
*) echo "unsupported FREEBSD_ARCH ${FREEBSD_ARCH}" >&2; exit 1 ;; \
esac; \
mkdir -p /opt/freebsd-sysroot; \
wget -q "https://download.freebsd.org/releases/${FBSD_DL_ARCH}/${FREEBSD_VERSION}-RELEASE/base.txz" -O /tmp/base.txz || \
wget -q "https://archive.freebsd.org/old-releases/${FBSD_DL_ARCH}/${FREEBSD_VERSION}-RELEASE/base.txz" -O /tmp/base.txz; \
echo "${FBSD_BASE_SHA256} /tmp/base.txz" | sha256sum -c -; \
tar -C /opt/freebsd-sysroot -xJf /tmp/base.txz ./usr/include ./usr/lib ./lib; \
rm /tmp/base.txz
ENV FREEBSD_SYSROOT=/opt/freebsd-sysroot
Expand Down
32 changes: 21 additions & 11 deletions Dockerfile.macos
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@ ARG MACOS_ARCH="arm64"
# deployment target — not the SDK — controls the oldest macOS the artifacts
# run on, so this tracks the newest SDK Apple serves. Apple's catalog is a
# rolling window: when this release stops being served, run `list` and bump
# both pins.
# the pins. The sha256 is of the .pkg that `download` leaves in the cache.
ARG MACOS_SDK_VERSION="26.5"
ARG MACOS_SDK_CLT_RELEASE="26.5"
ARG MACOS_SDK_PKG_SHA256="5f044578cd78a3a9b9c965a42d56bad609ee5d252e1d4e6aa7c42fc3f35fee7b"
ARG MACOS_DEPLOYMENT_TARGET="13.0"
# Bun runs the vendored xmac tool that fetches the SDK from Apple. Same R2
# mirror .github/actions/setup-bun uses.
ARG BUN_DOWNLOAD_URL="https://pub-5e11e972747a44bf9aaf9394f185a982.r2.dev/releases/latest"
# Bun runs the vendored xmac tool that fetches the SDK from Apple.
ARG BUN_VERSION="1.4.4"
ARG BUN_SHA256="bf8ccbfb2b0b80159e0f9a6d15c55317add8077534dbc6130a3edb52fccb395c"
ARG WEBKIT_RELEASE_TYPE=Release
ARG LTO_FLAG=""
ARG MARCH_FLAG="-mcpu=apple-m1"
ARG LLVM_VERSION="23"
ARG LLVM_DEBS_SHA256="993eba8b8ca23ea4d6074643d52ff9397b411e6ac5af6b7b2ca09dca2b351011"
ARG BOOTSTRAP_CMDS_TAG="bootstrap_cmds-138"
ARG BOOTSTRAP_CMDS_COMMIT="c71d2d72f48995baaea76148f61002e5299841de"
# What every variant is compiled with. Cross-only additions live in the build stage.
ARG DEFAULT_CFLAGS="-fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -O3 -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -faddrsig "
# Per-variant extras (CPP_FLAGS in .github/scripts/lanes.mjs), e.g.
Expand All @@ -49,16 +51,18 @@ ARG USE_EXTERNAL_MIMALLOC="OFF"
ARG COMPILER_RT_DARWIN_TAG="compiler-rt-darwin-23.1.1"
ARG COMPILER_RT_DARWIN_SHA256="35241a2d4cff6119b78279ace69cf89c9a190bd5ec7d2baa8d9d7f2a45d9957b"

FROM ubuntu:24.04 AS base
FROM ubuntu:24.04@sha256:68ee22004a9109b44973313b02ff7b1de250f1de0f5ecb628d73f579aaff33ac AS base
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG LLVM_VERSION
ARG LLVM_DEBS_SHA256
ARG MACOS_ARCH
ARG MACOS_SDK_VERSION
ARG MACOS_SDK_CLT_RELEASE
ARG MACOS_SDK_PKG_SHA256
ARG MACOS_DEPLOYMENT_TARGET
ARG BUN_DOWNLOAD_URL
ARG BUN_VERSION
ARG BUN_SHA256
ARG COMPILER_RT_DARWIN_TAG
ARG COMPILER_RT_DARWIN_SHA256

Expand Down Expand Up @@ -88,11 +92,11 @@ ENV AR=llvm-ar-${LLVM_VERSION}
ENV RANLIB=llvm-ranlib-${LLVM_VERSION}

# Bun — only used to run the vendored xmac tool below.
RUN case "$(uname -m)" in arm64|aarch64) arch=aarch64;; *) arch=x64;; esac && \
wget -q "${BUN_DOWNLOAD_URL}/bun-linux-${arch}.zip" -O /tmp/bun.zip && \
RUN wget -q "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip" -O /tmp/bun.zip && \
echo "${BUN_SHA256} /tmp/bun.zip" | sha256sum -c - && \
unzip -q /tmp/bun.zip -d /tmp && \
install -m 0755 /tmp/bun-linux-${arch}/bun /usr/local/bin/bun && \
rm -rf /tmp/bun.zip /tmp/bun-linux-${arch} && \
install -m 0755 /tmp/bun-linux-x64/bun /usr/local/bin/bun && \
rm -rf /tmp/bun.zip /tmp/bun-linux-x64 && \
bun --version

# macOS SDK — headers, libc++, framework headers, and the .tbd linker stubs
Expand All @@ -103,7 +107,11 @@ RUN case "$(uname -m)" in arm64|aarch64) arch=aarch64;; *) arch=x64;; esac && \
# Apple itself, nothing is redistributed. Integrity is verified against the
# SHA-1 checksums in the package's signed xar table of contents.
COPY macos-cross/xmac.mjs /xmac.mjs
RUN bun /xmac.mjs splat --accept-license --sdk-only \
RUN bun /xmac.mjs download --accept-license \
--release "${MACOS_SDK_CLT_RELEASE}" --sdk "${MACOS_SDK_VERSION}" \
--cache-dir /tmp/xmac-cache && \
echo "${MACOS_SDK_PKG_SHA256} $(echo /tmp/xmac-cache/dl/*/*.pkg)" | sha256sum -c - && \
bun /xmac.mjs splat --offline --accept-license --sdk-only \
--release "${MACOS_SDK_CLT_RELEASE}" --sdk "${MACOS_SDK_VERSION}" \
--output /tmp/xmac-out --cache-dir /tmp/xmac-cache && \
mkdir -p /opt && \
Expand Down Expand Up @@ -143,9 +151,11 @@ RUN mkdir -p /output/lib /output/include /output/include/JavaScriptCore /output/
# ───────────────────────────────────────────────────────────────────────────
# Part of `base`: it is the same for every lane.
ARG BOOTSTRAP_CMDS_TAG
ARG BOOTSTRAP_CMDS_COMMIT
COPY macos-cross/ /macos-cross/
RUN git clone --depth=1 --branch ${BOOTSTRAP_CMDS_TAG} \
https://github.com/apple-oss-distributions/bootstrap_cmds.git /bootstrap_cmds && \
test "$(git -C /bootstrap_cmds rev-parse HEAD)" = "${BOOTSTRAP_CMDS_COMMIT}" && \
cd /bootstrap_cmds/migcom.tproj && \
flex -o lexxer.c lexxer.l && \
bison -d -o parser.c parser.y && \
Expand Down
11 changes: 8 additions & 3 deletions Dockerfile.musl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG LINUX_ARCH="x86_64"
# `base` is the toolchain and nothing else: it takes no lane setting, so it is the same for every lane. CI builds it once per change, keeps it in ghcr.io, and hands it to the lanes as
# `--build-context base=docker-image://...`, which replaces this stage (.github/workflows/ci.yml, the `image` job).
# Without that, it is built here like any other stage. Lane settings belong in `lane` below.
FROM alpine:3.23 as base
FROM alpine:3.23@sha256:85fe1e81d6758c208f3e1eed4338a1997e19d4be002d4dd32d3100c9a8c010a0 as base

# LLVM 23 is in Alpine edge only. `@edge` is a tagged repository: apk takes a package from it only when the package is
# asked for with that tag, or when a tagged package needs something 3.23 does not have. So musl, libstdc++ and gcc stay
Expand Down Expand Up @@ -42,11 +42,16 @@ ENV LD lld
# Its lib/ sources stay, at /zstd/lib: the jsc shell builds the decoder from them to read that data
# (shell/CMakeLists.txt, BUN_ICU_ZSTD_SOURCE_DIR).
ARG ZSTD_VERSION=1.5.7
RUN curl -fsSL "https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}/zstd-${ZSTD_VERSION}.tar.gz" | tar xz -C /tmp \
ARG ZSTD_SHA256=eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3
RUN curl -fsSL --retry 5 --retry-connrefused \
"https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}/zstd-${ZSTD_VERSION}.tar.gz" \
-o /tmp/zstd.tar.gz \
&& echo "${ZSTD_SHA256} /tmp/zstd.tar.gz" | sha256sum -c - \
&& tar xzf /tmp/zstd.tar.gz -C /tmp \
&& make -C /tmp/zstd-${ZSTD_VERSION}/programs zstd -j$(nproc) \
&& cp /tmp/zstd-${ZSTD_VERSION}/programs/zstd /usr/local/bin/ \
&& mkdir /zstd && cp -r /tmp/zstd-${ZSTD_VERSION}/lib /zstd/lib && test -f /zstd/lib/zstd.h \
&& rm -rf /tmp/zstd-${ZSTD_VERSION} \
&& rm -rf /tmp/zstd-${ZSTD_VERSION} /tmp/zstd.tar.gz \
&& zstd --version

# ───────────────────────────────────────────────────────────────────────────
Expand Down
Loading
Loading