Chore(ci)
Build and Bundle Gleam App / format (push) Successful in 44s
Build and Bundle Gleam App / build-linux-binaries (push) Failing after 25m53s

This commit is contained in:
2026-08-31 19:45:57 +02:00
parent 3a6f106c80
commit 9ed051d280
4 changed files with 175 additions and 24 deletions
+64 -2
View File
@@ -9,8 +9,9 @@ all of its input from standard input.
## Standalone executable
Gleam can package the Erlang version of the program as an escript. An escript
is one executable file containing the compiled program and its dependencies
(it does require Erlang to be installed on the machine where it is run).
is one executable file containing the compiled program and its dependencies.
The target system must still have a compatible Erlang/OTP installation with
`escript` on `PATH`.
From the project directory, run:
@@ -50,6 +51,67 @@ printf '%s\n' '!4 emphasized text' | ./luma_markdown
With no arguments, the executable reads until standard input reaches EOF and
writes the resulting Markdown to standard output.
### ARM builds
The escript contains portable BEAM bytecode, so the same file can work on
x86, ARM64, and ARM32. It is not, however, a self-contained native executable:
the target still needs Erlang/OTP. If the ARM system cannot have anything
installed, this built-in export is not sufficient.
```sh
gleam export escript
./luma_markdown input.luma
```
For a no-install distribution, produce one bundled native artifact per
architecture (for example, an x86_64 Linux artifact and an ARM64 Linux
artifact). A native executable cannot run on both instruction sets. This
repository uses [Queso](https://github.com/jtdowney/queso) to bundle the
Erlang runtime and cross-compile the native launcher.
Install Queso and Zig once on the build machine:
```sh
cargo install --locked queso
cargo install cargo-zigbuild
# Install Zig from https://ziglang.org/download/
# Install Rust through https://rustup.rs (the build script adds the targets)
```
On Arch Linux, the Rust toolchain manager can be installed with:
```sh
sudo pacman -S rustup
rustup default stable
```
Then build both self-contained binaries with one command:
```sh
./scripts/build-linux-binaries.sh
```
The results are:
```text
./luma_markdown-linux-x86_64
./luma_markdown-linux-arm64
```
Copy the matching file to a Linux system and run it directly. The destination
does not need Erlang, Gleam, Zig, or Queso.
### CI artifacts
Every push runs the native build in Gitea Actions after formatting succeeds.
The workflow uploads two downloadable artifacts:
- `luma_markdown-linux-x86_64`
- `luma_markdown-linux-arm64`
Download the artifact matching the destination machine, make it executable if
necessary, and run it directly.
## Neovim preview
The working preview configuration is also included in