Skip to content

Commit 01c8dc6

Browse files
committed
new github workflows
1 parent d0b70ca commit 01c8dc6

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: BAML Release - Build Typescript AArch64 GLIBC
2+
3+
on:
4+
workflow_call: {}
5+
workflow_dispatch: {}
6+
push:
7+
branches:
8+
- sam/ts-release
9+
10+
concurrency:
11+
# suffix is important to prevent a concurrency deadlock with the calling workflow
12+
group: ${{ github.workflow }}-${{ github.ref }}-build-typescript-aarch64
13+
cancel-in-progress: true
14+
15+
env:
16+
DEBUG: napi:*
17+
APP_NAME: baml
18+
MACOSX_DEPLOYMENT_TARGET: "10.13"
19+
# Turbo remote caching
20+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
21+
TURBO_TEAM: gloo
22+
23+
jobs:
24+
build:
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
_:
29+
- target: aarch64-unknown-linux-gnu
30+
# Do not use -latest, since it uses a different glibc version!
31+
host: ubuntu-22.04-arm
32+
# ubuntu-22.04-arm, the oldest available GHA runner, provides glibc 2.35
33+
container: ghcr.io/rust-cross/manylinux_2_28-cross:aarch64
34+
node_build: pnpm build:napi-release --target aarch64-unknown-linux-gnu
35+
cargo_args: -p baml-typescript-ffi -p baml-python-ffi
36+
37+
name: ${{ matrix._.target }}
38+
runs-on: ${{ matrix._.host }}
39+
container: ${{ matrix._.container }}
40+
env:
41+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
46+
# Check GLIBC version for Linux targets (skip musl targets)
47+
- name: Check GLIBC version
48+
if: contains(matrix._.target, 'linux') && !contains(matrix._.target, 'musl')
49+
run: |
50+
ldd --version
51+
52+
# Setup using standardized actions
53+
- name: Setup Node.js
54+
uses: ./.github/actions/setup-node
55+
56+
- name: Setup Rust
57+
uses: ./.github/actions/setup-rust
58+
with:
59+
targets: ${{ matrix._.target }}
60+
prefix-key: v5-rust-${{ matrix._.target }}
61+
cache-on-failure: true
62+
63+
- name: Setup Go
64+
uses: ./.github/actions/setup-go
65+
66+
# per-matrix-entry dependency setup
67+
- name: Build tools setup
68+
if: matrix._.before
69+
run: ${{ matrix._.before }}
70+
71+
# Build the NAPI library and bindings
72+
- name: PNPM Build
73+
run: ${{ matrix._.node_build }}
74+
working-directory: engine/language_client_typescript
75+
76+
- name: Build TS
77+
run: pnpm build:ts_build
78+
working-directory: engine/language_client_typescript
79+
80+
- name: Upload artifact
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: bindings-${{ matrix._.target }}
84+
path: engine/language_client_typescript/*.node
85+
if-no-files-found: error

0 commit comments

Comments
 (0)