feat: combined multi-architecture support (amd64 + arm64) - #218
Open
anchapin wants to merge 2 commits into
Open
Conversation
…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).
… and correct boolean default
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 targetingdevelop.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:
docker buildx build --push --platform=linux/amd64,linux/arm64ubuntu-24.04+ubuntu-24.04-arm) → push arch-suffixed images →buildx imagetools create...-arm64.deb)Verified finding: the S3 bucket
openstudio-ci-buildsdoes not publish arm64 builds (...-arm64.debreturns HTTP 404), so PR #213's arm64 builds cannot succeed. PR #217's GitHub-release approach works —NatLabRockies/OpenStudiois 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:
TARGETARCHselects the correct.deb— S3 for amd64 (-x86_64), GitHub release assets for arm64 (with 10-char SHA).docker-openstudio.yml):setupjob resolves per-arch download URLs (GitHub releases for stable versions, S3 for pre-releases).dockerjob runs a native matrix (amd64 onubuntu-24.04, arm64 onubuntu-24.04-arm), builds, tests, and pushes*-amd64/*-arm64images. Radiancertracetest is skipped on arm64 (packaged binary not executable there).docker-manifestjob merges arch images into canonical tags viadocker buildx imagetools create, with explicitdocker/setup-buildx-action@v3(from PR Add multi-architecture support (amd64 + arm64) #213).get_image_tags.sh: shared tag logic consumed by bothdeploy_docker.shandmerge_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
241b8abb4d) instead of PR Add multi-architecture support for OpenStudio Docker images #217's revert to 3.10.0 and instead of the current rc1 default. 3.11.0 final is the first version with both amd64 and arm64Ubuntu-24.04assets on GitHub releases (verified: both URLs return 200). The rc1 only exists on S3 as x86_64.inputs.docker_manual_image_tagenv references (no such input exists in this workflow) and madeget_image_tags.shrobust to an unsetDOCKER_MANUAL_IMAGE_TAGunderset -u.manual_installer_test.ymlUbuntu-24.04 + tag-description updates were already merged into the baseline via PRs feat: add workflow_dispatch for on-demand .sif builds and update to ubuntu-24.04 #214/feat: merge workflow_dispatch trigger to develop branch #215 — no change needed.Testing
bash -nandshellcheck.3.11.0-rc3), manual dev tags, and PR events (skip, exit 0).Note: the arm64 CI leg uses the GitHub-hosted ARM runner (
ubuntu-24.04-arm). Theapptainerjob now waits ondocker-manifestso it pulls the canonical multi-arch tag.