@@ -199,3 +199,61 @@ jobs:
199199 source ci/upload_wheels.sh
200200 set_upload_vars
201201 upload_wheels
202+
203+ # Build Pyodide wheels and upload them to Anaconda.org
204+ # NOTE: this job must be kept in sync with the emscripten job in unit-tests.yml.
205+ # The difference is that this does not run the tests after building the wheels.
206+ build_pyodide_wheels :
207+ name : Build Pyodide wheels
208+ # Run on schedule, manual (workflow dispatch), and push events
209+ # Skip on PRs, because these are running in the unit tests job already
210+ if : >-
211+ (github.event_name == 'schedule') ||
212+ (github.event_name == 'workflow_dispatch') &&
213+ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))
214+ runs-on : ubuntu-22.04
215+ steps :
216+ - name : Checkout pandas Repo
217+ uses : actions/checkout@v4
218+ with :
219+ fetch-depth : 0
220+
221+ - name : Set up Python for Pyodide
222+ id : setup-python
223+ uses : actions/setup-python@v5
224+ with :
225+ python-version : ' 3.11.3'
226+
227+ - name : Set up Emscripten toolchain
228+ uses : mymindstorm/setup-emsdk@v14
229+ with :
230+ version : ' 3.1.46'
231+ actions-cache-folder : emsdk-cache
232+
233+ - name : Install pyodide-build
234+ run : pip install "pyodide-build==0.25.1"
235+
236+ - name : Build pandas for Pyodide
237+ # Here, upload_wheels.sh requires artifacts to be in ./wheelhouse/
238+ run : |
239+ mkdir -p wheelhouse
240+ pyodide build --outdir wheelhouse
241+
242+ - uses : actions/upload-artifact@v4
243+ with :
244+ name : pyodide_wheel
245+ path : ./wheelhouse/*.whl
246+
247+ - name : Upload Pyodide wheels
248+ if : >-
249+ success() &&
250+ (github.event_name == 'schedule') ||
251+ (github.event_name == 'workflow_dispatch') &&
252+ (github.repository == 'pandas-dev/pandas')
253+ shell : bash -el {0}
254+ env :
255+ PANDAS_NIGHTLY_UPLOAD_TOKEN : ${{ secrets.PANDAS_NIGHTLY_UPLOAD_TOKEN }}
256+ run : |
257+ source ci/upload_wheels.sh
258+ set_upload_vars
259+ upload_wheels
0 commit comments