Skip to content

try glibc 2.17

try glibc 2.17 #10

name: BAML Release - Build Typescript AArch64 GLIBC
on:
workflow_call: {}
workflow_dispatch: {}
push:
branches:
- sam/ts-release
concurrency:
# suffix is important to prevent a concurrency deadlock with the calling workflow
group: ${{ github.workflow }}-${{ github.ref }}-build-typescript-aarch64
cancel-in-progress: true
env:
DEBUG: napi:*
APP_NAME: baml
MACOSX_DEPLOYMENT_TARGET: "10.13"
# Turbo remote caching
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: gloo
jobs:
build:
strategy:
fail-fast: false
matrix:
_:
- target: aarch64-unknown-linux-gnu
# Do not use -latest, since it uses a different glibc version!
host: ubuntu-22.04-arm
# ubuntu-22.04-arm, the oldest available GHA runner, has glibc 2.35
container: ghcr.io/rust-cross/manylinux2014-cross:aarch64
node_build: pnpm build:napi-release --target aarch64-unknown-linux-gnu
cargo_args: -p baml-typescript-ffi -p baml-python-ffi
name: ${{ matrix._.target }}
runs-on: ${{ matrix._.host }}
container: ${{ matrix._.container }}
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
# manylinux2014 cross toolchain does not define __ARM_ARCH for ring's asm;
# force it via target-specific CFLAGS so cc-rs sets it when compiling asm.
CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8"
CFLAGS_aarch64-unknown-linux-gnu: "-D__ARM_ARCH=8"
steps:
- name: Checkout
uses: actions/checkout@v4
# Check GLIBC version for Linux targets (skip musl targets)
- name: Check GLIBC version
if: contains(matrix._.target, 'linux') && !contains(matrix._.target, 'musl')
run: |
ldd --version
# Setup using standardized actions
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
targets: ${{ matrix._.target }}
prefix-key: v5-rust-${{ matrix._.target }}
cache-on-failure: true
- name: Setup Go
uses: ./.github/actions/setup-go
# per-matrix-entry dependency setup
- name: Build tools setup
if: matrix._.before
run: ${{ matrix._.before }}
# Build the NAPI library and bindings
- name: PNPM Build
run: ${{ matrix._.node_build }}
working-directory: engine/language_client_typescript
- name: Build TS
run: pnpm build:ts_build
working-directory: engine/language_client_typescript
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix._.target }}
path: engine/language_client_typescript/*.node
if-no-files-found: error