Skip to content

Commit 3859556

Browse files
sa-bucclaude
andcommitted
Fix Open Codex Linux release builds.
Reuse the musl rusty_v8 artifact override setup so fork Linux builds do not try to download missing denoland rusty_v8 archives. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 6b1b9df commit 3859556

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/open-codex-release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,47 @@ jobs:
120120
env:
121121
TARGET: ${{ matrix.target }}
122122
run: bash "${GITHUB_WORKSPACE}/.github/scripts/install-musl-build-tools.sh"
123+
- name: Configure rustc UBSan wrapper
124+
shell: bash
125+
run: |
126+
set -euo pipefail
127+
ubsan=""
128+
if command -v ldconfig >/dev/null 2>&1; then
129+
ubsan="$(ldconfig -p | grep -m1 'libubsan\.so\.1' | sed -E 's/.*=> (.*)$/\1/')"
130+
fi
131+
wrapper_root="${RUNNER_TEMP:-/tmp}"
132+
wrapper="${wrapper_root}/rustc-ubsan-wrapper"
133+
cat > "${wrapper}" <<EOF
134+
#!/usr/bin/env bash
135+
set -euo pipefail
136+
if [[ -n "${ubsan}" ]]; then
137+
export LD_PRELOAD="${ubsan}\${LD_PRELOAD:+:\${LD_PRELOAD}}"
138+
fi
139+
exec "\$1" "\${@:2}"
140+
EOF
141+
chmod +x "${wrapper}"
142+
echo "RUSTC_WRAPPER=${wrapper}" >> "$GITHUB_ENV"
143+
echo "RUSTC_WORKSPACE_WRAPPER=" >> "$GITHUB_ENV"
144+
- name: Clear sanitizer flags
145+
shell: bash
146+
run: |
147+
set -euo pipefail
148+
echo "AWS_LC_SYS_NO_JITTER_ENTROPY=1" >> "$GITHUB_ENV"
149+
target_no_jitter="AWS_LC_SYS_NO_JITTER_ENTROPY_${{ matrix.target }}"
150+
target_no_jitter="${target_no_jitter//-/_}"
151+
echo "${target_no_jitter}=1" >> "$GITHUB_ENV"
152+
echo "RUSTFLAGS=" >> "$GITHUB_ENV"
153+
echo "CARGO_ENCODED_RUSTFLAGS=" >> "$GITHUB_ENV"
154+
echo "RUSTDOCFLAGS=" >> "$GITHUB_ENV"
155+
echo "CARGO_BUILD_RUSTFLAGS=" >> "$GITHUB_ENV"
156+
echo "CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS=" >> "$GITHUB_ENV"
157+
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS=" >> "$GITHUB_ENV"
158+
echo "CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS=" >> "$GITHUB_ENV"
159+
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS=" >> "$GITHUB_ENV"
160+
- name: Configure musl rusty_v8 artifact overrides and verify checksums
161+
uses: ./.github/actions/setup-rusty-v8-musl
162+
with:
163+
target: ${{ matrix.target }}
123164
- name: Build codex
124165
run: cargo build --target ${{ matrix.target }} --release --bin codex
125166
- name: Stage native vendor payload

0 commit comments

Comments
 (0)