Skip to content

Commit

Permalink
Merge branch 'py_dist_update' into 'develop'
Browse files Browse the repository at this point in the history
Python wheels: update workflow

See merge request mhm/mhm!180
  • Loading branch information
MuellerSeb committed Jan 27, 2025
2 parents afa78a8 + 2a61c63 commit 456661f
Show file tree
Hide file tree
Showing 3 changed files with 471 additions and 16 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
build_sdist:
name: sdist
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -30,11 +30,12 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install build
python -m build --sdist
python -m build --sdist --outdir dist-sdist .
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
name: dist-sdist
path: dist-sdist/*.tar.gz

build_wheels:
name: wheels for ${{ matrix.cfg.os }} / ${{ matrix.cfg.arch }}
Expand All @@ -43,8 +44,9 @@ jobs:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-latest, arch: x86_64 }
- { os: ubuntu-24.04, arch: x86_64 }
- { os: macos-13, arch: x86_64 }
- { os: macos-14, arch: arm64 }

steps:
- uses: actions/checkout@v4
Expand All @@ -56,20 +58,22 @@ jobs:
env:
CIBW_ARCHS: ${{ matrix.cfg.arch }}
with:
output-dir: dist
output-dir: dist-wheel-${{ matrix.cfg.os }}-${{ matrix.cfg.arch }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./dist/*.whl
name: dist-wheel-${{ matrix.cfg.os }}-${{ matrix.cfg.arch }}
path: ./dist-wheel-${{ matrix.cfg.os }}-${{ matrix.cfg.arch }}/*.whl

upload_to_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
pattern: dist-*
merge-multiple: true
path: dist

- name: Publish to Test PyPI
Expand Down
Loading

0 comments on commit 456661f

Please sign in to comment.