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 model build CI for CABLE offline #223

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

SeanBryan51
Copy link
Collaborator

@SeanBryan51 SeanBryan51 commented Mar 15, 2024

Making CABLE available as a spack package allows us to test the model compiles successfully inside a continuous integration (CI) environment which gets triggered automatically on a pull request. This change adds the model build CI workflow developed by the ACCESS-NRI release team to compile CABLE offline via spack (see build-ci for more details). This workflow compiles CABLE using the intel compiler. The CI for other compilers will follow after this pull request.

Fixes #202


📚 Documentation preview 📚: https://cable--223.org.readthedocs.build/en/223/

@SeanBryan51 SeanBryan51 linked an issue Mar 15, 2024 that may be closed by this pull request
@SeanBryan51 SeanBryan51 marked this pull request as ready for review March 18, 2024 05:31
@SeanBryan51 SeanBryan51 changed the title Try model build workflow Add model build CI for CABLE offline Mar 18, 2024
@SeanBryan51 SeanBryan51 force-pushed the 202-build-ci-for-cable-offline branch from 72bd8a3 to 913846a Compare March 18, 2024 05:33
@SeanBryan51 SeanBryan51 requested a review from ccarouge March 18, 2024 05:40
Copy link
Member

@ccarouge ccarouge left a comment

Choose a reason for hiding this comment

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

Looking at 'model-1-build.yml', I have some questions. I have no idea yet if I can approve because all of the following will come later or if any of my questions are a deal breaker.

The way we get the version implies tags can only be used for versioning on the main branch. Correct?

Currently, this will only compile with ifort. Could this be made clear in the description of the PR. And make clear development of the CI for other compilers will follow. How will the CI work if a model wants to run CI using 3 different compilers and another model wants only to use 2 compilers (potentially different compilers from the other 3)?

This comment might be more for 'build-ci' itself than the current CI here, but how are we going to deal with model components that are part of different models? For example, MOM5 is part of ACCESS-OM2 and ACCESS-CM2. For the moment, I don't think it will impact CABLE but it could in the future.

Will the CI support different MPI implementations (OpenMPI and IntelMPI) ?

@SeanBryan51
Copy link
Collaborator Author

@ccarouge I will direct questions around model-1-build.yml to @CodeGat as he probably understands the implementation the best. I've made an issue ACCESS-NRI/build-ci#151 which describes additional functionality that would be useful for us and should cover most of your points.

It might take some time to implement the new functionality. Should we use the build-ci action as is for now?

We should also probably pin the action with a commit instead of main so that the CI in CABLE is unaffected by changes in build-ci. Will do this now.

Making CABLE available as a spack package allows us to test the model compiles
successfully inside a continuous integration (CI) environment which gets
triggered automatically on a pull request. This change adds the model build CI
workflow developed by the ACCESS-NRI release team to compile CABLE offline via
spack (see build-ci for more details). This workflow compiles CABLE using the
intel compiler. The CI for other compilers will follow after this pull request.

Fixes #202
@SeanBryan51 SeanBryan51 force-pushed the 202-build-ci-for-cable-offline branch from 913846a to 5a4ec77 Compare March 19, 2024 00:13
@CodeGat
Copy link

CodeGat commented Mar 19, 2024

Hi @ccarouge :) yes, please let me know of any functionality that you require, and I can work on it when possible. Currently we only use it for compilation testing in ACCESS-OM2/3 but it would be great to hear from model developers regarding their workflows so I can either add the needed functionality to build-ci (if it is sufficiently generic) or help out adding model-specific functionality to the workflow here.
Regarding the compiler stuff: currently we run the model on all compilers defined in build-cis config/compilers.json. I've heard from Sean as well that you might want to selectively build on certain compilers rather than all of them. I've had thoughts on doing this as well - adding an issue to build-ci would be great.

Tagging @aidanheerdegen as well so it's on his radar.

@SeanBryan51 yes, it is good practice to pin workflow versions for external workflows. Do note that you will have to update the workflow here whenever there is an update relevant to you (rather than just having the latest).

Copy link
Member

@ccarouge ccarouge left a comment

Choose a reason for hiding this comment

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

It's good to go

@SeanBryan51 SeanBryan51 merged commit 281a621 into main Mar 19, 2024
7 checks passed
@SeanBryan51 SeanBryan51 deleted the 202-build-ci-for-cable-offline branch March 19, 2024 01:35
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.

Build CI for CABLE offline
3 participants