Skip to content

Commit a37cdb7

Browse files
authored
Make TS compatible with glibc 2.31+ (#1670)
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Add GLIBC version check and change host to `ubuntu-20.04` for specific Linux targets in GitHub Actions workflow. > > - **Workflow Changes**: > - Add step to check GLIBC version using `ldd --version` for Linux targets in `build-typescript-release.reusable.yaml`. > - Change host from `ubuntu-latest` to `ubuntu-20.04` for `aarch64-unknown-linux-gnu` and `x86_64-unknown-linux-gnu` targets to ensure consistent GLIBC versions. > - **Caching**: > - Modify cache key from `shared-key` to `prefix-key` in `build-typescript-release.reusable.yaml`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup> for 6ed42ed. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
1 parent 1d53ed8 commit a37cdb7

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/build-typescript-release.reusable.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: BAML Release - Build Typescript
33
on:
44
workflow_call: {}
55

6+
67
concurrency:
78
# suffix is important to prevent a concurrency deadlock with the calling workflow
89
group: ${{ github.workflow }}-${{ github.ref }}-build-typescript
@@ -24,7 +25,8 @@ jobs:
2425
node_build: pnpm build:napi-release --target aarch64-apple-darwin
2526

2627
- target: aarch64-unknown-linux-gnu
27-
host: ubuntu-latest
28+
# Do not use -latest, since it uses a different glibc version!
29+
host: ubuntu-20.04
2830
# from https://github.com/PyO3/maturin-action?tab=readme-ov-file#manylinux-docker-container
2931
# need a new version of manylinux to build crates on arm64-linux
3032
container: ghcr.io/rust-cross/manylinux_2_28-cross:aarch64
@@ -41,7 +43,8 @@ jobs:
4143
cargo_args: -p baml-typescript-ffi -p baml-python-ffi
4244

4345
- target: x86_64-unknown-linux-gnu
44-
host: ubuntu-latest
46+
# Do not use -latest, since it uses a newer glibc version!
47+
host: ubuntu-20.04
4548
node_build: pnpm build:napi-release --target x86_64-unknown-linux-gnu --use-napi-cross
4649

4750
- target: x86_64-unknown-linux-musl
@@ -73,9 +76,17 @@ jobs:
7376
name: ${{ matrix._.target }}
7477
runs-on: ${{ matrix._.host }}
7578
container: ${{ matrix._.container }}
79+
env:
80+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
7681
steps:
7782
- uses: actions/checkout@v4
7883

84+
# Check GLIBC version for Linux targets
85+
- name: Check GLIBC version
86+
if: contains(matrix._.target, 'linux')
87+
run: |
88+
ldd --version
89+
7990
# Install common toolchain dependencies
8091
# NOTE: we can't use mise here because it doesn't support Windows
8192
- uses: pnpm/action-setup@v4
@@ -97,7 +108,8 @@ jobs:
97108
- uses: Swatinem/rust-cache@v2
98109
with:
99110
workspaces: engine
100-
shared-key: engine-${{ github.job }}-${{ matrix._.target }}
111+
prefix-key: engine-${{ github.job }}-${{ matrix._.target }}
112+
# shared-key: engine-${{ github.job }}-${{ matrix._.target }}
101113
cache-on-failure: true
102114

103115
- name: PNPM Install

0 commit comments

Comments
 (0)