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

BLD, CI: Upload Emscripten/Pyodide nightlies to Anaconda index (scientific-python-nightly-wheels) #58647

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

agriyakhetarpal
Copy link
Contributor

Description

This PR duplicates the Pyodide wheel builder job that was set up in #57896 into wheels.yml, except that in this case the wheel is not tested, it is just compiled via the Emscripten toolchain, and subsequently, the upload_wheels.sh script will be used with the appropriate repository secret to upload the Pyodide wheel to https://anaconda.org/scientific-python-nightly-wheels/pandas.

At this time, there is no reliable way to not duplicate the steps set up for the upload process, unless this is moved to a separate job in its own YAML file or converted to a reusable workflow of some sort.

Additional context

  1. This is how this was done for NumPy: CI, BLD: Push NumPy's Emscripten/Pyodide wheels nightly to Anaconda.org PyPI index numpy/numpy#26134
  2. At a later time, these wheels will be used to configure interactive documentation via JupyterLite through jupyterlite-sphinx that acts upon doctest-based examples. The blocker in that regard is setting up a method to pre-install these wheels to provide them to the jupyterlite-pyodide-kernel and make them available at run time, and progress is being made in this area.

if: >-
(github.event_name == 'schedule') ||
(github.event_name == 'workflow_dispatch') &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This condition can probably be skipped, because the intention of this PR is not to upload to https://anaconda.org/multibuild-wheels-staging/pandas,

Comment on lines +241 to +246

- uses: actions/upload-artifact@v4
with:
name: pyodide_wheel
path: ./wheelhouse/*.whl

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have included this step in case it is needed to inspect the binary and do some debugging – happy to remove it based on what is suggested.

Comment on lines +247 to +259
- name: Upload Pyodide wheels
if: >-
success() &&
(github.event_name == 'schedule') ||
(github.event_name == 'workflow_dispatch') &&
(github.repository == 'pandas-dev/pandas')
shell: bash -el {0}
env:
PANDAS_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.PANDAS_NIGHTLY_UPLOAD_TOKEN }}
run: |
source ci/upload_wheels.sh
set_upload_vars
upload_wheels
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A idea I had was to separate the wheel upload step in the job above this and make it its own job – with that, that job can download artifacts that would be uploaded by the wheel builder jobs (therefore, the artifacts would be shared between jobs). This way, it should be possible to upload all wheels at the same time in an isolated job. This is just a suggestion and is not related to this PR, but could be helpful in general to help remove a few redundant conditions.

@agriyakhetarpal agriyakhetarpal changed the title BLD: BLD, CI: Upload Emscripten/Pyodide nightlies to Anaconda index (scientific-python-nightly-wheels) BLD, CI: Upload Emscripten/Pyodide nightlies to Anaconda index (scientific-python-nightly-wheels) May 8, 2024
@agriyakhetarpal agriyakhetarpal changed the title BLD, CI: Upload Emscripten/Pyodide nightlies to Anaconda index (scientific-python-nightly-wheels) BLD, CI: Upload Emscripten/Pyodide nightlies to Anaconda index (scientific-python-nightly-wheels) May 8, 2024
@lithomas1 lithomas1 added the Build Library building on various platforms label May 16, 2024
@lithomas1
Copy link
Member

Looks like cibuildwheel might be adding pyodide here
pypa/cibuildwheel#1456

Maybe we should wait for that PR?

@agriyakhetarpal
Copy link
Contributor Author

agriyakhetarpal commented May 16, 2024

Hi @lithomas1, I would advise holding off on that PR – it's stalled for many reasons, for example the fact that Pyodide does releases bi-annually with updated Python versions and Emscripten versions which will break the ABI – i.e., while the specification for breaking changes and ABI stability for the platform might exist, it has not been formalised through the means of a PEP yet; and because PyPI has not yet received support through a PEP for formalising the wasm32 tag through packaging and pip, which means that micropip remains the only choice for installing these wheels (which, then, does not come with resolvelib, AFAIK) and wheels need to be pushed to alternative indices – Anaconda.org, in this case. However, out-of-tree build support in the ecosystem is improving day by day; it could be a viable candidate sometime soon. In the meantime, this current method of building should be a reasonable alternative since it's tightly integrated into and similar to Pyodide's in-tree builds with the pyodide build CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants