madanalysis5
madanalysis5 copied to clipboard
feat: Add Dockerfile and GitHub Actions based CI
Before submitting
Please complete the following checklist when submitting a PR:
- [x] All new features must include a test sequence. If you've fixed a bug or added code that should be tested, add a test sequence below for it to be checked by other developers.
- [x] All new functions and code must be clearly commented and documented.
If you do make documentation changes, make sure that the docs build and
render correctly by running
./doc/makedoc. - [ ] Add a new entry to the
madanalysis/UpdateNotes.txtfile, summarizing the change, and including a link back to the PR.
The format of
https://github.com/MadAnalysis/madanalysis5/blob/3fd09e7fc35a27294a19fb6d8b0f45f4620a9caa/madanalysis/UpdateNotes.txt#L1-L11
is confusing (what are the numbers in the first column)? The file also hasn't been updated since MadAnalysis5 got ported to GitHub, so I'm not sure if there is a format the dev team would like to keep.
When all the above are checked, delete everything above the dashed line and fill in the pull request template.
Context:
Resolves #2
Description of the Change:
- Add a Debian based
Dockerfilethat builds from the top level of the repository with the build context
docker build --file docker/Dockerfile --tag madanalysis5/madanalysis5:debug-local .
-
Add differential cross-section plot example (taken from http://madanalysis.irmp.ucl.ac.be/wiki/FAQNormalMode) as a test example to run after the build.
-
Add GitHub Actions workflow to build, test, and publish Docker images.
Benefits:
Dockerfiles and images are very powerful (build) testing and debugging tools and can be exceptional for giving users a sandbox area to play in and to use for demonstrations.
Possible Drawbacks:
PRs are like puppies. While I can help give guidance on how everything works, if this isn't something that the dev team is up for maintaining I can 100% appreciate and respect that.
Related GitHub Issues:
Issue #2.