Page MenuHomePhorge

build-linux-musl-aarch64.yml
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

build-linux-musl-aarch64.yml

name: Build Linux aarch64 [musl]
on:
workflow_dispatch:
workflow_call:
inputs:
build_timestamp:
required: true
type: string
jobs:
linux-musl-aarch64:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache native dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: ~/deps-cache
key: deps-linux-musl-aarch64-llhttp-9.2.1-libuv-1.51.0-zlib-1.3.1-v1
- name: Cache meson build
uses: actions/cache@v4
with:
path: |
vendor/*/
build/
!build/oxc-target
key: meson-linux-musl-aarch64-${{ hashFiles('vendor/*.wrap', 'meson.build', 'src/**/*.c', 'src/**/*.h') }}
restore-keys: meson-linux-musl-aarch64-
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo-cache/registry
~/.cargo-cache/git
build/oxc-target
key: cargo-linux-musl-aarch64-${{ hashFiles('src/strip/Cargo.lock') }}
restore-keys: cargo-linux-musl-aarch64-
- name: Build in Alpine container
run: |
mkdir -p ~/.cargo-cache
docker run --rm -v "$PWD":/work -v "$HOME/deps-cache":/deps-cache -v "$HOME/.cargo-cache":/root/.cargo -w /work alpine:edge sh -c '
apk add --no-cache git clang lld llvm meson ninja cmake pkgconf curl npm nodejs \
musl-dev openssl-dev openssl-libs-static libsodium-dev libsodium-static \
util-linux-dev util-linux-static linux-headers libunwind-dev libunwind-static rust cargo
git config --global --add safe.directory /work
export CFLAGS="-Os -flto"
export AR=llvm-ar
export RANLIB=llvm-ranlib
if [ ! -f /deps-cache/lib/libllhttp.a ]; then
git clone --depth 1 --branch release/v9.2.1 https://github.com/nodejs/llhttp.git /tmp/llhttp
cd /tmp/llhttp
CC=clang cmake -G Ninja -B build -DCMAKE_INSTALL_PREFIX=/deps-cache -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DCMAKE_BUILD_TYPE=MinSizeRel
cmake --build build
cmake --install build
fi
if [ ! -f /deps-cache/lib/libuv.a ]; then
git clone --depth 1 --branch v1.51.0 https://github.com/libuv/libuv.git /tmp/libuv
cd /tmp/libuv
CC=clang cmake -G Ninja -B build -DCMAKE_INSTALL_PREFIX=/deps-cache -DBUILD_TESTING=OFF -DLIBUV_BUILD_SHARED=OFF -DCMAKE_BUILD_TYPE=MinSizeRel
cmake --build build
cmake --install build
fi
if [ ! -f /deps-cache/lib/libz.a ]; then
git clone --depth 1 --branch v1.3.1 https://github.com/madler/zlib.git /tmp/zlib
cd /tmp/zlib
CC=clang cmake -G Ninja -B build -DCMAKE_INSTALL_PREFIX=/deps-cache -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=MinSizeRel
cmake --build build
cmake --install build
rm -f /deps-cache/lib/libz.so*
fi
cd /work
npm ci --prefix src/tools
export PKG_CONFIG_PATH="/deps-cache/lib/pkgconfig:$PKG_CONFIG_PATH"
export CMAKE_PREFIX_PATH="/deps-cache:$CMAKE_PREFIX_PATH"
CC=clang CC_LD=lld meson setup build --prefer-static -Db_lto=true --buildtype=release -Dstatic_link=true -Dbuild_timestamp=${{ inputs.build_timestamp }} && meson compile -C build
llvm-strip build/ant
'
- uses: actions/upload-artifact@v4
with:
name: ant-linux-aarch64-musl
path: build/ant

File Metadata

Mime Type
text/plain
Expires
Sun, May 3, 7:20 AM (2 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
537473
Default Alt Text
build-linux-musl-aarch64.yml (3 KB)

Event Timeline