Skip to content

Conversation

LecrisUT
Copy link
Collaborator

@LecrisUT LecrisUT commented Jun 9, 2023

For now this PR:

  • fixes build-wheel CI
  • refactors the CI into individual steps
  • allows to trigger CI, primarily build-wheel, via github UI
  • enables build wheel (only cp311-* variants) in default CI. Should not be necessary since the default CI runs them as well, but another sanity check doesn't hurt.
    One thing I've noticed. The wheel builds are not really used in uploading to PyPI. PyPI is building the package from source on their side as well. We should get the badge and put it on the README.md to keep track of it

Let me know if the tests done here are a bit excessive and I can move some of them to workflow_dispatch. E.g. we could make it run only python 3.11 and 3.12 on the normal CI.

@LecrisUT LecrisUT requested a review from lan496 June 9, 2023 14:17
@LecrisUT
Copy link
Collaborator Author

LecrisUT commented Jun 9, 2023

Hmm, only macos is failing 🤔

@atztogo
Copy link
Collaborator

atztogo commented Jun 10, 2023

Strange. It fails for small distortion cases.

How about following https://github.com/pypa/cibuildwheel#example-setup
cibuildwheel==2.13.0

      matrix:
        os: [ ubuntu-latest, windows-latest, macOS-latest ]

@LecrisUT
Copy link
Collaborator Author

Strange. It fails for small distortion cases.

How about following https://github.com/pypa/cibuildwheel#example-setup cibuildwheel==2.13.0

      matrix:
        os: [ ubuntu-latest, windows-latest, macOS-latest ]

Seeing the errors raised, I don't believe it is an os version issue, but let's give it a try anyway.

@LecrisUT
Copy link
Collaborator Author

@lan496 do you have a macos-latest or a macos-11? Why does the error occur only on latest?

@lan496
Copy link
Member

lan496 commented Jun 10, 2023

In my environment (macOS-13.3.1(a), arm64), all Python tests pass.

 pip install ".[test]"
 pytest python/test/ -v

@atztogo
Copy link
Collaborator

atztogo commented Jun 11, 2023

How about going with macos-11?

It seems cibuildwheel==2.13.1 updated yesterday.

@LecrisUT
Copy link
Collaborator Author

LecrisUT commented Jun 11, 2023

In my environment (macOS-13.3.1(a), arm64), all Python tests pass.

 pip install ".[test]"
 pytest python/test/ -v

Please test cibuildwheel explicitly. It might be specific to a Python version
https://cibuildwheel.readthedocs.io/en/stable/setup/#local

How about going with macos-11?

With macos-13 in beta, I suspect macos-11 will soon be removed.

It seems cibuildwheel==2.13.1 updated yesterday.

Checked the changelog, didn't seem to have anything relevant.

@LecrisUT
Copy link
Collaborator Author

Looking at the tests though, I wonder if they are implemented correctly

@LecrisUT
Copy link
Collaborator Author

Hmm, ctests fail on macos-12 and macos-13, but work on macos-11 (using apple-clang) at the test_broken_symmetry

@atztogo
Copy link
Collaborator

atztogo commented Jun 11, 2023

OK, only test_magnetic_symmetry.test_with_broken_symmetry fails. This should be treated as a different issue.

@lan496
Copy link
Member

lan496 commented Jun 11, 2023

Is it possible for non-sudo users to run this cibuildwheel in the first place? The current script tries to install libsymspg under /usr/local and it requires the sudo permission.

@LecrisUT
Copy link
Collaborator Author

LecrisUT commented Jun 11, 2023

OK, only test_magnetic_symmetry.test_with_broken_symmetry fails. This should be treated as a different issue.

That's only the ctests that fail, there are python tests failing as well. I suspect the python tests failing are related

Is it possible for non-sudo users to run this cibuildwheel in the first place? The current script tries to install libsymspg under /usr/local and it requires the sudo permission.

Try reverting 5c5f40d. I wonder why it doesn't run in a container. You could spin up a manual container though?

@atztogo
Copy link
Collaborator

atztogo commented Jun 11, 2023

That's only the ctests that fail, there are python tests failing as well. I suspect the python tests failing are related

I agree. But what I wanted to mean was many tests failed at 73a9f8d https://github.com/spglib/spglib/actions/runs/5222954738/jobs/9429134918.

@LecrisUT
Copy link
Collaborator Author

That's only the ctests that fail, there are python tests failing as well. I suspect the python tests failing are related

I agree. But what I wanted to mean was many tests failed at 73a9f8d https://github.com/spglib/spglib/actions/runs/5222954738/jobs/9429134918.

Yes, but these tests are still failing , it's just that the CI is failing earlier now at the ctest stage now

@LecrisUT LecrisUT force-pushed the test-PyPi branch 3 times, most recently from 9459bcd to e74f52d Compare June 19, 2023 13:50
@LecrisUT LecrisUT self-assigned this Jun 20, 2023
@LecrisUT LecrisUT force-pushed the test-PyPi branch 4 times, most recently from e23e007 to 3705faa Compare June 20, 2023 15:13
@LecrisUT LecrisUT mentioned this pull request Aug 9, 2023
4 tasks
@LecrisUT
Copy link
Collaborator Author

For now this should at least build the wheels for all distros. The remaining issue is with Fedora 39/rawhide, which is an usptream issue that will be fixed with scikit-build/scikit-build-core#463

@LecrisUT LecrisUT requested a review from lan496 August 14, 2023 09:27
@LecrisUT LecrisUT changed the base branch from test-PyPi to develop August 14, 2023 14:35
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Temporarily revert the wheel build to macos-11. Further testing framework needs to be fixed to handle macos-12

Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Numpy cannot be built at the moment. Needs development numpy version

Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
@LecrisUT LecrisUT changed the title Fix ci-build-wheel Refactor Github CI Aug 14, 2023
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
@LecrisUT LecrisUT requested a review from atztogo August 14, 2023 16:25
@LecrisUT LecrisUT assigned atztogo and lan496 and unassigned LecrisUT Aug 14, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: -0.05% ⚠️

Comparison is base (b7abe8d) 83.64% compared to head (a264f15) 83.60%.
Report is 13 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #287      +/-   ##
===========================================
- Coverage    83.64%   83.60%   -0.05%     
===========================================
  Files           23       23              
  Lines         6274     7942    +1668     
===========================================
+ Hits          5248     6640    +1392     
- Misses        1026     1302     +276     
Flag Coverage Δ
c_api 76.10% <ø> (+2.08%) ⬆️
fortran_api 36.82% <ø> (+0.58%) ⬆️
python_api 80.42% <ø> (ø)
unit_tests 1.24% <ø> (-72.77%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/spglib.c 72.31% <ø> (+2.03%) ⬆️

... and 21 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lan496 lan496 self-requested a review August 16, 2023 12:01
@LecrisUT LecrisUT merged commit 9957bfc into spglib:develop Aug 16, 2023
@LecrisUT LecrisUT deleted the test-PyPi branch January 26, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants