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

add ghci container #2

Merged
merged 1 commit into from
Sep 11, 2024
Merged

add ghci container #2

merged 1 commit into from
Sep 11, 2024

Conversation

mahf708
Copy link
Collaborator

@mahf708 mahf708 commented Sep 9, 2024

adds github-action ci container.

The ghci container is mainly for testing on github actions:

  • the container is based on spack/ubuntu-jammy:0.22.1
  • the container relies on binary cache to accelerate builds
  • the container is based on gcc 11, native to ubuntu 22.04 (jammy)
  • the container has mpich 3.4.3, to ensure compatibility with craympich
  • the container houses within it (~10 GB of) data files from the inputdata server

The github actions workflow added in this PR (.github/workflows/ghci.yaml):

  • it checks out the code recursively (in case we add e3sm as a submod here), it logs in into the gh container registry (ghcr), it then builds (requiring QEMU, etc.) the container, and pushes if it is not a PR
  • it is designed such that it is unique for each container (containers-ghci is the name of the container, and its versioning will follow ghci-0.1.0; so for abcd container, it will be containers-abcd with abcd-1.2.3)
  • the action is guarded such that it only runs if the files added in this PR are edited later or if there's a tag with "ghcr" in it

@mahf708 mahf708 requested a review from rljacob September 9, 2024 00:08
@mahf708 mahf708 self-assigned this Sep 9, 2024
@mahf708 mahf708 added the ghci github ci label Sep 9, 2024
@mahf708
Copy link
Collaborator Author

mahf708 commented Sep 10, 2024

cc @ndkeen @bartgol on adding a container in this repo.

@rljacob, I am going to merge today if I don't hear from you, hope that's okay :)

@rljacob
Copy link
Member

rljacob commented Sep 10, 2024

Can you describe what the github action in this PR does?

Copy link

@bartgol bartgol left a comment

Choose a reason for hiding this comment

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

Is the action simply building the image and pushing it to the registry?

@mahf708
Copy link
Collaborator Author

mahf708 commented Sep 10, 2024

Can you describe what the github action in this PR does?

Is the action simply building the image and pushing it to the registry?

Yes, the action builds the Dockerfile, then pushes it to the github container registry (ghcr). If we want, we can add one step to also push to Docker registry (docker hub). Note that the step called "Push" takes care of both building and pushing, but it doesn't actually push if it is in a PR. Additionally, the action has all sorts of guards to make it only push when these files are edited, and it will push containers with a distinct signature (so that they don't conflict with other containers). The metadata step gathers automated information about the container so that they can be automatically added to the image (like version, sha, etc.).

I will add a description to the PR post (and the commit message) before merging.

@mahf708 mahf708 merged commit 917af3f into main Sep 11, 2024
1 check passed
@mahf708 mahf708 deleted the ghci branch September 11, 2024 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ghci github ci
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants