Skip to content

Commit f3b3dc5

Browse files
authored
Merge pull request numpy#27353 from agriyakhetarpal/chore/separate-jobs-for-nightlies
MNT, CI: Use separate jobs for WASM wheel builds/uploads
2 parents d58f191 + ad4dabf commit f3b3dc5

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/emscripten.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ concurrency:
3232
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
3333
cancel-in-progress: true
3434

35-
permissions:
36-
contents: read # to fetch code (actions/checkout)
3735

3836
jobs:
3937
build-wasm-emscripten:
38+
permissions:
39+
contents: read # to fetch code (actions/checkout)
4040
name: Build NumPy distribution for Pyodide
4141
runs-on: ubuntu-22.04
4242
# To enable this workflow on a fork, comment out:
@@ -57,14 +57,27 @@ jobs:
5757
with:
5858
name: cp312-pyodide_wasm32
5959
path: ./wheelhouse/*.whl
60+
if-no-files-found: error
61+
62+
# Push to https://anaconda.org/scientific-python-nightly-wheels/numpy
63+
# WARNING: this job will overwrite any existing WASM wheels.
64+
upload-wheels:
65+
name: Upload NumPy WASM wheels to Anaconda.org
66+
runs-on: ubuntu-22.04
67+
permissions: {}
68+
needs: [build-wasm-emscripten]
69+
if: >-
70+
(github.repository == 'numpy/numpy') &&
71+
(github.event_name == 'workflow_dispatch' && github.event.inputs.push_wheels == 'true') ||
72+
(github.event_name == 'schedule')
73+
steps:
74+
- name: Download wheel artifact(s)
75+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
76+
with:
77+
path: wheelhouse/
78+
merge-multiple: true
6079

61-
# Push to https://anaconda.org/scientific-python-nightly-wheels/numpy
62-
# WARNING: this job will overwrite any existing WASM wheels.
6380
- name: Push to Anaconda PyPI index
64-
if: >-
65-
(github.repository == 'numpy/numpy') &&
66-
(github.event_name == 'workflow_dispatch' && github.event.inputs.push_wheels == 'true') ||
67-
(github.event_name == 'schedule')
6881
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # v0.5.0
6982
with:
7083
artifacts_path: wheelhouse/

0 commit comments

Comments
 (0)