Skip to content

Commit 91088e0

Browse files
authored
Update build_wheels_and_publish.yml
1 parent 593f427 commit 91088e0

File tree

1 file changed

+11
-35
lines changed

1 file changed

+11
-35
lines changed

.github/workflows/build_wheels_and_publish.yml

+11-35
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414
CIBW_BUILD_VERBOSITY: "1"
1515

1616
jobs:
17-
build-wheels:
17+
build-wheels-and-dist:
1818
name: Build ${{ matrix.python-version }} wheels on ${{ matrix.os }}
1919
runs-on: ${{ matrix.os }}
2020
strategy:
@@ -30,50 +30,26 @@ jobs:
3030
with:
3131
python-version: "3.10"
3232

33-
- name: Setup Mac
34-
if: runner.os == 'macOS'
33+
- name: Install numpy
3534
run: |
35+
python -m pip install --upgrade pip
3636
python -m pip install numpy h5py versioneer
3737
38-
- name: Setup Linux
39-
if: runner.os == 'Linux'
40-
run: |
41-
python -m pip install numpy h5py versioneer
42-
43-
- name: Build wheels
38+
- name: Build source dist and wheels
4439
run: |
4540
sudo ln -s /opt/homebrew/bin/gfortran-11 /opt/homebrew/bin/gfortran || true
46-
python -m pip install meson ninja build
41+
python -m pip install setuptools wheel twine numpy build meson ninja
4742
pip install .
48-
python -m build --wheel --outdir wheelhouse
43+
python -m build
4944
- uses: actions/upload-artifact@v3
5045
with:
51-
path: ./wheelhouse/*.whl
52-
53-
build-source-dist:
54-
name: Build source dist
55-
runs-on: ubuntu-latest
56-
steps:
57-
- uses: actions/checkout@v3
58-
with:
59-
fetch-depth: 0
60-
- uses: actions/setup-python@v4
61-
name: Install Python
62-
with:
63-
python-version: "3.10"
64-
65-
- name: Build dist
66-
run: |
67-
python -m pip install --upgrade pip
68-
pip install setuptools wheel twine numpy build meson ninja
69-
pip install .
70-
python -m build
71-
- uses: actions/upload-artifact@v3
72-
with:
73-
path: ./dist/*.tar.gz
46+
path: ./dist/*.tar.gz
47+
- uses: actions/upload-artifact@v3
48+
with:
49+
path: ./dist/*.whl
7450

7551
publish:
76-
needs: [build-wheels, build-source-dist]
52+
needs: [build-wheels-and-dist]
7753
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
7854
runs-on: ${{ matrix.os }}
7955
strategy:

0 commit comments

Comments
 (0)