-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore: update cibuildwheel #2040
Conversation
a19c03c
to
934d65a
Compare
934d65a
to
f321f9d
Compare
f321f9d
to
c2ca8c2
Compare
c2ca8c2
to
6186712
Compare
bc3c582
to
4eb8276
Compare
4eb8276
to
aa99681
Compare
aa99681
to
f05ea42
Compare
eacb737
to
44b986c
Compare
44b986c
to
b9fc60a
Compare
b9fc60a
to
22a7c4a
Compare
8172e31
to
08722f2
Compare
858b688
to
48bcc39
Compare
581d2c7
to
1ec85ee
Compare
1ec85ee
to
3cbc094
Compare
118b244
to
cb7fdf4
Compare
in #2103, you said:
I've cleaned that up a bit & could verify that together with #2153 & #2146, all tests are passing when run on cirrus CI which offers macOS arm64 runners: https://cirrus-ci.com/build/5870591818334208 |
cb7fdf4
to
f50ebab
Compare
cibuildwheel.toml
Outdated
] | ||
|
||
[tool.cibuildwheel.macos] | ||
archs = ["x86_64", "arm64"] |
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.
Can we do this without using an additional file? I like having the test runner defined in the main file.
If we can't avoid this, at the very least can we put this file under .github/workflows/
directory instead of the root directory?
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.
Can we do this without using an additional file?
It could be done but I'd rather not.
cibuildwheel is more than just a CI tool & as such, I see its config file living at project root just like the ones from flake8/isort/coverage.
It's more & more common for cibuildwheel users to put there config in pyproject.toml
and be able to just run cibuildwheel
, whatever the CI provider, or run locally (which I use extensively) to reproduce the steps that would happen on CI.
Running locally, I can just do cibuildwheel --platform macos --config-file cibuildwheel.toml
rather than remembering/typing all of the CI config from the GitHub workflow in my console.
This file is CI provider independent so if it were to be kept & moved, would you be okay to move it to .ci/
?
Another option if you're open to it would be to add a pyproject.toml
file with cibuildwheel config inside. It would simplify the workflow even more (& running locally) by removing the need to specify a config file:
[build-system]
requires = ["setuptools>=43"]
build-backend = "setuptools.build_meta"
[tool.cibuildwheel]
skip = ["pp*", "*-musllinux*"]
test-extras = "test"
test-command = [
"PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py",
"PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py"
]
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
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.
Another option if you're open to it would be to add a pyproject.toml file with cibuildwheel config inside.
Interesting. I had no idea. I think this is the best course, also because it seems natural to move flake8 / autopep8, isort and coveragerc configs in there as well as a next step.
CIBW_TEST_COMMAND: | ||
PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py && | ||
PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py | ||
CIBW_TEST_EXTRAS: test | ||
CIBW_BUILD: 'cp27-*' | ||
CIBW_SKIP: '*-musllinux_*' |
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.
Please let's keep this PR related to macOS only. There is another PR related to Musl Linux and I haven't decided yet on whether to provide wheels for that platform.
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.
cibuildwheel 1.12.0 will never build musllinux & there are no images for musllinux cp27.
I reverted the change adding cp 3.5 on linux.
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.
remove cp 3.11 as well.
39b9ad5
to
c00a732
Compare
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 the pyproject.toml
approach :)
Figured I'd comment as I've also looked at some CI/build improvements for psutil.
.github/workflows/build.yml
Outdated
- name: Run tests | ||
run: cibuildwheel . | ||
uses: pypa/cibuildwheel@v2.10.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.
You can also use this action (@v1.12.0
) for the Python 2 job to make it cleaner :)
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 forgot the action was already available in 1.12.0
Updated.
0e8804d
to
b342fc0
Compare
This commit updates the build workflow to use the latest cibuildwheel as a GitHub Action. cibuildwheel configuration is now in its own file (as there's no `pyproject.toml` yet) Signed-off-by: mayeut <[email protected]>
Signed-off-by: mayeut <[email protected]>
Signed-off-by: mayeut <[email protected]>
b342fc0
to
93f287a
Compare
Now that the |
(finally) merged. Thanks. |
...since pyproject.toml was introduced in #2040. CC @mayeut Signed-off-by: Giampaolo Rodola <[email protected]>
…upporter) Signed-off-by: Giampaolo Rodola <[email protected]>
* 'master' of https://github.com/giampaolo/psutil: add windows test for free physical mem giampaolo#2074 fix OSX tests broken by accident update HISTORY + give CREDITS for @arossert, @smoofra, @mayeut for giampaolo#2102, giampaolo#2156, giampaolo#2010 build fix for Mac OS, Apple Silicon (giampaolo#2010) Linux: fix missing SPEED_UNKNOWN definition (giampaolo#2156) Use system-level values for Windows virtual memory (giampaolo#2077) feature: use ABI3 for cp36+ (giampaolo#2102) fix py2 compatibility improve API speed benchmark script giampaolo#2102 fix: linter issues from giampaolo#2146 (giampaolo#2155) chore: skip test_cpu_freq on macOS arm64 (giampaolo#2146) pre-release + give CREDITS to @mayeut (PR giampaolo#2040) and @eallrich (new supporter) Fix a typo (giampaolo#2047) move isort and coverage config into pyproject.toml fix giampaolo#2021, fix giampaolo#1954, provide OSX arm64 bins + add pyproject.toml (giampaolo#2040) refactor git_log.py
Summary
fix [M1 macOS BigSur] no suitable image found #1954
mitigates [macOS Apple Silicon] Installation fails due to compiler errors #1945
closes Build universal2 wheel for Apple Silicon support #2021
Description
This commit updates the build workflow to use the latest cibuildwheel as a GitHub Action.
cibuildwheel configuration is now in its own file (as there's no
pyproject.toml
yet)Signed-off-by: mayeut [email protected]
Diff of wheels produced by GHA:
It's worth reminding that the macOS arm64 wheels can't be tested on GitHub Actions