Skip to content

Commit 32b2f2d

Browse files
committed
Strip Linux npm binaries before packaging
1 parent 5a4d587 commit 32b2f2d

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/rust-release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,26 @@ jobs:
405405
cp "${artifacts_root}/codex-bin-x86_64-pc-windows-msvc/codex-command-runner.exe" \
406406
"${vendor_root}/x86_64-pc-windows-msvc/codex/codex-command-runner.exe"
407407
408+
- name: Strip Linux binaries for npm packaging
409+
shell: bash
410+
run: |
411+
set -euo pipefail
412+
vendor_root="${RUNNER_TEMP}/npm-root/vendor"
413+
linux_targets=(
414+
x86_64-unknown-linux-musl
415+
aarch64-unknown-linux-musl
416+
)
417+
418+
for target in "${linux_targets[@]}"; do
419+
binary_path="${vendor_root}/${target}/codex/codex"
420+
if [[ ! -f "${binary_path}" ]]; then
421+
echo "Missing Linux binary for npm packaging: ${binary_path}"
422+
exit 1
423+
fi
424+
425+
strip --strip-debug --strip-unneeded "${binary_path}"
426+
done
427+
408428
- uses: facebook/install-dotslash@v2
409429

410430
- name: Install ripgrep payloads

0 commit comments

Comments
 (0)