-
-
Notifications
You must be signed in to change notification settings - Fork 267
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 for Windows #1158
base: main
Are you sure you want to change the base?
Add CI for Windows #1158
Conversation
Exciting! Depending on how many failures there are, we may want to use |
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 for taking a swing at this!
@chrisjbremner you might want to kill all the non-Windows shards in .travis.yml to speed up iteration. We share a queue with pantsbuild/pants which can sometimes slow things down a good bit not to mention there are a lot of shards in this CI setup that run before the ones you've added. |
By "kill" do you mean temporarily delete them/comment them out? |
Yes. |
.travis.yml
Outdated
- choco install python --version 3.9.0 | ||
- python -m pip install --upgrade pip | ||
- choco install python --version 3.9.1 | ||
- python -m ensurepip --upgrade |
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 is not the python you think it is. CI says:
python2 v2.7.18 [Approved]
python2 package files install completed. Performing other installation steps.
Installing 64-bit python2...
python2 has been installed.
Installed to 'C:\Python27'
Adding C:\Python27 to PATH if needed
...
$ python -m pip install --upgrade pip
The command "python -m pip install --upgrade pip" failed and exited with 1 during .
Your build has been stopped.
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/opt/bin/python.exe: No module named pip
Note chocolatey C:\Python27
vs C:/ProgramData/chocolatey/lib/mingw...
. FWICT the latter is the "A basic Python 2.7.9 interpreter is also included: /C/ProgramData/chocolatey/bin/python.exe" referred to at the bottom of this section in the docs: https://docs.travis-ci.com/user/reference/windows/#pre-installed-chocolatey-packages
Ok, looks like it is working now and the Windows tests are failing with the |
I think it'd be best to skip those failing tests in this PR, then you can unskip them in the fix. We want to keep these separate for cleaner diffs. Thanks for spearheading this! |
I disagree with Eric on this one and would prefer a real green all in one here with the .travis.yml and the code fix. |
Ok, it will probably take a while to fix all of these tests |
@chrisjbremner one thing you might try is not fighting so hard against the motivating example tox.ini you found. That tox.ini sets PATH: https://github.com/mapaction/mapactionpy_controller_dependencies/blob/6b3fcce09d29c20d6ec51040fd0449f0ab3d984a/.travis.yml#L12 Perhaps do things just like they do. |
@chrisjbremner just wondering how close you were on this. It's a blocker for us now too so we could pick it up and see if we can take it the rest of the way if you don't have the bandwidth. |
If you do pick it up @g-cassie - which would be great - note that Pex has since converted from Travis-CI to Github Actions. They still have windows support so you should have a clear path to getting Windows CI setup still. |
Hi @g-cassie, I haven't got much farther than where this is left, I've been a bit distracted by other things recently. If you could help out, I'd appreciate it. |
@chrisjbremner @g-cassie @jsirois I am picking this up today and planning on working through the required CI changes for windows via the GitHub Actions. I am going to create a fresh fork and manually copy over the changes to pex/common.py from this PR and will credit @chrisjbremner and link to this PR in my PR. Let me know if there is a preferred way. |
@chrisjbremner : @jacobnlsn is taking a swing at this, but would welcome your insight. If you're interested, joining the #pex channel in pantsbuild slack would be really helpful! |
@jacobnlsn, were you able to make any progress on this? |
No I was not unfortunately. |
Ok, thank you for the quick response. I'm investigating picking this up. |
Well, my investigation for the day has ended with "the core functionality and enabling the CI is doable, but now there's lots of assuming Posix in the tests"... -> https://github.com/mshafer-NI/pex/commits/add_windows_ci |
Hi all, checking in on the status of this... E.g., has there been an attempt to get Pex to run manually on a simple example, before trying to get all the tests to pass? |
granted, I went straight to the tests: https://github.com/mshafer-NI/pex/actions/runs/2174174654 |
Bold :) It might make sense to first try and get something really simple like
working manually? |
whelp, looks like there are more places to get the
|
BTW are you working off latest |
Also, not sure if you've already hit this, but this will be necessary:
When embedding an |
I merged main into the branch to start (so latest as of 4/15)
Good to know. Earliest I'll be able to get back to this will be end of next week. |
Just got some time to look through my notes. It's been over a year so it's very fuzzy but here's some notes that could be useful. One problem we encountered when looking at this was that it was not clear you could actually get a
I have notes saying you could call pex files like this on Windows In another note, we found based on this SO answer that this works:
But i think you have to make that change on the Windows machine where you want to run the pex? That's all I've got - best of luck! |
As discussed in #1157, in order for
pex
to officially support Windows, we need to add Windows CI. I did a quick survey of other OSS Python projects that have some form of Windows CI, and there wasn't a clear favorite (there also just weren't many projects using Windows CI). I figured that since Travis supports Windows and this project already uses Travis, it would make sense to try to leverage the existing infrastructure. Using this Github search, I came across thistravis.yml
that sets up a Windows CI pipeline for testing a Python project. I adapted that format to fit into the existing infrastructure of this project.While I don't expect this to work on the first try, I think this should be a good start to allow us to figure out what adjustments need to be made.