-
Notifications
You must be signed in to change notification settings - Fork 138
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 Github Actions Testing #347
Conversation
This has not triggered an action. It did when I was pushing to my development branch in my fork. Maybe this needs to be merged before it will trigger the action? Separately, we need to figure out whether something needs to be done to have the Testing Action be part of the PR status checks. Hopefully this all works once it's merged??? |
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.
I don't understand enough about how this works to intelligently review it. I'll approve so it can move forward but would appreciate more useful review by @phil-blain.
Where does the result of write_logfiles.csh get written?
Can we still use travis-ci to build the code, or will that need to be removed from README.md?
https://github.com/Apcraig/Icepack/actions appears to be hardwired. Will that stay this way? I see we're also using your space for lcov. That's fine, but we might want to think about making these local.
I'm planning to keep the travis-ci "on" for now. We can override the status checks and merge the PRs if needed. I'm still waiting to hear if travis gives us more time. Hopefully they will. If so, I think we should have both travis and github actions working concurrently for now. All the output is written to the github actions log, it's very similar to what travis does. The logs are all visible. See here for an example of the github actions output, https://github.com/apcraig/Icepack/runs/1653142536?check_suite_focus=true |
I won't have time to look at this today, but I'll try to tdo so on Monday or Tuesday. |
@phil-blain, any chance to have a look? |
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.
I think this looks good, I left a few specific comments. I think it would be good to have linux working also, do you have an example of a failed run ? we could try to get it to work before we merge.
Turned linux on again, it still fails. @phil-blain, any ideas. It fails with Run ln -s ${GITHUB_WORKSPACE}/../Icepack ${HOME}/icepack Under "link". In "system info", these env variables are written, HOME: /home/runner MacOS doesn't struggle with this. Unless we can fix this quickly, I'll just turn off linux again. MacOS seems to be working well and with the latest changes, it triggers the build as part of the PR which is great. |
This error is very weird as a Google search points to questions about the .NET framework and the C# programming language. After SSH-ing to the GitHub Actions virtual machine (see https://github.com/phil-blain/github-actions-debug/blob/main/.github/workflows/tmate.yml) and playing around, I found out that the command defaults:
run:
shell: /bin/csh {0} but the Ubuntu images do not include csh, the GitHub Actions runner somehow matches "csh" to the command "csharp" and tries to run the If we want to add Ubuntu (which I think could be a good idea) I think we should remove the "defaults" section that sets "csh" as the default shell and just use the default shell of the system, which is Bash. We would not have to then specify to use Bash for the other steps (see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell). This way we test something that is closer to what our users are most likely to use. If we also want to test the whole thing in other shells like csh, then we would need to install it on ubuntu , using the instructions in our documentation: # Install tcsh
sudo apt-get install tcsh
# Configure your system to use tcsh as csh
sudo update-alternatives --set csh /bin/tcsh That could be done in a additional entry in the matrix. But we can post-pone all that for later, and just disable Ubuntu for now. |
Thanks @phil-blain, that's very helpful. I also was googling the ubuntu error when I was doing the original implementation and couldn't figure out what was happening. I also went back and forth on bash, csh, and zsh about which to use and how to implement it. I had some problems with bash as well. If I remember right, some of our scripts didn't work if I didn't use the csh shell. I'm sure that can be overcome somehow, I just couldn't figure it out. For now, I'll comment out again the ubuntu, verify it's working, then we can merge. I need to then do the same for CICE. The main thing is to get back our CI testing first. As you suggest, we can play with the ubuntu later. Thanks again. |
OK, I think this may be ready to merge. @phil-blain, let me know if you think this is OK. I incorporated most of your comments. Thanks! Once this is merged, I'll setup the same for CICE and then we can decide later if we want to turn off the travis stuff. I still haven't heard anything from them. I'll ping them again today. |
PR checklist
Add Github Actions Testing on Pull Requests and Pushes to master and releases
apcraig, phil-blain
Only added yaml and supporting changes for Github Actions. Tested in Github Actions, https://github.com/apcraig/Icepack/actions
This is running the travis_suite via conda+macos on Github Actions. Initial implementation from @phil-blain and updated by @apcraig. This partly addresses CICE-Consortium/CICE#550. If we're happy with this, I'll do the same for CICE.