-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Test Windows with GitHub Actions #4084
Conversation
This now matches AppVeyor Python 3.x jobs; I don't think it's possible to compile for Python 2.7 on GitHub Actions. Note that AppVeyor does try to compile lcms2, but it errors out: https://ci.appveyor.com/project/Python-pillow/pillow/builds/27627690/job/ual03214w7mvbx4q?fullLog=true#L1214 PyPy3 x86 should be easy to add, but I don't know if there is a way to add it to the matrix without also adding PyPy3 x64, which doesn't exist. Duplicating the job would work, but that would lead to a lot of duplicate code. I think the current I therefore propose changing I would also like to change Before I mess with |
Great work! The 6 * Python 3 jobs take ~28 minutes on AppVeyor (in serial), and ~7 minutes on Actions (all in parallel)! Don't worry about 2.7, we're dropping it soon. Perhaps runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-10.14, windows-2016, ubuntu-18.04]
node: [4, 6, 8, 10]
exclude:
# excludes node 4 on macOS
- os: macos-10.14
node: 4 Example from https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix I'm generally fine with refactoring It would be a great longer term goal to build Windows wheels via CI, to remove the one-person bus factor. And if we do so, I'd favour doing so with Actions so we can retire or at least minimise AppVeyor. |
Done on my branch, thank you! I have 21 hung jobs I can't cancel ("Failed to cancel check suite.") due to #4074, once they time out and I can test it, I will push it here and mark Ready for review.
I remembered this as build.py... I'll go ahead and refactor
Agreed. |
Can you click the "Cancel check suite" button? https://help.github.com/en/articles/managing-a-workflow-run#canceling-a-workflow-run |
It gives me an error. |
6 hour timeout, yikes. I've pushed your https://github.com/hugovk/Pillow/commit/9def3c588a1dd56f32338c628552dce77a6c10b4/checks All green except PyPy3. I saw the check for the nulano@9def3c5#diff-2deb7e4843eb6ebdbc14446813affc8eR359 I've not tested it, but it looks like it should be |
Thanks!
Looks like yet another PyPy bug, sigh... I'll confirm this tomorrow by skipping the failing test.
Hmm... I've run I suppose |
GitHub staff replied:
Let's stick with the plural. |
PyPy3 added, marking ready for review. The remaining tasks can be done in future PRs if this is merged in the meantime. I added a 30min timeout (triple PyPy3 build time) to avoid what happened yesterday. PyPy bug reported and test skipped: https://bitbucket.org/pypy/pypy/issues/3081/operationerror-cp65001-is-only-available |
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.
Some minor things
Actually, all freetype tests are broken on PyPy3 with Raqm, so it's For example: |
I'd really like to get this PR merged in soon. It'd be fine for PyPy3 to follow in a later PR, the main thing would be to replace the bulk of the AppVeyor jobs. What is important before removing AppVeyor jobs is coverage. Having said that, there's a lot of value in having these GHA jobs merged in and running in parallel with AppVeyor, even if coverage is to follow, just because they're so fast and we'll get build feedback much quicker. Coverage:
I added a token to Another place it go is hardcoded in test*.yml: env:
CODECOV_TOKEN: abcde12345uvwxyz Ideally forks could still have correct coverage showing on their own Codecov page, before PRs are made. And then a PR would have correct coverage on the Pillow Codecov page. Thanks! |
@hugovk Merge-away from me pending everyone else's comfort level and everyone please allow me to echo @wiredfool thanks to @nulano !! (@nulano you should consider joining the Pillow team if you are interested cf. #4048 . We could add you to the team now as a volunteer, then if that goes well, add you to Tidelift in 2020 …) |
@cgohlke Look at the Build Pillow step. I noticed that distutils chooses /MT for CPython 3.x, but /MD for PyPy3. I'm not sure whether there was a change in CPython, but I guessed that there was based on this. I do remember seeing /MD in Python 2.7 builds on AppVeyor.
I pushed Raqm with PyPy3 disabled for now. My current theory is that this is due to the /MD vs /MT difference between CPython and PyPy, but I think this can be tested later. I would definitely make sure AppVeyor is kept functional, at least until GHA is out of beta; just reducing it to one or two jobs would probably be a good start. This is a good idea especially when you consider yesterday's 2 hour outage: actions/checkout#49 I would be more comfortable adding in the token in a separate PR, so feel free to merge now.
I will definitely consider this, but I expect to become quite busy over the next few weeks, so I'll get back to you later once I've got my schedule figured out. |
Looking at the source of distutils on my desktop, this does seem to make sense. I am pretty sure the Visual Studio install does have the required files, both because the PyPy3 distutils finds it, and because I see the file on my desktop Visual Studio 2017 Community install (in Also note it is the same on AppVeyor which has VS2015. |
I found the issue. After removing this line, Pillow is built with /MD: Pillow/.github/workflows/test-windows.yml Line 316 in ae8fd74
Looking through _msvccompiler setting this value makes distutils skip looking for the redistributable files and Edit: git blame: 1ad678a, from 6 years ago... Windows SDKs have since been changed to be a VS component, not a separate install, and @cgohlke Do you see any issue with removing this line? |
@nulano Probably fine pending @cgohlke's confirmation … FWIW, here's some docs about that environment variable: https://docs.python.org/3/distutils/apiref.html#module-distutils.msvccompiler |
Everything is /MD now (except ghostscript, which is only called through the exe). PyPy3 still fails with Raqm, might be a PyPy bug. I think the AppVeyor failure is an intermittent PyPy bug, I faintly remember a similar problem when I was working on PyPy3 for AppVeyor. Restarting it might fix it. I also ran all tests on a clean Vista VM with the 3.7x86 wheel, getting two failures: missing Visual Studio and missing PowerShell, both only needed for Tests. |
Are we good to merge this once the conflicts are resolved?
Good point, let's keep both ticking over until at least after launch. We can use that time for any updates/tuning needed for this. |
Thank you very much! |
Quick question, I managed to follow some of your steps for a library that I develop, but only using Essentially, with |
Thanks! (what a mess ^^) |
For #3606
Adds Windows tests to GitHub Actions.
Existing scripts
winbuild\build_dep.py
andwinbuild\build.py
expect MSVS2015, but GitHub Actions only comes with MSVS2017 (or MSVS2019). It does come with a backwards-compatibility component, but it is incompatible with the existing scripts. For now this uses build scripts hardcoded intest-windows.yml
, I would like to update thewinbuild
scripts once I have all the dependencies working.Dependency builds are split into separate steps to make logs easier to read. If kept, this would require another change in
winbuild\build_dep.py
.Available dependencies:
libimagequantraqmStrikethrough indicates potential licensing issues for binary distribution.
TODO
Update(in future PR)winbuild\build_dep.py
andwinbuild\build.py