-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Switch from Azure to GitHub Actions #37
Conversation
The tox workflow is now merged so you should be able to use the OpenAstronomy main branch. |
Codecov Report
@@ Coverage Diff @@
## main #37 +/- ##
==========================================
- Coverage 79.13% 74.82% -4.32%
==========================================
Files 4 4
Lines 278 278
==========================================
- Hits 220 208 -12
- Misses 58 70 +12
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
@ConorMacBride - just curious, do you have any idea what could be happening in the Windows build here? (it's complaining about not finding the Visual C++ compiler which is needed to build a package with a C extension in the test - I'm curious why this wasn't an issue on Azure though) |
It's saying "Microsoft Visual C++ 14.0 or greater is required" however that version should be installed in the windows-latest image: https://github.com/actions/virtual-environments/blob/main/images/win/Windows2022-Readme.md#microsoft-visual-c Unless an environment variable is missing (or the test is run isolated from the default environment variables)? |
Yeah I was wondering if it was a tox isolation thing - it's just curious because this didn't occur on Azure. I'll try and dig deeper. |
Yeah, maybe disabling the tox isolation will make it work? Azure Pipelines is using the windows-2019 image (https://github.com/actions/virtual-environments/blob/win19/20220131.1/images/win/Windows2019-Readme.md) while GitHub Actions is using windows-2022. The windows job seems to expect OpenMP to be installed, although nether of these images lists that as being installed so how did it work before? |
I think there was an issue with the recent Windows upgrade on Actions and the Visual C++ compiler. @pllim probably knows more ? |
Yes, @lpsinger fixed it by downgrading to windows-2019 |
Should we temporarily downgrade Windows in the reusable workflows from |
|
You only have to downgrade if you are compiling C, so 🤷 |
@ConorMacBride - I think it's probably best to downgrade to windows-2019 for now, it's not like we really need the more recent version? |
Ah I just saw OpenAstronomy/github-actions-workflows#15 |
.github/workflows/main.yml
Outdated
# Test downstream packages | ||
- linux: py39-downstream | ||
env: | ||
OA_WINDOWS_RUNNER: windows-2019 |
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.
@ConorMacBride - I can't figure out what the correct level of indentation needs to be, nothing seems to work. Do you have any ideas?
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.
Doesn't the web editor tell you if you use GitHub web UI to edit the file? You indent/unindent until the red swiggles go away... 😆
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.
Apparently you can't pass custom environment variables to a reusable workflow: https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations
I'm working on a new runner
input.
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.
You can now remove the OA_WINDOWS_RUNNER
and do:
- windows: py36-test
runs-on: windows-2019
- windows: py38-test-dev
runs-on: windows-2019
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.
Thanks! I've added that here.
The pinned |
… tests with pytest --pyargs extension_helpers for example)
@Cadair - just FYI I've set PYPI_TOKEN in the repo secrets |
.github/workflows/publish.yml
Outdated
@@ -0,0 +1,12 @@ | |||
on: |
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 workflow should only run if the test one passes?
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.
Ok done!
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 like it, the templates look good.
@@ -36,6 +36,7 @@ setuptools.finalize_distribution_options = | |||
|
|||
[options.extras_require] | |||
test = | |||
wheel |
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.
Why?
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.
The test C extension package failed otherwise for some reason.
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.
curious
We waiting for the first release to merge this? |
I guess we might as well at this point as we should be able to tag the workflows so it will be a good test? |
@Cadair - I've updated the ref for the workflows to v1, feel free to merge if the CI passes! |
I am trying out the new re-usable OpenAstronomy workflows. For now, I am using @ConorMacBride's fork for the tox testing. This also now adds a publish workflow.
Fixes #8