Repository navigation
ci: fix the native builds - #183
Conversation
- 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.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
…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.
This reverts commit e4899d0.
…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.
|
ℹ️ Note: npm publishing is disabled for pull requests. |
1 similar comment
|
ℹ️ Note: npm publishing is disabled for pull requests. |
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…caching of untrusted files' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
|
ℹ️ Note: npm publishing is disabled for pull requests. |
1 similar comment
|
ℹ️ Note: npm publishing is disabled for pull requests. |
…caching of untrusted files' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
|
ℹ️ Note: npm publishing is disabled for pull requests. |
- Linux x64 and arm64 build every package's .node with tools/scripts/build-linux.sh on Ubuntu 22.04 runners (glibc 2.35, GTK 4.6, clang 18), then run the canvas, canvas-svg and audio-context Node-API tests on Mesa. - canvas-gamepad's Windows modules join the napi-windows matrix. - Every job checks out inputs.ref. On manual runs the Windows jobs built the default branch and Canvas SVG Android built github.ref, whatever ref was asked for. - Artifact caches are restored only when no ref is given and the run is not manual. - tools/scripts/place-native-artifacts.sh puts a download of every artifact in the tree and fails if one is missing.
npm Release calls build-native.yml on the release tag, with no cache, and places its artifacts over the committed ones before packaging. Only the AARs with no sources in this repo (canvas-media, canvas-gamepad, canvas-polyfill) still ship as committed.
Re-applies e4899d0 (reverted in 57f9567), now so the Skia cache stays valid: a cached build is only reusable with the compiler that made it, and an unpinned nightly changes daily. nightly-2026-01-25 is the toolchain the shipped libraries are built with. Local builds still default to `nightly` through CANVAS_RUST_TOOLCHAIN.
…s-gamepad - .github/actions/skia-cache keeps the Skia libraries skia-bindings builds, per target and feature set, in rust-skia's prebuilt-binaries format. With an exact hit skia-bindings installs them instead of building Skia. A cargo shim files each build's export under its rust-skia key. Saved only by pushes to master. - build-native.yml has no ref input: every job builds the commit that triggered the run. npm Release is dispatched on the release tag, so its runs restore master's caches but save only into the tag's scope. A ref checked out from master's scope could have rewritten what master restores (CodeQL: cache poisoning). - The cache guards for manual and explicit-ref runs are gone with that input. - The unit-test target cache (~1.8 GB an entry) is saved only by master. - canvas-gamepad is published by npm Release and the master prerelease.
canvas_gamepad.aar, canvas_media.aar and canvas_polyfill.aar are what the CLI builds from each plugin's platforms/android sources during an app build. They are now gitignored.
…revert before merge
…treamer's libunwind-dev
…ot ~/.cargo/bin's
…on Linux until the statechange race is fixed
|
ℹ️ Note: npm publishing is disabled for pull requests. |
…aster Each pull request saved three ~1.3 GB registry caches, enough to evict master's Skia entries from the 10 GB budget. No Cargo.lock is committed, so the key hashes the manifests instead of the empty hash it had.
…stores; revert before merge" This reverts commit 5747708.
They pin the NDK, the toolchains and clang that a cached Skia was built with. Hashing all of .github/actions meant any edit there, even to this action, threw away every entry.
|
ℹ️ Note: npm publishing is disabled for pull requests. |
1 similar comment
|
ℹ️ Note: npm publishing is disabled for pull requests. |
The Canvas Native workflow has failed on every run since v3 (#152). The causes were layered, so fixing one exposed the next:
setup-android@v3runssdkmanager tools; cmdline-tools 16 has notoolspackagesetup-android@v4build-android.sh(Skia's ICU needsposix_madvise)LIBCLANG_PATHpoints at the NDK's own libclang100_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 unformattedrustfmtcomponentlibNativeScript.sostub and V8 headers are missing; only the canvas job prepared themdownload-v8.shandbuild-android-v8-stub.shin the SVG job toothird_party/oboeis emptypre-build.sh: cbindgen: command not foundcargo install [email protected]insetup-apple-native'opusfile.h' file not found:third_party/buildis gitignored and only exists locallybuild_opus_deps_ios.sh, cached on that script and the fetch scriptdevice-lost.test.mjspasses, then its process exits with 2170 (0x87A, FACILITY_DXGI), even with everyRemoveDeviceskippedGITHUB_ACTIONSis 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().isWarpisfalseon that adapter: it is not flaggedDXGI_ADAPTER_FLAG_SOFTWARE, sohardware_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.