Skip to content

ci: fix the native builds - #183

Draft
triniwiz wants to merge 11 commits into
masterfrom
fix/ci-native-builds
Draft

triniwiz wants to merge 11 commits into
masterfrom
fix/ci-native-builds

Conversation

@triniwiz

@triniwiz triniwiz commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

The Canvas Native workflow has failed on every run since v3 (#152). The causes were layered, so fixing one exposed the next:

Job Failure Fix
Canvas / Canvas SVG / AudioContext Android setup-android@v3 runs sdkmanager tools; cmdline-tools 16 has no tools package setup-android@v4
Canvas / Canvas SVG Android The action pointed the Rust build at NDK 29, API 21, overriding the NDK 28.2 / API 23 pin in build-android.sh (Skia's ICU needs posix_madvise) Rust uses NDK 28.2 at API 23; NDK 29 is also installed for the gradle CMake builds
Canvas / Canvas SVG Android bindgen loaded the runner's libclang 15; NDK 28's libc++ needs Clang 16+ LIBCLANG_PATH points at the NDK's own libclang
Canvas / Canvas SVG Android i686 layout assertions fail (100_usize - 104_usize). The rust-skia fork restores the alignment of opaque blobs by matching bindgen's formatted output, and with no rustfmt (minimal profile) bindgen leaves its output unformatted Install the rustfmt component
Canvas SVG Android CMake: canvas's libNativeScript.so stub and V8 headers are missing; only the canvas job prepared them Run download-v8.sh and build-android-v8-stub.sh in the SVG job too
AudioContext Android CMake: third_party/oboe is empty Check out submodules (Oboe)
Canvas iOS, Canvas SVG iOS pre-build.sh: cbindgen: command not found cargo install cbindgen@0.29.0 in setup-apple-native
AudioContext iOS 'opusfile.h' file not found: third_party/build is gitignored and only exists locally Build it with build_opus_deps_ios.sh, cached on that script and the fetch script
Canvas Windows (x64) device-lost.test.mjs passes, then its process exits with 2170 (0x87A, FACILITY_DXGI), even with every RemoveDevice skipped The file skips when GITHUB_ACTIONS is set. Root cause still open, see below.

Still open: device-lost.test.mjs on the runners

The runner adapter is "Microsoft Basic Render Driver" (WARP), and the 2170 exit happens with no device removal, so the cause is something else in that file. Never exercised by any other suite: __setContextLostListener, restoreContext, isContextLost, and a 2D context presented into a headless panel. Also, __d3dAdapterInfo().isWarp is false on that adapter: it is not flagged DXGI_ADAPTER_FLAG_SOFTWARE, so hardware_device() takes it.

The first runs on this branch tried a nightly pin (commit, then revert). It turned out not to be the cause of the i686 failure.

- Android: setup-android@v4 (v3 installs the 'tools' package, gone from
  cmdline-tools 16). The Rust crates build with NDK 28.2 at API 23, as
  build-android.sh pins (Skia's ICU and posix_madvise); NDK 29 is still
  installed for the gradle CMake builds.
- Canvas / SVG iOS: install cbindgen 0.29.0; the Xcode pre-build phases
  regenerate the C headers with it.
- AudioContext iOS: build the gitignored ogg/vorbis/opus/opusfile libs
  (cached on their scripts) before the framework.
- Windows: skip the device-removal tests on WARP. There the process exits
  with 2170 (FACILITY_DXGI) once they pass.
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7f48a69a-df2d-4511-baba-8dc9592c22b5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread .github/workflows/build-native.yml Fixed
…isWarp

Their adapter is not flagged software, so isWarp is false there.
The latest nightly (1.101, 2026-10-08) lays out i686-android structs unlike
the bindgen output skia-bindings checks them against. Pin nightly-2026-01-25,
the toolchain the shipped libraries are built with. The Makefile and the
Android / SVG build scripts take it from CANVAS_RUST_TOOLCHAIN, as
canvas-ios/pre-build.sh already did.
…tHub runners

skia-bindings restores the 8-byte alignment of i686 opaque blobs by
matching bindgen's formatted output, and bindgen leaves its output
unformatted without rustfmt (the minimal profile has none): the layout
assertions then fail on i686-linux-android.

device-lost.test.mjs still exits with 2170 with its removals skipped, so
skip the whole file on the runners.
…stub

canvassvg's CMake links canvas's build-time libNativeScript.so and
includes its V8 headers, which only the canvas job prepared.
Comment thread .github/workflows/build-native.yml Fixed
@github-actions

Copy link
Copy Markdown

ℹ️ Note: npm publishing is disabled for pull requests.
Publishing is performed only from tag pushes via the npm Release workflow.
If you need a test publish, merge to master — pushes publish pr-tagged prereleases.

1 similar comment
@github-actions

Copy link
Copy Markdown

ℹ️ Note: npm publishing is disabled for pull requests.
Publishing is performed only from tag pushes via the npm Release workflow.
If you need a test publish, merge to master — pushes publish pr-tagged prereleases.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Comment thread .github/workflows/build-native.yml Fixed
…caching of untrusted files'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Comment on lines +250 to +257
with:
path: packages/audio-context/src-native/ios/AudioContextNative/AudioContextNative/third_party/build
key: ${{ env.NATIVE_CACHE_VERSION }}-audio-context-opus-deps-${{ hashFiles('packages/audio-context/src-native/ios/AudioContextNative/AudioContextNative/scripts/fetch_opus_deps.sh', 'packages/audio-context/src-native/ios/AudioContextNative/AudioContextNative/scripts/build_opus_deps_ios.sh') }}
- name: Build opus deps
if: steps.audio-xcframework.outputs.cache-hit != 'true' && steps.opus-deps.outputs.cache-hit != 'true'
working-directory: packages/audio-context/src-native/ios/AudioContextNative/AudioContextNative
run: |
# opusfile's configure finds the ogg and opus it builds against through pkg-config
@github-actions

Copy link
Copy Markdown

ℹ️ Note: npm publishing is disabled for pull requests.
Publishing is performed only from tag pushes via the npm Release workflow.
If you need a test publish, merge to master — pushes publish pr-tagged prereleases.

1 similar comment
@github-actions

Copy link
Copy Markdown

ℹ️ Note: npm publishing is disabled for pull requests.
Publishing is performed only from tag pushes via the npm Release workflow.
If you need a test publish, merge to master — pushes publish pr-tagged prereleases.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants