ci
Build and Bundle Gleam App / format (push) Successful in 12s
Build and Bundle Gleam App / build-linux-binaries (push) Failing after 8m0s

This commit is contained in:
2026-08-31 20:54:10 +02:00
parent 9ed051d280
commit b70cf8b27a
3 changed files with 79 additions and 24 deletions
+3 -24
View File
@@ -22,35 +22,14 @@ jobs:
needs: format
runs-on: ubuntu-latest
container:
image: jaypoch/lumabuilder:latest
image: jaypoch/luma-markdown-builder:latest
env:
PATH: /root/.cargo/bin:/usr/local/bin:/usr/bin:/bin
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install native packaging tools
run: |
set -eu
export PATH="$HOME/.cargo/bin:$PATH"
if ! command -v rustup >/dev/null 2>&1; then
curl --fail --silent --show-error https://sh.rustup.rs \
| sh -s -- -y --profile minimal
fi
export PATH="$HOME/.cargo/bin:$PATH"
rustup default stable
if ! command -v zig >/dev/null 2>&1; then
curl --fail --silent --show-error --location \
https://ziglang.org/download/0.16.0/zig-x86_64-linux-0.16.0.tar.xz \
--output /tmp/zig.tar.xz
tar -xJf /tmp/zig.tar.xz -C /tmp
ln -s /tmp/zig-x86_64-linux-0.16.0/zig "$HOME/.cargo/bin/zig"
fi
cargo install --locked queso
cargo install cargo-zigbuild
- name: Build x86_64 and ARM64 binaries
run: ./scripts/build-linux-binaries.sh
+71
View File
@@ -0,0 +1,71 @@
FROM alpine:3.20
ARG TARGETARCH
RUN apk add --no-cache \
bash \
build-base \
ca-certificates \
curl \
erlang \
erlang-dev \
git \
nodejs \
npm \
openssl-dev \
pkgconf \
tar \
xz
# Install the Gleam compiler matching the architecture of this image.
RUN set -eux; \
case "$TARGETARCH" in \
amd64) GLEAM_ARCH="x86_64-unknown-linux-musl" ;; \
arm64) GLEAM_ARCH="aarch64-unknown-linux-musl" ;; \
*) echo "Unsupported architecture: $TARGETARCH" >&2; exit 1 ;; \
esac; \
curl --fail --silent --show-error --location \
"https://github.com/gleam-lang/gleam/releases/download/v1.18.1/gleam-v1.18.1-${GLEAM_ARCH}.tar.gz" \
--output /tmp/gleam.tar.gz; \
tar -xzf /tmp/gleam.tar.gz -C /tmp; \
install -m 0755 /tmp/gleam /usr/local/bin/gleam; \
rm -rf /tmp/gleam /tmp/gleam.tar.gz
ENV PATH="/root/.cargo/bin:/usr/local/bin:${PATH}"
# Rust is used by Queso to compile its self-contained launcher.
RUN curl --fail --silent --show-error https://sh.rustup.rs \
| sh -s -- -y --profile minimal \
&& rustup default stable \
&& rustup target add \
x86_64-unknown-linux-musl \
aarch64-unknown-linux-musl
# Zig is used for the native cross-compilation and is installed for the
# architecture running the builder.
RUN set -eux; \
case "$TARGETARCH" in \
amd64) ZIG_ARCH="x86_64" ;; \
arm64) ZIG_ARCH="aarch64" ;; \
*) echo "Unsupported architecture: $TARGETARCH" >&2; exit 1 ;; \
esac; \
curl --fail --silent --show-error --location \
"https://ziglang.org/download/0.16.0/zig-${ZIG_ARCH}-linux-0.16.0.tar.xz" \
--output /tmp/zig.tar.xz; \
mkdir -p /opt/zig; \
tar -xJf /tmp/zig.tar.xz --strip-components=1 -C /opt/zig; \
ln -s /opt/zig/zig /usr/local/bin/zig; \
rm -f /tmp/zig.tar.xz
RUN cargo install --locked queso \
&& cargo install cargo-zigbuild
RUN gleam --version \
&& rustup --version \
&& zig version \
&& queso --version \
&& cargo-zigbuild --version
WORKDIR /build
CMD ["gleam", "build"]
+5
View File
@@ -104,6 +104,11 @@ does not need Erlang, Gleam, Zig, or Queso.
### CI artifacts
Every push runs the native build in Gitea Actions after formatting succeeds.
The binary build uses the prebuilt
`jaypoch/luma-markdown-builder:latest` image, which contains Gleam, Rust,
rustup, Zig, Queso, and `cargo-zigbuild`. The image definition is in
[`Dockerfile.luma-builder`](Dockerfile.luma-builder).
The workflow uploads two downloadable artifacts:
- `luma_markdown-linux-x86_64`