Skip to content
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8606588
fix(ci): produce static musl binary via zig cross-compilation
birdmanmandbir Apr 7, 2026
c42e83f
fix(ci): remove CMAKE_SYSTEM_NAME=Linux to allow find_library
birdmanmandbir Apr 7, 2026
2074e4f
fix(ci): pass explicit UUID_LIBRARY and UUID_INCLUDE_DIR to cmake
birdmanmandbir Apr 7, 2026
99a6b93
fix(ci): use CMAKE_SYSROOT=zig_musl_sysroot for proper cross-compilation
birdmanmandbir Apr 7, 2026
381d3fe
fix(ci): implement zig musl cross-compilation per plan steps A + B
birdmanmandbir Apr 7, 2026
71b90f4
fix(ci): fix zig setup — use setup-zig action + create wrapper scripts
birdmanmandbir Apr 7, 2026
8ba5336
fix(ci): add UUID_LIBRARY hints and search paths for cmake musl cross…
birdmanmandbir Apr 7, 2026
462393d
fix(ci): quote CMAKE_SYSTEM_PREFIX_PATH semicolons + add cargo config…
birdmanmandbir Apr 7, 2026
9d7d8eb
fix(ci): fix TOML quoting in .cargo/config.toml (escaped quotes in li…
birdmanmandbir Apr 7, 2026
7751dc8
fix(ci): switch Linux musl build to Docker approach
birdmanmandbir Apr 7, 2026
5e07b5f
fix(ci): use alpine:3.21 Docker image for musl build (private image i…
birdmanmandbir Apr 7, 2026
8c5bf12
fix(ci): add zig musl cross-compilation to Linux build step
birdmanmandbir Apr 7, 2026
5a86bdc
fix(ci): pass UUID_LIBRARY and UUID_INCLUDE_DIR to bypass find_librar…
birdmanmandbir Apr 7, 2026
c8ae6d2
fix(ci): strip -target flag from cc-rs calls + skip cmake compiler tests
birdmanmandbir Apr 7, 2026
bcd4fcb
fix(ci): filter --target=VALUE form + add CMAKE_SYSROOT for musl headers
birdmanmandbir Apr 7, 2026
7dbfda3
fix(ci): use toolchain file + isolated UUID headers for musl cross-co…
birdmanmandbir Apr 7, 2026
152b2d6
chore(ci): polish release workflow — add uuid-dev, remove dead code, …
birdmanmandbir Apr 7, 2026
01e1293
fix(ci): fix LIBCLANG_PATH fallback — xargs -r suppresses || fallback
birdmanmandbir Apr 7, 2026
a25cb30
chore(ci): remove pull_request trigger from Release workflow
birdmanmandbir Apr 7, 2026
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
82 changes: 74 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
tags:
- 'v*.*.*'
pull_request:
branches:
- develop

permissions:
contents: write
Expand Down Expand Up @@ -45,14 +42,83 @@ jobs:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target task_executable

- name: Build task binary (Linux — native)
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -q
sudo apt-get install -y cmake clang libclang-dev uuid-dev

- name: Isolate UUID headers
if: runner.os == 'Linux'
run: |
sudo mkdir -p /opt/musl-includes/uuid
sudo cp /usr/include/uuid/uuid.h /opt/musl-includes/uuid/

- name: Set up Rust musl target
if: runner.os == 'Linux'
run: rustup target add x86_64-unknown-linux-musl

- name: Set up Zig
if: runner.os == 'Linux'
uses: mlugg/setup-zig@v1
with:
version: "0.14.0"

- name: Create musl-cc/musl-cxx wrappers
if: runner.os == 'Linux'
run: |
sudo tee /usr/local/bin/musl-cc > /dev/null << 'WRAPPER'
#!/bin/bash
args=()
skip_next=0
for arg in "$@"; do
[ "$skip_next" = "1" ] && { skip_next=0; continue; }
[ "$arg" = "-target" ] && { skip_next=1; continue; }
[[ "$arg" == --target=* ]] && continue
args+=("$arg")
done
exec zig cc -target x86_64-linux-musl "${args[@]}"
WRAPPER
sudo tee /usr/local/bin/musl-cxx > /dev/null << 'WRAPPER'
#!/bin/bash
args=()
skip_next=0
for arg in "$@"; do
[ "$skip_next" = "1" ] && { skip_next=0; continue; }
[ "$arg" = "-target" ] && { skip_next=1; continue; }
[[ "$arg" == --target=* ]] && continue
args+=("$arg")
done
exec zig c++ -target x86_64-linux-musl "${args[@]}"
WRAPPER
sudo chmod +x /usr/local/bin/musl-cc /usr/local/bin/musl-cxx

- name: Build task binary (Linux — musl)
if: runner.os == 'Linux'
run: |
set -e
sudo apt-get update -qq
sudo apt-get install -y -qq libclang-dev
export LIBCLANG_PATH=$(dpkg -L libclang-dev 2>/dev/null | grep 'libclang.*\.so$' | head -1 | xargs dirname || echo /usr/lib/llvm-14/lib)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
printf '%s\n' \
'set(CMAKE_SYSTEM_NAME Linux)' \
'set(CMAKE_SYSTEM_PROCESSOR x86_64)' \
'set(CMAKE_C_COMPILER /usr/local/bin/musl-cc)' \
'set(CMAKE_CXX_COMPILER /usr/local/bin/musl-cxx)' \
'set(CMAKE_C_COMPILER_WORKS TRUE)' \
'set(CMAKE_CXX_COMPILER_WORKS TRUE)' \
'set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "")' \
'set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "")' \
'set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)' \
'set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)' \
'set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)' \
> /tmp/musl-toolchain.cmake
_lib=$(dpkg -L libclang-dev 2>/dev/null | grep 'libclang.*\.so$' | head -1)
export LIBCLANG_PATH=${_lib:+$(dirname "$_lib")}
export LIBCLANG_PATH=${LIBCLANG_PATH:-/usr/lib/llvm-14/lib}
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=/tmp/musl-toolchain.cmake \
-DUUID_INCLUDE_DIR=/opt/musl-includes \
-DUUID_LIBRARY=/usr/lib/x86_64-linux-gnu/libuuid.so \
-DRust_CARGO_TARGET=x86_64-unknown-linux-musl
cmake --build build --target task_executable -j$(nproc)

- name: Package binary + completions
Expand Down