LogoPear Docs

Native-addon CI prebuilds

Reference for the holepunchto/actions GitHub Actions that compile, upload, and merge native Bare-addon prebuilds across platforms in CI.

holepunchto/actions is a collection of reusable composite GitHub Actions. This page covers the ones for authors of native Bare addons who build prebuilt binaries across platforms in CI. Reference one with:

- uses: holepunchto/actions/<name>@v1

See Native addons for writing the addon itself. This page covers only the CI pipeline that builds prebuilt binaries for every platform once the addon exists.

Prebuild pipeline

The typical shape is a build matrix where each job runs compile-prebuilds, then a final job merges the per-platform artifacts.

ActionPurposeKey inputs
compile-prebuildsInstall bare-make, then generate / build / install a native prebuild for one platform + arch, optionally uploading it.platform (required), arch (required), flags, tags, prefix (default prebuilds), upload
upload-prebuildsUpload a compiled prebuild as an artifact named <platform>-<arch><tags>.platform (required), arch (required), tags, prefix
download-prebuildsDownload all prebuild artifacts into one directory (merge-multiple).prefix (default prebuilds)
merge-prebuildsDownload every per-platform prebuild artifact and re-upload them as a single prebuilds artifact.

Project and toolchain setup

These are the building blocks the prebuild actions compose; you can also use them directly.

ActionPurpose
checkoutactions/checkout with persist-credentials: false.
setup-nodeInstall Node.js LTS and configure the npm registry/scope for auth.
node-basecheckout + setup-node + npm install (with allow-git, force-install, registry/scope/auth options).
setup-bareInstall the bare-runtime globally.
bare-basenode-base + setup-bare: configure a Bare project on a runner.
setup-llvm, setup-nasm, setup-swift, swift-baseInstall the compilers and toolchains (LLVM, NASM, Swift) used when compiling native prebuilds and platform-specific code.
setup-socket, setup-mininetInstall supporting tooling: setup-socket configures Socket.dev supply-chain scanning; setup-mininet installs Mininet and Open vSwitch for network-emulation tests.

See also

On this page