Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Enable multiplatform builds for amd64 and arm64 #2058

Merged
merged 1 commit into from
Nov 14, 2022

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Nov 11, 2022

Description

Add the platforms argument to the docker/build-push-action GitHub Action and pass the platform names to enable build for both amd64 and arm64 architectures. This will enable Apple M1 and M2 machines to run the pyhf/pyhf Docker images without emulation which will significantly improve runtime performance.

While this hasn't been run through the CI, this has been tested locally with

$ docker buildx build --file docker/Dockerfile --platform linux/arm64 --tag pyhf/pyhf:debug-arm64 --load .
$ docker image inspect pyhf/pyhf:debug-arm64 | jq '.[] | with_entries(select(.key == "Architecture"))'
{
  "Architecture": "arm64"
}

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Add the 'platforms' argument to the docker/build-push-action GitHub
  Action and pass the platform names to enable build for both amd64 and
  arm64 architectures. This will enable Apple M1 and M2 machines to run
  the pyhf/pyhf Docker images without emulation which will significantly
  improve runtime performance.

* Add the 'platforms' argument to the docker/build-push-action GitHub
  Action and pass the platform names to enable build for both amd64 and
  arm64 architectures. This will enable Apple M1 and M2 machines to run
  the pyhf/pyhf Docker images without emulation which will significantly
  improve runtime performance.
@matthewfeickert matthewfeickert added CI CI systems, GitHub Actions Docker Involving Docker images or builds labels Nov 11, 2022
@matthewfeickert matthewfeickert self-assigned this Nov 11, 2022
@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Base: 98.30% // Head: 98.30% // No change to project coverage 👍

Coverage data is based on head (48122b6) compared to base (57a5ad7).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2058   +/-   ##
=======================================
  Coverage   98.30%   98.30%           
=======================================
  Files          69       69           
  Lines        4530     4530           
  Branches      645      645           
=======================================
  Hits         4453     4453           
  Misses         45       45           
  Partials       32       32           
Flag Coverage Δ
contrib 97.88% <ø> (ø)
doctest 61.14% <ø> (ø)
unittests-3.10 96.31% <ø> (ø)
unittests-3.8 96.33% <ø> (ø)
unittests-3.9 96.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@matthewfeickert matthewfeickert merged commit 0493098 into main Nov 14, 2022
@matthewfeickert matthewfeickert deleted the ci/add-arm64-support-to-docker-images branch November 14, 2022 22:25
matthewfeickert added a commit that referenced this pull request Mar 31, 2023
* Backport PR #2149 and add Docker build and docs workflows
  to run on PRs on patch release branches.
* Backport components of:
   - PR #2047
   - PR #2058
   - PR #2102
   - PR #2106
   - PR #2140
   - PR #2145
   - PR #2146
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI CI systems, GitHub Actions Docker Involving Docker images or builds
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants