-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
gh-91960: Add FreeBSD build and test using Cirrus-CI #91961
Conversation
Every change to Python requires a NEWS entry. Please, add it using the blurb_it Web app or the blurb command-line tool. |
It seems the CLA bot does a case-sensitive match but my git author data and GitHub profile don't match :(
Let me see what I can do to fix that. |
Every change to Python requires a NEWS entry. Please, add it using the blurb_it Web app or the blurb command-line tool. |
I guess we need to enable the Cirrus CI app in our organisation for this to work? @vstinner, is that something you can do? |
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Oh, I'm impressed, Cirrus-CI does provide FreeBSD CURRENT machine!
https://cirrus-ci.org/guide/FreeBSD/ I don't think that we should test too many FreeBSD versions. Honestly, only the latest stable should be way enough. We are already struggling with other CI issues on well supported platforms. For example, see recent GitHub Action incidents: https://www.githubstatus.com/history |
We (members of the FreeBSD project) certainly see the value in having FreeBSD buildbots participating in Python's standard CI configuration, and we're working on adding new ones to replace the ones that were removed. Some folks will soon travel to EuroBSDCon and so setting up new buildbots might take a little longer than I'd like, but they will come back. Cirrus-CI could make a good extra or stop-gap CI for FreeBSD. |
I updated this PR on main to re-run CI jobs, but I forgot that Cirrus-CI cannot be run until it's allowed in our GitHub cpython project :-) |
Cirrus CI should be installed and enabled for python/cpython. |
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
These should be updated to currently-supported images, i.e.
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
As I wrote previously, I would prefer to have a single FreeBSD job. Can we please start with just the latest stable, FreeBSD 13? |
12.4 results, for reference, from https://cirrus-ci.com/task/5457769084485632
|
A new FreeBSD 13.2 (amd64) buildbot was just set up by @zware: python/buildmaster-config#388 , That's so cool! 3 tests are failing: https://buildbot.python.org/all/#/builders/1223/builds/3
I wrote a fix for test_tempfile: #108964 It seems like @zware uses ZFS which doesn't support os.chflags(), whereas the test pass on my UFS filesystem. @sorcio wrote a fix for tarfile: #108950 I cannot reproduce the test_gdb failure locally (with gdb 13.1) on my 13.2-RELEASE-p2 VM. I would prefer to first focus on FreeBSD 13 before considering to fix tests on FreeBSD 12. |
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
.cirrus.yml
Outdated
- image: freebsd-12-4-release-amd64 | ||
- image: freebsd-13-2-release-amd64 |
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.
- image: freebsd-12-4-release-amd64 | |
- image: freebsd-13-2-release-amd64 | |
- image: freebsd-13-2-release-amd64 |
I modified your PR to change the command running tests and I removed the FreeBSD 12 job (for now), to re-run Cirrus-CI job. Can you try to add a NEWS entry? See: #91961 (comment) Or I can take over your PR and add it if you prefer. |
Yeah -- FreeBSD 12.x is EOL at the end of this year anyway, so I don't think it warrants much effort. I pasted the results just because I had already started the run. I started another with your suggested changes, at https://cirrus-ci.com/task/5969562588413952 On 13.2 it reports:
Tried via blurb-it. |
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Cirrus-CI is a hosted CI service that supports FreeBSD, Linux, macOS, and Winodws. Add a .cirrus.yml to provide CI coverage on pull requests for FreeBSD 12.4 and 13.2.
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.
LGTM. Let me now see if the latest job with new config (--with-pydebug) does pass: https://cirrus-ci.com/task/4982289931698176
Aha, |
The job was blocked. I added
|
Aha, now test_gdb decided to fail :-)
|
test_gdb should be skipped. The skip check currently checks for Darwin but I see no real reason for that. Checking for clang should be enough: Lines 58 to 60 in 5f3433f
PR: #108993 |
I'm working on a different fix for test_gdb when Python is built with clang: PR #108999. I would prefer to land it before enabling Cirrus CI on the main branch. |
There's a new commit after the PR has been approved. @vstinner, @erlend-aasland: please review the changes made to this pull request. |
Thanks @emaste! This PR wasn't merged earlier before because some tests were failing and there was no core dev available to handle issues specific to FreeBSD. Apparently, some happy FreeBSD developpers are now available and helped me to fix the last tests, so I merged your change to add the FreeBSD CI. Thanks @emaste for working on this PR! Obviously, thanks to Cirrus-CI platform for providing free budget of GCP VMs! Let's see how it goes in terms of budgets. We can may tune resources usage later depending on the consumption, and see with Cirrus-CI if they are fine with supporting us. By the way, I'm surprised how fast is the CI! While jobs can be queued for a few minutes, once they are launched, it's really fast! Faster than all other existing CIs (Ubuntu, macOS, Windows): FreeBSD is blazing fast! 🏎️ 🎉 For now, FreeBSD stays at Tier-3, since Tier-2 needs 2 active core developers fixing FreeBSD specific issues, whereas right now, I'm the only one who is maintaining the FreeBSD support. Maybe I can motivate another core dev to take care of FreeBSD ;-) For now, the CI is only enabled on the main branch and only FreeBSD 13 is tested by Cirrus CI and the newly added buildbot (by @zware). Later, we can consider testing other Python branches and more FreeBSD versions (CURRENT?). |
I scheduled a new job (by rebasing a PR on main): https://cirrus-ci.com/task/4946742500655104 Result: SUCCESS! All tests pass, great!
test.pythoninfo (interesting bits):
Tests:
|
I can confirm from local runs that compiling with clang -O0 makes it debuggable and pass (not skip) almost-all test_gdb tests on both Linux and FreeBSD. I will test with macOS as soon as I get the chance. Probably we can identify some specific optimization pass which is enabled by clang -Og and disable that one, instead of going -O0, if we are careful about different clang versions. Also the only tests that does skip because of "Unable to read information on python frame" is If we work on some of this stuff, maybe we can avoid some unnecessary skips. New issue? :) |
FYI In Fedora, we decided to build python3-debug with
This PR is closed and I also closed the related issue, so yes please. But I'm not sure of what you are proposing. Python cannot workaround C compiler / debugger limitations. The best that we can do is to skip test_gdb tests when gdb failed to retrieve some arguments because they are |
Cirrus-CI is a hosted CI service that supports FreeBSD, Linux, macOS,
and Winodws. Add a .cirrus.yml to provide CI coverage on pull requests
for FreeBSD 12.3 and 13.0.