Skip to content

Workflow arduino ci

github-actions[bot] edited this page Nov 3, 2026 · 4 revisions

arduino-ci

What it does. CI for firmware built with arduino-cli: arduino-cli at a pinned version and sha256, cores and libraries pinned by the caller, every sketch compiled for a board with the binaries kept as an artifact, optional host-side tests, the workflow lint and the CI green gate. Holds no token.

Why it exists. A firmware repository (the first consumer is an ESP32 sensor node) had no CI that could be trusted to build next year what it builds today. Naming cores and libraries with versions makes the build the same build later. The binaries reach a release through artifact-release, which signs and attests them, using the same compile as its build command.

Jobs and trust boundaries

compile, test (host-side), workflow-lint and ci-green, each with contents: read and nothing more. arduino-cli verifies each downloaded package against its index checksum before installing it, and the workflow caches the download staging directory keyed on the arduino-cli version and a hash of cores, additional-urls and libraries.

A minimal caller

jobs:
  firmware:
    uses: ChiefGyk3D/git-your-ship-together/.github/workflows/arduino-ci.yml@<sha> # vX.Y.Z
    permissions:
      contents: read
    with:
      sketches: nodes/esp32/skidfinder_node
      fqbn: esp32:esp32:esp32
      cores: esp32:esp32@3.3.12
      additional-urls: https://espressif.github.io/arduino-esp32/package_esp32_index.json
      egress-policy: block
      extra-allowed-endpoints: espressif.github.io:443 dl.espressif.com:443

A core from another index adds its hosts to extra-allowed-endpoints; the ESP32 core's hosts were added on the first block-mode run, which is how a new index announces itself.

Inputs (17), read from arduino-ci.yml:

Input Type Default Meaning
sketches string . Space-separated sketch directories, each holding a .ino named after it.
fqbn string arduino:avr:uno Fully qualified board name to compile for, e.g. arduino:avr:uno or esp32:esp32:esp32.
cores string arduino:avr@1.8.8 Space-separated cores to install, versioned, e.g. arduino:avr@1.8.8 or esp32:esp32@3.3.12.
additional-urls string empty Space-separated board manager URLs for cores outside Arduino's index, e.g. Espressif's package_esp32_index.json.
libraries string empty Space-separated libraries to install from the library manager, versioned, e.g. ArduinoJson@7.4.2.
warnings string all arduino-cli compile warning level - none, default, more or all.
arduino-cli-version string 1.5.1 arduino-cli release to download (arduino/arduino-cli), without the v.
arduino-cli-sha256 string 28a8e119c498a25607821c36cb2dc49e8463941b261a0d99091baa7bc692dd2b SHA-256 of the arduino-cli Linux_64bit tarball for that version.
test-install-command string empty Shell run before the host-side tests; empty installs nothing.
test-command string empty The host-side unit tests, e.g. pytest tests/host; empty skips the job.
workflow-lint boolean true Run actionlint and zizmor over the caller's own workflow files. Turn off on one caller job when another already runs it.
zizmor-persona string regular zizmor strictness - regular, pedantic or auditor.
egress-policy string audit harden-runner egress policy for every job - audit logs outbound connections, block allows only allowed-endpoints. Jobs that hold no secret follow egress-policy-secretless instead (EX-0001).
egress-policy-secretless string block harden-runner egress policy for the jobs that hold no stored secret, no OIDC token and no write-scoped or publish-capable token (read-only contents, a SARIF upload at most), and whose output no privileged job consumes - exactly audit or block. Defaults to block since security exception EX-0001 (GitHub-hosted runners in westus2 broke harden-runner block) was closed on 2026-11-02 after harden-runner v2.22.3 passed on westus2; see docs/security/exceptions/. Every job still has the default read-only job token. Set audit to opt out if the defect recurs. Any other job follows egress-policy. Any other value fails the job.
allowed-endpoints string api.github.com:443 downloads.arduino.cc:443 files.pythonhosted.org:443 ghcr.io:443 github.com:443 objects.githubusercontent.com:443 pkg-containers.githubusercontent.com:443 pypi.org:443 raw.githubusercontent.com:443 registry.npmjs.org:443 release-assets.githubusercontent.com:443 harden-runner allow-list for block, space-separated host:port entries. The default is arduino-cli's download and Arduino's package index and tools; a core from another index (Espressif's) adds its hosts through extra-allowed-endpoints. Wildcards are not supported and a newline-separated list matches nothing.
extra-allowed-endpoints string empty Appended to allowed-endpoints, for the hosts a core or library index reaches. Same format.
timeout-minutes number 30 Per-job timeout. A first core install is minutes, not seconds.

What it refuses to do

It never holds a token, never flashes hardware, and never compiles against an unversioned core.

Clone this wiki locally