Skip to content

build: container runners for host tests and firmware builds#1496

Open
Mearman wants to merge 5 commits into
coredevices:mainfrom
Mearman:build/container-environment
Open

build: container runners for host tests and firmware builds#1496
Mearman wants to merge 5 commits into
coredevices:mainfrom
Mearman:build/container-environment

Conversation

@Mearman

@Mearman Mearman commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Host tests compile against the host libc, which is different on macOS and the Linux CI container. Tests pass on one and fail on the other because of linker behaviour (-fno-common), libc headers (glibc's vector-math macros), compiler versions, and so on. The CI Docker image (ghcr.io/coredevices/pebbleos-docker:v5) is the canonical environment, but until now you had to manually mount the source and run ad-hoc Docker commands to reproduce it.

ci-test.sh reproduces the test.yml steps inside the Docker image: safe.directory, pip install, waf configure, waf test. Passes through waf arguments so you can scope runs.

build_in_container.sh does the same for the firmware build workflows (build-firmware, build-prf, build-qemu). Validates the board name, appends the right waf targets for QEMU boards, accepts CONFIGURE_EXTRA flags.

.devcontainer/devcontainer.json opens VS Code or Codespaces into the same Docker image so the toolchain matches CI exactly.

CONTRIBUTING.md updated to document the workflow: container runners before pushing, native ./waf for iteration.

Merge order: 1 (independent)

Comment thread CONTRIBUTING.md Outdated
Comment thread scripts/build_in_container.sh Outdated
@Mearman

Mearman commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

thanks for the feedback @gmarull.
will action those now

@Mearman Mearman force-pushed the build/container-environment branch 3 times, most recently from a910289 to e5a79fa Compare June 12, 2026 12:45
Comment thread tools/ci/build_firmware.sh
Comment thread scripts/build_in_container.sh
@Mearman Mearman force-pushed the build/container-environment branch from e5a79fa to 2844956 Compare June 12, 2026 14:19
Comment thread docs/development/testing-locally.md
Mearman and others added 5 commits June 12, 2026 16:51
Co-authored-by: Claude <claude@anthropic.com>
Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
Co-authored-by: Claude <claude@anthropic.com>
Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
Opens VS Code / GitHub Codespaces directly into the same
ghcr.io/coredevices/pebbleos-docker:v5 image used by CI, so the
toolchain and library versions match exactly.

postCreateCommand mirrors the CI job steps: marks the workspace
safe for git, initialises submodules (required for waf to find
third-party sources), then installs Python dependencies via pip.

The image ships a venv at /opt/venv on PATH, so no separate venv
activation is needed.

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
The new testing-locally page was not listed in any toctree, causing
Sphinx to emit an orphan-document warning. With fail_on_warning enabled
in .readthedocs.yaml, this warning promoted to a build failure.

Signed-off-by: Joseph Mearman <joseph@mearman.co.uk>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Mearman Mearman force-pushed the build/container-environment branch from 3edb173 to 5e80f20 Compare June 12, 2026 15:52
Comment thread tools/ci/run_tests.sh
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2026 Core Devices LLC

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping: not us!

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