-
Notifications
You must be signed in to change notification settings - Fork 240
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 CI builds on Github Actions #2544
Conversation
The "${HOME}${R_LIBS#'~'}" is to manually expand tilde in R_LIBS: * GitHub sets env vars as unprocessed strings, so it won't be expanded there. * POSIX shell expansion rules say ~ is always replaced *before* expanding $, so `FOO='~'; mkdir -p $FOO` creates a dir literally named '~'.
Travis is failing due to tmvtnorm package. To be more precise, it is not able to download one of the dependencies mvtnorm.
The error is caused due to the version mismatch as Travis is using R 3.6.2 & it is trying to load the latest version of mvtnorm e.g., 3.6.3 |
Thanks for investigating, @rahul799. Apparently c2d4u, which we use for precompiled binaries of some R packages, has already started updating some of their binaries to R 3.6.3 but is still serving others compiled with R 3.6.2.As far as I can tell, c2d4u's philosophy is that "compiled packages are usually compatible between patch versions of R, so mixing them is fine", but R always warns any time you load a package built for a different version -- and what we see here is the package installation process for Version issues like this have been an ongoing pain point for a while and we think they'll be easier to improve on Actions than on Travis, which is part of why we'd like to migrate when we can. As a short-term fix, I've abused Travis's caching abilities by using some API calls to reinstall a 3.6.2-built version of |
We need to either update the R version of the Travis CI to 3.6.3 or either we can go to the 3.6.2 version of mvtnorm. |
After I put a rebuilt |
Thanks for correcting me @infotroph! |
Co-Authored-By: Rahul Agrawal <41531498+rahul799@users.noreply.github.com>
Co-Authored-By: Rahul Agrawal <41531498+rahul799@users.noreply.github.com>
Co-Authored-By: Rahul Agrawal <41531498+rahul799@users.noreply.github.com>
Co-Authored-By: Rahul Agrawal <41531498+rahul799@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic!! The way you cache R packages with the R_LIBS
variable is really clever.
In a future follow-up PR, we should switch to using the "official" PEcAn images (i.e. not infotroph/pecan-depends
). And in another future PR, we should test the Docker compose installation instructions.
I think having GH Actions-based integration testing will be a major milestone for PEcAn development, and this is a critical first step to that. I'm excited.
100% agree -- we can probably even do it in this PR if #2538 is merged before this one |
How hard is it to make an action that runs on a nightly basis to create a new pecan/depends:develop image? |
Probably not too hard. I think several folks have already written that into their GSoC proposal drafts, so I'm happy waiting and letting them do it :) |
This appears to be fully working and is ready for final review |
One more change! Switched test database from the static dump file used on Travis (last updated three or four years ago; takes 4-5 minutes to download and read in) to the |
@mdietze @robkooper OK, now this is ready for final review and merge. Please squash on merging -- the intermediate commits are all debugs and typo fixes. |
Description
First pass at a continuous integration pipeline using GitHub Actions. These do not yet replace our existing Travis CI build.
Runs automatically on every push, and does the following:
depends
Docker image. It does not spin up the whole Docker-compose stack, just uses the image to avoid reinstalling dependencies.pecan/db:ci
Docker image, which contains the records from the most recent successful dumps of servers 0, 1, 2, 5.You can see the results of each run in the Actions tab. My understanding is that when you fork PEcAn these actions will run in your own fork too with no opt-in needed.
Motivation and Context
Closes #2412. As discussed there, the single biggest apeal of Actions is that its runtime limits are much more generous than the 50-minute ceiling we often hit on Travis. Actions is also very flexible and well-integrated with the rest of GitHub; if this workflow works well, it's easy to envision adding
more actions that interface with issues and PRs, build Docker images, run more elaborate integration tests at longer time intervals, and so on.
Since many of these changes will be relevant to possible GSoC projects this coming summer, I'd like to encourage potential applicants to join the review process for this PR. To encourage discussion, I'll keep this open for a while to make sure everyone has lots of chances to comment before it's merged. I've marked it as work in progress to avoid accidental merging while discussion is still ongoing.
Review Time Estimate
Types of changes
Checklist: