Skip to content

Commit 486a831

Browse files
committed
ci: fetch the prebuilt V8 and build against NDK r29
CI invokes gradle directly rather than build.sh, so nothing installed the V8 libraries and every ABI failed with "libv8_monolith.a ... missing and no known rule to make it". Both workflows now run ./download_v8.sh before the first gradle invocation. NDK_VERSION also moves r27d -> r29. V8 14.9 uses std::atomic_ref, which r27d's libc++ 18 does not implement, and the runtime compiles that header because v8_inspector vendors V8 internals. download_v8.sh picks sha256sum or shasum depending on what the host has; it was written on macOS, where only the latter exists.
1 parent f66acac commit 486a831

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/npm_release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
env:
1616
NPM_TAG: "next"
1717
EMULATOR_NAME: "runtime-emu"
18-
NDK_VERSION: r27d
18+
NDK_VERSION: r29
1919
ANDROID_API: 33
2020
ANDROID_ABI: x86_64
2121
NDK_ARCH: linux
@@ -93,6 +93,8 @@ jobs:
9393
NPM_TAG=$(node ./scripts/get-npm-tag.js)
9494
echo NPM_VERSION=$NPM_VERSION >> $GITHUB_OUTPUT
9595
echo NPM_TAG=$NPM_TAG >> $GITHUB_OUTPUT
96+
- name: Fetch prebuilt V8
97+
run: ./download_v8.sh
9698
- name: Build npm package
9799
run: ./gradlew -PgitCommitVersion=${{ github.sha }} -PnoCCache --stacktrace
98100
- name: Upload npm package artifact
@@ -144,6 +146,8 @@ jobs:
144146
run: |
145147
npm install
146148
npm install --prefix ./test-app/tools
149+
- name: Fetch prebuilt V8
150+
run: ./download_v8.sh
147151
- name: SBG tests
148152
run: ./gradlew runSbgTests --stacktrace
149153
- name: Enable KVM

.github/workflows/pull_request.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
env:
66
NPM_TAG: "pr"
77
EMULATOR_NAME: "runtime-emu"
8-
NDK_VERSION: r27d
8+
NDK_VERSION: r29
99
ANDROID_API: 33
1010
ANDROID_ABI: x86_64
1111
NDK_ARCH: linux
@@ -67,6 +67,8 @@ jobs:
6767
NPM_TAG=$(node ./scripts/get-npm-tag.js)
6868
echo NPM_VERSION=$NPM_VERSION >> $GITHUB_OUTPUT
6969
echo NPM_TAG=$NPM_TAG >> $GITHUB_OUTPUT
70+
- name: Fetch prebuilt V8
71+
run: ./download_v8.sh
7072
- name: Build npm package
7173
run: ./gradlew -PgitCommitVersion=${{ github.sha }} -PnoCCache --stacktrace
7274
- name: Upload npm package artifact
@@ -112,6 +114,8 @@ jobs:
112114
run: |
113115
npm install
114116
npm install --prefix ./test-app/tools
117+
- name: Fetch prebuilt V8
118+
run: ./download_v8.sh
115119
- name: SBG tests
116120
run: ./gradlew runSbgTests --stacktrace
117121
- name: Enable KVM

download_v8.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,15 @@ done
100100

101101
# Verify before unpacking anything. A release is only trustworthy because the
102102
# archive matches the checksum published with it.
103+
#
104+
# Linux has sha256sum, macOS has shasum; neither has both reliably.
105+
if command -v sha256sum > /dev/null 2>&1; then
106+
SHA256_CHECK="sha256sum -c -"
107+
else
108+
SHA256_CHECK="shasum -a 256 -c -"
109+
fi
103110
echo "Verifying checksums"
104-
( cd "$DL" && grep -E "$(printf '%s|' "${ASSETS[@]}" | sed 's/|$//')" SHA256SUMS | shasum -a 256 -c - ) \
111+
( cd "$DL" && grep -E "$(printf '%s|' "${ASSETS[@]}" | sed 's/|$//')" SHA256SUMS | $SHA256_CHECK ) \
105112
|| { echo "Checksum verification FAILED for $RELEASE" >&2; exit 1; }
106113

107114
STAGE="$(mktemp -d)"

0 commit comments

Comments
 (0)