-
Notifications
You must be signed in to change notification settings - Fork 1
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
Release Image #109
Comments
I am thinking about how to keep the balance of image consistency (one image update triggers all image updates) and CI efficiency (keep images fixed). Now I think maybe a good way is to build every repo only with the STABLE release images of other repos, and only update all stable images when necessary (e. g., in the case of a major release). With this design, the daily CI is very simple and fast (load the building image containing everything needed including the compiled libraries of other repos, and then compile and test the repo). We need only one workflow to update all images, and this workflow can even be manually triggered since it will not be run very frequently. A failed workflow run to update all images will release some code integration issue (some repo breaks other repos), but will NOT affect the daily CI. |
I feel like we need to break this problem down and try to build up to a solution. So at this point I am going to suggest:
Each of the above steps can be a separate PR and it should be possible to accomplish those PRs without breaking the current CI pipeline. That's because repos which depend on PZ or PluginPlay should still be able to build since their CI includes steps for building PZ/PluginPlay (implicitly via the CMakeLists.txt). I would recommend copy/pasting the workflows into the various repos and then modifying them as needed; don't try to have a master workflow at this stage. |
Several questions:
I'm also planning to update the CI repo by repo with a leap-frog strategy. |
I don't understand what updating by a leap-frog means in this case. The update process should be a breadth-first traversal of a tree. |
Yes, the release image of ParallelZone would have the shared libraries it linked to, such as MADNESS, spdlog, cereral, etc, but it won't have the building tools such as gcc and cmake. In this sense I can use the image to build ParallelZone as a base to build other repos (with other tools/packages added when necessary), not the release image of ParallelZone. The release image of ParallelZone, which contains the shared libraries (ParallelZone, MADNESS, spdlog, cereral, etc), can be added as a layer into the building image of PluginPlay, since PluginPlay depends on ParallelZone. |
Now that Docker allows image composition here's how I would do this. Here each box is an independent image we need to maintain. Diamonds are literal libraries which are included in the image (libraries are not shown in all cases). The nesting shows the images they derive from. So:
The innermost images are parameterized on the compiler type (GCC or clang), the compiler version, the CMake version, and the version of the namesake library. Derived images inherit the parameters of their inner images. When building say PluginPlay base, you must then specify:
Then:
In practice, we have pinned the version of all the dependencies (and the versions live in the |
Ok, now I understand. In your design, base image = dependencies, and release image = base + compiled repo. |
@ryanmrichard What gcc/g++ and clang versions should we cover in the building images? Now the building images are based on Ubuntu 20.04, so the gcc/g++ version no. ranges from 8 to 11 (correct?). |
@yzhang-23 just worry about a single version for now, but parameterize the CI on the version so we can change it later. |
I have redesigned the docker image building strategy: the building image of a repo used to have everything including the released dependent repos. However, as we want to build and test the repo both with gcc and clang, with the original building image setting, we have to store two different building images for each repo: one for gcc, and the other for clang. This could result in storage space issue. I think Ryan's suggestion of constructing a base image containing only the building tools but not the dependent repos is good. With such a base image, I can load the release images compiled with gcc or clang during the process of building the repo. In this way we don't need two different building images for gcc and clang. I'm trying to applying this new design into the workflows. Hope the testing won't take too much time. I will give updates. |
I have a workflow in hand to parse the file in NWXCMake to obtain the package version info, but I would postpone its check-in until I find a good way to conveniently handle all versioned packages. Now I still have some minor issues, such as cannot separate the installation of gcc and clang, the exact version no. of some packages are missing, etc. |
I wanted to run jobs within containers from images built on-the-fly (not pushed into some registries), but it turned out to be impossible. Please see the discussions at the GitHub Actions forum. |
This is the next issue after #107 (or #108 if we want to go that route). The idea is that when a PR gets merged to master it should trigger building a release quality image. The image needs to:
The image which results from this build will become the "base image" for downstream repositories, such as PluginPlay. From PluginPlay's perspective this new base image will serve the same role as the .github base image did for ParallelZone.
The text was updated successfully, but these errors were encountered: