Skip to content

Commit d98a5e0

Browse files
committed
ci: build release on ubuntu 20.04 for glibc 2.31 compatibility
1 parent a3f38ed commit d98a5e0

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
jobs:
1212
build-and-publish:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-20.04
1414

1515
steps:
1616
- name: Checkout
@@ -86,6 +86,33 @@ jobs:
8686
- name: Build DEB and AppImage
8787
run: npm run build:linux
8888

89+
- name: Verify better-sqlite3 GLIBC compatibility (Ubuntu 20.04 baseline)
90+
run: |
91+
set -euo pipefail
92+
BASELINE_GLIBC="2.31"
93+
NODE_FILE="$(find dist/linux-unpacked -type f -name better_sqlite3.node | head -n 1 || true)"
94+
if [[ -z "${NODE_FILE}" ]]; then
95+
echo "Could not locate better_sqlite3.node in dist/linux-unpacked." >&2
96+
exit 1
97+
fi
98+
echo "Inspecting: ${NODE_FILE}"
99+
MAX_GLIBC="$(
100+
strings "${NODE_FILE}" \
101+
| grep -oE 'GLIBC_[0-9]+\.[0-9]+' \
102+
| sed 's/^GLIBC_//' \
103+
| sort -V \
104+
| tail -n 1
105+
)"
106+
if [[ -z "${MAX_GLIBC}" ]]; then
107+
echo "No GLIBC symbol version found in ${NODE_FILE}." >&2
108+
exit 1
109+
fi
110+
echo "Detected max GLIBC requirement: ${MAX_GLIBC}"
111+
if dpkg --compare-versions "${MAX_GLIBC}" gt "${BASELINE_GLIBC}"; then
112+
echo "better_sqlite3.node requires GLIBC_${MAX_GLIBC}, exceeds baseline GLIBC_${BASELINE_GLIBC}." >&2
113+
exit 1
114+
fi
115+
89116
- name: Verify packaged CLI binary
90117
run: |
91118
test -x dist/linux-unpacked/resources/codex

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ That new tag triggers the release workflow, which publishes new `.deb`, `.AppIma
100100

101101
- Packaging targets: **DEB** and **AppImage** only
102102
- Linux native module rebuild (`better-sqlite3`, `node-pty`)
103+
- Release CI builds on Ubuntu 20.04 baseline (glibc 2.31) for wider compatibility
103104
- Auto-upload release artifacts (`.deb`, `.AppImage`) to GitHub Releases
104105
- Optional APT repo publish on release tag
105106

0 commit comments

Comments
 (0)