Skip to content
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 Actions: Build platform-independent wheels of sagemath-environment, sage-setup, sage-sws2rst for PyPI #37099

Merged
merged 5 commits into from
May 2, 2024

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Jan 18, 2024

We already build platform wheels for sagemath-{objects,categories,repl} for PyPI using cibuildwheel.
Here we add building of platform-independent wheels for sagemath-environment and sage-setup and sage-sws2rst to the GH Actions workflow. (They are needed, for example, for pyodide / jupyterlite.)

To test locally: make pypi-noarch-wheels

We also update actions/upload-artifact, actions/download-artifact to v4. This requires a restructuring, as we can no longer upload the wheels for different architectures (built by separate matrix jobs) to the same artifact: https://github.com/actions/upload-artifact?tab=readme-ov-file#not-uploading-to-the-same-artifact
Instead we upload them as separate artifacts and deploy them to PyPI directly from the job that built them.

This is:

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@mkoeppe mkoeppe self-assigned this Feb 5, 2024
@mkoeppe mkoeppe changed the title GH Actions: Build platform-independent wheels for PyPI GH Actions: Build platform-independent wheels of sagemath-environment, sage-setup, sage-sws2rst for PyPI Feb 26, 2024
@mkoeppe mkoeppe requested a review from kiwifb February 26, 2024 17:26
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 15, 2024

@kiwifb Any thoughts on this one here?

@kiwifb
Copy link
Member

kiwifb commented Mar 15, 2024

I am not very hot on the subject of producing that kind of wheels. I am not qualified to review this. I should have said two weeks ago but I was sick.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 15, 2024

No worries!

@mkoeppe mkoeppe force-pushed the gh_actions_noarch_wheels branch 2 times, most recently from 0e6069f to f971ead Compare April 1, 2024 00:41
Copy link

github-actions bot commented Apr 1, 2024

Documentation preview for this PR (built with commit c3eb320; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 26, 2024

Will you test the updated workflow somewhere?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 26, 2024

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 26, 2024

Completed successfully

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 26, 2024

The artifacts are now split by architecures by the changed name ${{ matrix.os }}-${{ matrix.arch }}-wheels.

I don't know where the artifacts are used downstream. Are they used? If so, this change may break something downstream.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 26, 2024

The artifacts are not used by anything. They are uploaded only so that one can download them manually if something needs to be checked.

Copy link
Collaborator

@kwankyu kwankyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 26, 2024

Thank you!

vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 28, 2024
…gemath-environment, sage-setup, sage-sws2rst for PyPI

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
We already build platform wheels for
**sagemath-{objects,categories,repl}** for PyPI using cibuildwheel.
Here we add building of platform-independent wheels for **sagemath-
environment** and **sage-setup** and **sage-sws2rst** to the GH Actions
workflow. (They are needed, for example, for pyodide / jupyterlite.)

To test locally: `make pypi-noarch-wheels`

We also update actions/upload-artifact, actions/download-artifact to v4.
This requires a restructuring, as we can no longer upload the wheels for
different architectures (built by separate matrix jobs) to the same
artifact: https://github.com/actions/upload-artifact?tab=readme-ov-
file#not-uploading-to-the-same-artifact
Instead we upload them as separate artifacts and deploy them to PyPI
directly from the job that built them.

This is:
- part of sagemath#31251

<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37099
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
@vbraun vbraun merged commit 248fde3 into sagemath:develop May 2, 2024
16 checks passed
@mkoeppe mkoeppe added this to the sage-10.4 milestone May 2, 2024
@mkoeppe mkoeppe deleted the gh_actions_noarch_wheels branch May 6, 2024 19:49
vbraun pushed a commit to vbraun/sage that referenced this pull request May 11, 2024
… for GitHub Release assets

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- Fixes sagemath#37752, at least for the non-"huge" tarballs (we skip the "huge"
tarballs here).
- More options for `sage -package download` (a subset of what `sage
-package list` supports)
- Also remove some zombie package files

Test run: https://github.com/mkoeppe/sage/actions/workflows/dist.yml

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- Depends on sagemath#37099 (merged to resolve merge conflict)
    
URL: sagemath#37762
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request May 12, 2024
… for GitHub Release assets

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- Fixes sagemath#37752, at least for the non-"huge" tarballs (we skip the "huge"
tarballs here).
- More options for `sage -package download` (a subset of what `sage
-package list` supports)
- Also remove some zombie package files

Test run: https://github.com/mkoeppe/sage/actions/workflows/dist.yml

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- Depends on sagemath#37099 (merged to resolve merge conflict)
    
URL: sagemath#37762
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request May 12, 2024
… for GitHub Release assets

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- Fixes sagemath#37752, at least for the non-"huge" tarballs (we skip the "huge"
tarballs here).
- More options for `sage -package download` (a subset of what `sage
-package list` supports)
- Also remove some zombie package files

Test run: https://github.com/mkoeppe/sage/actions/workflows/dist.yml

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

- Depends on sagemath#37099 (merged to resolve merge conflict)
    
URL: sagemath#37762
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request May 31, 2024
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

The change made in sagemath#37099 to accommodate the new design of
actions/{up,down}load-artifact@v4 broke the upload of macOS wheels to
PyPI (see https://github.com/sagemath/sage/actions/runs/9234698750/job/2
5408786962#step:8:23); this was masked so far because the build of macOS
wheels was broken until sagemath#36525.

Here we revert to using a separate job that uploads all platform wheels.
This uses the new keywords `pattern` and `merge-multiple` of
actions/download-artifact@v4

Example run:
https://github.com/mkoeppe/sage/actions/runs/9291646178/job/25572343853

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38111
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants