Skip to content

Commit 8dc2991

Browse files
committed
update: enhance Docker options and add before-script for V8 source builds
1 parent ed0ada6 commit 8dc2991

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ jobs:
2525
rust_target: x86_64-unknown-linux-gnu
2626
container: quay.io/pypa/manylinux_2_28_x86_64:latest
2727
v8_from_source: "1"
28-
extra_gn_args: v8_enable_temporal_support=false
29-
docker_options: -e V8_FROM_SOURCE=1 -e EXTRA_GN_ARGS=v8_enable_temporal_support=false
28+
extra_gn_args: v8_enable_temporal_support=false v8_monolithic_for_shared_library=true
29+
docker_options: >-
30+
-e V8_FROM_SOURCE=1
31+
-e "EXTRA_GN_ARGS=v8_enable_temporal_support=false v8_monolithic_for_shared_library=true"
3032
- runner: ubuntu-24.04-arm
3133
target: aarch64
3234
rust_target: aarch64-unknown-linux-gnu
@@ -48,8 +50,8 @@ jobs:
4850
# third_party/rust/chromium_crates_io/vendor tree needed by the
4951
# Temporal Rust dependency, so source builds avoid those GN targets.
5052
EXTRA_GN_ARGS: ${{ matrix.extra_gn_args }}
51-
# Source builds download Chromium clang into target/<triple>/release.
52-
# Bindgen needs libclang from that toolchain after V8 is built.
53+
# Source builds use Chromium clang under target/<triple>/release.
54+
# Bindgen also needs the separate Chromium libclang package there.
5355
LIBCLANG_PATH: ${{ github.workspace }}/target/${{ matrix.rust_target }}/release/clang/lib
5456
LD_LIBRARY_PATH: ${{ github.workspace }}/target/${{ matrix.rust_target }}/release/clang/lib
5557
with:
@@ -59,6 +61,15 @@ jobs:
5961
manylinux: "2_28"
6062
container: ${{ matrix.container }}
6163
docker-options: ${{ matrix.docker_options }} -e LIBCLANG_PATH=${{ github.workspace }}/target/${{ matrix.rust_target }}/release/clang/lib -e LD_LIBRARY_PATH=${{ github.workspace }}/target/${{ matrix.rust_target }}/release/clang/lib
64+
before-script-linux: |
65+
if [ "${{ matrix.v8_from_source }}" = "1" ]; then
66+
cargo fetch --locked
67+
V8_SRC="$(find /root/.cargo/registry/src -maxdepth 2 -type d -name 'v8-147.4.0' -print -quit)"
68+
CLANG_DIR="${{ github.workspace }}/target/${{ matrix.rust_target }}/release/clang"
69+
python3 "$V8_SRC/tools/clang/scripts/update.py" --output-dir "$CLANG_DIR"
70+
python3 "$V8_SRC/tools/clang/scripts/update.py" --output-dir "$CLANG_DIR" --package libclang
71+
test -n "$(find "$CLANG_DIR/lib" -name 'libclang.so*' -print -quit)"
72+
fi
6273
args: >-
6374
--release
6475
--out dist

0 commit comments

Comments
 (0)