Skip to content

Add arm#154

Closed
poshul wants to merge 13 commits into
masterfrom
add_arm
Closed

Add arm#154
poshul wants to merge 13 commits into
masterfrom
add_arm

Conversation

@poshul
Copy link
Copy Markdown
Contributor

@poshul poshul commented Oct 17, 2025

Summary by CodeRabbit

  • Chores
    • Added ARM64 processor architecture support across build and release pipelines.
    • Enabled multi-architecture builds (AMD64 and ARM64) and architecture-aware packaging/tagging for release artifacts.
    • Improved build system detection for platform/architecture to better select build options and toolchains.
    • Updated base images and packaging names for more consistent cross-platform releases.
    • Ignored local editor settings in version control.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 17, 2025

Walkthrough

Adds multi-architecture support to CI and build scripts: deploy-manylinux workflow gains an amd64/arm64 matrix with architecture-specific Dockerfiles and tags; main workflow adds an ARM64 CMake install path; CMake and library helper scripts detect and propagate architecture for Boost and COIN-OR builds; one Docker base image tag updated.

Changes

Cohort / File(s) Summary
GitHub Actions — deploy manylinux
\.github/workflows/deploy-manylinux-docker.yml
Adds matrix for amd64/arm64, conditional runner selection, sets env.dockerfile and platform_tag per architecture, uses those env vars for Docker build/push and tags image with architecture suffix and repo downcasing.
GitHub Actions — main workflow
\.github/workflows/main.yml
Removes ubuntu-22.04-arm from OS list, adds ARM64-specific "Install CMake (Ubuntu arm64)" step, skips generic "Setup cmake" for that matrix entry, and simplifies release artifact naming to omit runner arch.
CMake top-level
CMakeLists.txt
MSVC path: BOOST_ARG now set to address-model=64 only when processor is x86_64/AMD64; otherwise left empty.
Boost helper
libraries.cmake/boost.cmake
Adds architecture detection mapping CMAKE_SYSTEM_PROCESSORBOOST_ARCHITECTURE (x86 → architecture=x86, aarch64 → architecture=arm, warn on unknown) and uses ${BOOST_ARCHITECTURE} in b2 commands instead of a hardcoded value.
COIN-OR helper
libraries.cmake/coinor.cmake
Introduces BUILD_TRIPLET derived from system name and processor, centralizes static/shared selection, passes BUILD_TRIPLET into configure/CMake invocations and logs it on success/failure.
Dockerfile (pyopenms manylinux ARM64)
dockerfiles/pyopenms/manylinux/ARM64_Dockerfile
Changes base image tag from quay.io/pypa/manylinux_2_34_aarch64_main to quay.io/pypa/manylinux_2_34_aarch64.
Misc
.gitignore
Adds .vscode/settings.json to ignore list.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant GH as GitHub Actions (matrix job)
    participant Runner as Runner (ubuntu/arm64 or ubuntu/amd64)
    participant Step as Job steps
    participant Docker as Docker build/push
    Note over GH,Runner #DDEEFF: Matrix expands for amd64 and arm64
    GH->>Runner: spawn job (matrix.arch)
    Runner->>Step: Checkout (actions/checkout@v4)
    Step->>Step: Set architecture-specific env vars\n(env.dockerfile, platform_tag)
    Step->>Docker: Build using ${env.dockerfile} on ${platform_tag}
    Docker->>Docker: Tag image ghcr.io/${repo}/contrib_manylinux_2_34:${tag}-${platform_tag}
    Docker->>GH: Push image
    Note over Docker,GH #E8F5E9: Artifact and tag include platform suffix for distinction
Loading
sequenceDiagram
    autonumber
    participant GH as GitHub Actions (main)
    participant Runner as Runner (matrix.os)
    participant Step as Job steps
    Note over GH,Runner #FFF3E0: Conditional CMake setup for ubuntu-22.04-arm
    GH->>Runner: start job
    Runner->>Step: if matrix.os == 'ubuntu-22.04-arm' -> apt-get install cmake
    alt matrix.os != 'ubuntu-22.04-arm'
        Step->>Step: run existing "Setup cmake" step
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Fix fix #153: Modifies libraries.cmake/boost.cmake and .github/workflows/main.yml, indicating related multi-architecture CI and Boost build changes.

Poem

🐰 Hopping through kernels, big and small,

amd to arm I greet them all.
Dockerfiles set, tags in a line,
Builds detect architecture — works just fine.
A carrot for CI, a hop, a twirl, hooray! 🍂

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Add arm" is directly related to the primary change in the changeset. The modifications across multiple files—including Docker workflows, CMake configurations, CI/CD pipelines, and build scripts—consistently implement ARM/ARM64 architecture support throughout the project. The title captures this main objective, though it uses an abbreviated form rather than explicitly stating "Add ARM architecture support." While concise, the title communicates the core intent in the context of the repository and is not misleading or vague in the manner of generic terms like "misc updates."
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add_arm

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f2c40b7 and e281181.

📒 Files selected for processing (2)
  • .github/workflows/main.yml (3 hunks)
  • .gitignore (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .gitignore
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/main.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: build (windows-latest)
  • GitHub Check: build (macos-latest)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
dockerfiles/pyopenms/manylinux/ARM64_Dockerfile (1)

25-25: Update LABEL to match the new base image.

The LABEL still references manylinux_2_34_aarch64_main, but Line 1 now uses manylinux_2_34_aarch64. Update the LABEL to maintain consistency with the actual base image.

Apply this diff:

-LABEL base.image="manylinux_2_34_aarch64_main"
+LABEL base.image="manylinux_2_34_aarch64"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 939466d and f2c40b7.

📒 Files selected for processing (6)
  • .github/workflows/deploy-manylinux-docker.yml (2 hunks)
  • .github/workflows/main.yml (1 hunks)
  • CMakeLists.txt (1 hunks)
  • dockerfiles/pyopenms/manylinux/ARM64_Dockerfile (1 hunks)
  • libraries.cmake/boost.cmake (2 hunks)
  • libraries.cmake/coinor.cmake (2 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/deploy-manylinux-docker.yml

56-56: the runner of "docker/build-push-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build (windows-latest)
🔇 Additional comments (8)
libraries.cmake/boost.cmake (2)

101-109: LGTM! Architecture detection is well-implemented.

The architecture detection logic correctly maps common processor identifiers to Boost's architecture flags, with a helpful warning for unknown architectures. This enables proper cross-platform builds.


178-182: LGTM! Architecture variable properly propagated.

The BOOST_ARCHITECTURE variable is correctly integrated into both the command string and the actual execution, replacing the previous hardcoded architecture=x86 approach.

libraries.cmake/coinor.cmake (3)

139-151: LGTM! Build triplet logic correctly handles Linux architectures.

The BUILD_TRIPLET is appropriately set only for Linux (where old config.guess may need help) and correctly excluded for macOS. The triplet arm-linux-gnu for ARM64 is appropriate for autoconf compatibility.


153-160: LGTM! Shared/static library selection properly centralized.

The shared/static build configuration is now clearly defined before the configure step, improving readability and maintainability.


162-190: LGTM! BUILD_TRIPLET properly integrated into configure messages and commands.

The triplet is consistently included in the configure invocation and all related log messages, ensuring proper architecture-aware builds and debugging.

CMakeLists.txt (1)

340-345: LGTM! Conditional BOOST_ARG aligns with architecture-aware builds.

The change correctly limits address-model=64 to x86_64/AMD64 platforms, allowing ARM64 to use architecture detection from boost.cmake. This maintains consistency with the broader multi-architecture support.

.github/workflows/deploy-manylinux-docker.yml (2)

12-15: LGTM! Matrix-based architecture support is well-designed.

The conditional runner selection (ubuntu-latest for amd64, ubuntu-22.04-arm for arm64) combined with the architecture matrix enables proper multi-architecture builds.


46-54: LGTM! Architecture-specific variables enable dynamic build configuration.

The conditional logic properly sets dockerfile and platform_tag based on the matrix architecture, supporting both amd64 and arm64 builds with appropriate Docker contexts.

Comment on lines 44 to +65
uses: docker/build-push-action@v3
with:
push: true # Will only build if this is not here
file: dockerfiles/pyopenms/manylinux/Dockerfile
push: true
file: ${{ env.dockerfile }}
context: .
build-args: |
OPENMS_BRANCH=${{ steps.extract_branch.outputs.branch }}
OPENMS_VERSION=${{ steps.tag_name.outputs.tag }}
tags: |
ghcr.io/openms/contrib_manylinux_2_34:${{ steps.tag_name.outputs.tag }}

ghcr.io/${{ steps.downcase_repo.outputs.repo }}/contrib_manylinux_2_34:${{ steps.tag_name.outputs.tag }}-${{ env.platform_tag }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Update docker/build-push-action to a recent version.

The action uses v3, which is outdated and may not run on current GitHub Actions runners. The dynamic dockerfile and platform_tag integration is correct, but the action version should be updated.

Based on static analysis hints.

Apply this diff:

-      - name: Build and Push Docker Image (${{ matrix.arch }})
-        uses: docker/build-push-action@v3
+      - name: Build and Push Docker Image (${{ matrix.arch }})
+        uses: docker/build-push-action@v6

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 actionlint (1.7.8)

56-56: the runner of "docker/build-push-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
.github/workflows/deploy-manylinux-docker.yml around lines 56 to 65: the
workflow references docker/build-push-action@v3 which is outdated; update the
action to the current major release (for example docker/build-push-action@v4) by
changing the uses reference to the newer version while keeping all existing
with: inputs (push, file, context, build-args, tags) intact so the dynamic
dockerfile and platform_tag continue to work.

Comment thread .github/workflows/main.yml
…4", should have gone to add_arm branch

This reverts commit 3793bab.
@poshul
Copy link
Copy Markdown
Contributor Author

poshul commented Oct 17, 2025

resolved in #155

@poshul poshul closed this Oct 17, 2025
@poshul poshul deleted the add_arm branch October 17, 2025 13:11
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