Skip to content

feat: combined multi-architecture support (amd64 + arm64) - #218

Open
anchapin wants to merge 2 commits into
developfrom
multi-arch-combined
Open

feat: combined multi-architecture support (amd64 + arm64)#218
anchapin wants to merge 2 commits into
developfrom
multi-arch-combined

Conversation

@anchapin

@anchapin anchapin commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Combined implementation of multi-architecture Docker support (linux/amd64 + linux/arm64), consolidating the beneficial aspects of PR #213 (rh0dium, feature/multi-arch-support) and PR #217 (anchapin, arm-image) into a single, verified PR targeting develop.

Why combine

Both PRs address the same feature (multi-arch images, originally requested in #85) and were built against identical baselines, but use conflicting deployment strategies:

PR #213 PR #217
Strategy Single docker buildx build --push --platform=linux/amd64,linux/arm64 Native per-arch matrix (ubuntu-24.04 + ubuntu-24.04-arm) → push arch-suffixed images → buildx imagetools create
arm64 source S3 (...-arm64.deb) GitHub release assets

Verified finding: the S3 bucket openstudio-ci-builds does not publish arm64 builds (...-arm64.deb returns HTTP 404), so PR #213's arm64 builds cannot succeed. PR #217's GitHub-release approach works — NatLabRockies/OpenStudio is the canonical repo (NREL redirects to it) and publishes both arches for stable releases. Additionally, PR #213's QEMU-emulation approach is impractical here: the image compiles Ruby 3.2.2 from source and downloads a ~1 GB .deb (emulation would take hours).

What this PR does

Adopts PR #217's native matrix architecture and folds in the useful pieces of PR #213:

  • Dockerfile: TARGETARCH selects the correct .deb — S3 for amd64 (-x86_64), GitHub release assets for arm64 (with 10-char SHA).
  • Workflow (docker-openstudio.yml):
    • setup job resolves per-arch download URLs (GitHub releases for stable versions, S3 for pre-releases).
    • docker job runs a native matrix (amd64 on ubuntu-24.04, arm64 on ubuntu-24.04-arm), builds, tests, and pushes *-amd64/*-arm64 images. Radiance rtrace test is skipped on arm64 (packaged binary not executable there).
    • docker-manifest job merges arch images into canonical tags via docker buildx imagetools create, with explicit docker/setup-buildx-action@v3 (from PR Add multi-architecture support (amd64 + arm64) #213).
    • Pre-flight curl check fails fast with a clear message when an artifact is unavailable (e.g. arm64 pre-releases only publish x86_64).
  • get_image_tags.sh: shared tag logic consumed by both deploy_docker.sh and merge_manifests.sh (DRY, no drift).
  • deploy_docker.sh: rewritten to push arch-suffixed images (canonical tags assembled later by the manifest job so parallel arch pushes never clobber).
  • merge_manifests.sh: new — merges arch-suffixed images into canonical multi-arch manifests.

Deliberate changes vs the source PRs

Testing

  • All shell scripts pass bash -n and shellcheck.
  • Tag resolution logic verified for: master/develop branches, manual version tags (3.11.0-rc3), manual dev tags, and PR events (skip, exit 0).
  • Stable URL resolution for 3.11.0 final verified live (both amd64 and arm64 assets return HTTP 200).
  • Pre-release edge case verified: amd64 URL resolves, arm64 pre-flight fails with a clear message.

Note: the arm64 CI leg uses the GitHub-hosted ARM runner (ubuntu-24.04-arm). The apptainer job now waits on docker-manifest so it pulls the canonical multi-arch tag.

…x builds

Combines the best aspects of PR #213 and PR #217 into one coherent
implementation. Uses PR #217's native per-arch matrix strategy (amd64 on
ubuntu-24.04, arm64 on ubuntu-24.04-arm) so both images are built and
tested natively (no QEMU emulation), then merged into canonical multi-arch
manifests by a separate manifest job.

Architecture:
- Dockerfile: TARGETARCH selects the correct OpenStudio .deb (S3 for
  amd64/x86_64, GitHub release assets for arm64; verified S3 does not
  publish arm64 builds).
- Workflow: setup job resolves per-arch download URLs; docker job builds
  + tests + pushes arch-suffixed images (Radiance rtrace skipped on arm64
  since the packaged binary is not executable there); docker-manifest job
  merges arch images into canonical tags via docker buildx imagetools.
- deploy_docker.sh / merge_manifests.sh share tag logic via
  get_image_tags.sh (DRY, no drift between push and merge).
- Pre-flight curl check fails fast with a clear message when an artifact
  is unavailable (e.g. arm64 for pre-releases, which only publish x86_64).

Default OpenStudio bumped from 3.11.0-rc1 to 3.11.0 final (241b8abb4d),
which is the first version with both amd64 and arm64 Ubuntu-24.04 assets
on GitHub releases (the rc1 only exists on S3 as x86_64).

Also incorporates PR #213's Docker Buildx setup (docker/setup-buildx-action)
in the manifest job and its Ubuntu-24.04/manual-tag updates (already present
in the baseline via PRs #214/#215).
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.

1 participant