Skip to content

ci(docker): build and publish native multi-platform qgc-dev - #15133

Draft
mrpollo wants to merge 11 commits into
masterfrom
ci/container-analysis-toolchain
Draft

mrpollo wants to merge 11 commits into
masterfrom
ci/container-analysis-toolchain

Conversation

@mrpollo

@mrpollo mrpollo commented Sep 15, 2026

Copy link
Copy Markdown
Member

Summary

Rename the existing development container to qgc-dev and preinstall the configured Qt, LLVM/clang-tidy, matching Clazy, ccache, Python development tools, and GitHub CLI. Docker Buildx Bake builds one image for both linux/amd64 and linux/arm64.

Publication

Publish ghcr.io/mavlink/qgc-dev:

  • latest: only when container inputs change on upstream master.
  • Stable QGC release tags, including v: built from the released commit, without updating latest. The release workflow calls the publisher explicitly.
  • PRs and manual workflow runs: build without publishing.

Builds use native on-demand RunsOn runners and RunsOn S3 Magic Cache through GHA v2. Each published tag includes both architectures, and the image digest is recorded for pinning.

Scope and build status

Container-only: no analyzer adoption, application-builder changes, Docker Hub changes, or PX4 firmware tools. This draft PR does not publish an image.

QGC successfully builds inside the container on both Apple Silicon (locally, using all 14 available cores) and Intel/AMD (in CI). Both produce a Linux application. The container jobs and CI script tests pass; other platform builds are separate.

@github-actions github-actions Bot added Platform: Linux Docs github_actions Pull requests that update GitHub Actions code Tools Tests size/S labels Sep 15, 2026
@mrpollo mrpollo changed the title ci(docker): align development image with analysis toolchain ci(docker): add independently versioned analysis image Sep 15, 2026
@github-actions github-actions Bot added size/M and removed size/S labels Sep 15, 2026
@mrpollo mrpollo changed the title ci(docker): add independently versioned analysis image ci(docker): publish the existing QGC development container Sep 15, 2026
@mrpollo mrpollo changed the title ci(docker): publish the existing QGC development container ci(docker): publish the default QGC development container Sep 15, 2026
Rename the existing devcontainer and build both native platforms through Bake. Publish one OCI index for meaningful master inputs and exact stable QGC releases, preserving application builders and read-only PR validation. Bake the locked developer tools and verify native Qt, LLVM and Clazy before promotion.
@mrpollo mrpollo changed the title ci(docker): publish the default QGC development container ci(docker): prebuild the existing QGC development container Sep 15, 2026

@mrpollo mrpollo left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Is this image really cross arch??

Comment thread .github/workflows/devcontainer.yml Outdated
egress-policy: audit

- name: Enable RunsOn magic cache
if: github.repository_owner == 'mavlink'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Useless stop trying to make this happen; the package itself already handles this internally

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed the owner conditional. The shared qgc-dev action now initializes runs-on/action unconditionally before Buildx, including on hosted fallbacks. Updated in 1b85790.

Comment thread .github/workflows/devcontainer.yml Outdated
EVENT_NAME: ${{ github.event_name }}
RELEASE_TAG: ${{ github.event.release.tag_name || inputs.release_tag }}
run: |
publish=false

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This logic is absurdly complicated and maybe better handled elsewhere in a programming language that simplifies most of it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Moved publication planning, release/source validation, smoke orchestration, and index promotion into .github/scripts/qgc_dev.py. The workflow now orchestrates native Bake jobs rather than embedding the publication shell logic. Bake explicitly uses the checked-out release source. Updated in 1b85790.

Comment thread .github/workflows/devcontainer.yml Outdated
uses: docker/metadata-action@v6
with:
context: git
images: ghcr.io/mavlink/qgroundcontrol-dev

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Didn't we decide on qgc-dev as the image name?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Renamed the existing development container consistently to qgc-dev: Docker target, Bake target, local qgc-dev:local tag, VS Code identity, and published ghcr.io/mavlink/qgc-dev package. No separate analysis image or architecture-specific public image names. Updated in 1b85790.

Comment thread .github/workflows/devcontainer.yml Outdated
provenance: false
sbom: false
cache-from: type=gha,version=2,scope=qgc-docker-devcontainer-devcontainer
cache-to: ${{ github.event_name != 'pull_request' && 'type=gha,version=2,scope=qgc-docker-devcontainer-devcontainer,mode=max' || '' }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This conditional is not needed the logic will work well with GitHub actions default cache

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed the PR conditional from cache export. Both cache-from and cache-to use GHA v2 with native-platform scopes, backed by RunsOn Magic Cache. Registry image publication remains disabled for PRs and ordinary manual builds. Updated in 1b85790.


## Development Container

QGC has one default development container: the `devcontainer` target in

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I thought we renamed this to qgc-dev??

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated the documentation and build commands to the qgc-dev Docker/Bake target and qgc-dev:local image. The published image is ghcr.io/mavlink/qgc-dev, with one tag serving both native architectures. Updated in 1b85790.

Use the selected release checkout for Bake, isolate manual concurrency, and preserve checkout write access for non-root acceptance builds. Apply requested RunsOn cache behavior and include the devcontainer definition in CI script test checkouts.
Retain the approved canonical qgc-dev implementation while preserving the previously published PR history.

* commit 'bdd8a47120407fd018705380fa568a2d093c978a':
  ci(docker): reuse the existing GHCR package for development tags
  test(ci): enforce the default devcontainer RunsOn routing contract
  ci(docker): rebuild development image only for its inputs
  ci(docker): publish default devcontainer for master and stable releases
@github-actions github-actions Bot added size/L and removed size/M labels Sep 15, 2026
@mrpollo mrpollo changed the title ci(docker): prebuild the existing QGC development container ci(docker): build and publish native multi-platform qgc-dev Sep 15, 2026
@mrpollo

mrpollo commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

Cross-architecture support is now confirmed: QGC builds successfully inside the container on Apple Silicon locally and on Intel/AMD in CI. Both produce a Linux application.

The same Bake target installs the matching dependencies for linux/amd64 and linux/arm64. Once published, one ghcr.io/mavlink/qgc-dev tag will work on both architectures. No image is published from this draft PR.

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

Labels

Docs github_actions Pull requests that update GitHub Actions code Platform: Linux size/L Tests Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant