Skip to content

Commit

Permalink
Fix python release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jackh726 committed Feb 11, 2025
1 parent 453d95c commit 1d9a7fb
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
command: sdist
args: --out dist --manifest-path pybigtools/Cargo.toml
- name: Upload sdist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-sdist
path: dist

linux:
Expand All @@ -50,9 +50,9 @@ jobs:
#sccache: 'true'
manylinux: '2_28'
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-linux-${{ matrix.target }}
path: dist

windows:
Expand All @@ -75,9 +75,9 @@ jobs:
args: --release --out dist --find-interpreter --manifest-path pybigtools/Cargo.toml
#sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-windows-${{ matrix.target }}
path: dist

macos:
Expand All @@ -99,9 +99,9 @@ jobs:
args: --release --out dist --find-interpreter --manifest-path pybigtools/Cargo.toml
#sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-macos-${{ matrix.target }}
path: dist

publish:
Expand All @@ -116,7 +116,9 @@ jobs:
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
path: wheels
pattern: wheels-*
merge-multiple: true
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
with:
Expand Down
110 changes: 110 additions & 0 deletions .github/workflows/test-release-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Test PyPI publish

on:
workflow_dispatch:

permissions:
contents: read

jobs:
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist --manifest-path pybigtools/Cargo.toml
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist

linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [
{ target: x86_64, remote: true },
#{ target: x86, remote: false },
{ target: aarch64, remote: true},
]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target.target }}
args: --release --out dist --find-interpreter --manifest-path pybigtools/Cargo.toml --no-default-features ${{ matrix.target.remote && '--features remote' || '' }}
#sccache: 'true'
manylinux: '2_28'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.target }}
path: dist

windows:
runs-on: windows-latest
strategy:
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter --manifest-path pybigtools/Cargo.toml
#sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.target }}
path: dist

macos:
runs-on: macos-latest
strategy:
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter --manifest-path pybigtools/Cargo.toml
#sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.target }}
path: dist

publish:
runs-on: ubuntu-latest
permissions:
id-token: write

needs: [linux, windows, macos, sdist]

steps:
- uses: actions/download-artifact@v3
with:
path: wheels
pattern: wheels-*
merge-multiple: true
- run: ls -R wheels

0 comments on commit 1d9a7fb

Please sign in to comment.