DNM: test publish to testpypi #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Wheel Builds | |
on: | |
push: | |
branches: [dnm-test-publish-to-pypi-again-test] | |
jobs: | |
sdist: | |
name: Build sdist | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
needs: ["upload_shared_wheels"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- name: Install deps | |
run: pip install -U setuptools-rust | |
- name: Build sdist | |
run: python setup.py sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./dist/* | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
environment: release | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.16.2 | |
- name: Build wheels | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
name: shared-wheel-builds | |
upload_shared_wheels: | |
name: Upload shared build wheels | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
needs: ["build_wheels", "build-mac-arm-wheels", "build-win32-wheels"] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: shared-wheel-builds | |
path: deploy | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: deploy | |
repository-url: https://test.pypi.org/legacy/ | |
build_wheels_aarch64: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
environment: release | |
permissions: | |
id-token: write | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.16.2 | |
- name: Build wheels | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_ARCHS_LINUX: aarch64 | |
CIBW_SKIP: cp36-* cp37-* cp311-* cp312-* pp* *musl* | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: wheelhouse/ | |
repository-url: https://test.pypi.org/legacy/ | |
build_wheels_aarch64_part_2: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
environment: release | |
permissions: | |
id-token: write | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.16.2 | |
- name: Build wheels | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_ARCHS_LINUX: aarch64 | |
CIBW_SKIP: cp36-* cp37-* cp38-* cp39-* cp310-* pp* *musl* | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: wheelhouse/ | |
repository-url: https://test.pypi.org/legacy/ | |
build_wheels_ppc64le: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
environment: release | |
permissions: | |
id-token: write | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.16.2 | |
- name: Build wheels | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_SKIP: cp36-* cp37-* cp39-* cp310-* cp311-* pp* *win32 | |
CIBW_ARCHS_LINUX: ppc64le | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: wheelhouse/ | |
repository-url: https://test.pypi.org/legacy/ | |
build_wheels_ppc64le_part2: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
environment: release | |
permissions: | |
id-token: write | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.16.2 | |
- name: Build wheels | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_SKIP: cp36-* cp37-* cp38-* cp312-* pp* *win32 *musl* | |
CIBW_ARCHS_LINUX: ppc64le | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: wheelhouse/ | |
repository-url: https://test.pypi.org/legacy/ | |
build_wheels_s390x: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
environment: release | |
permissions: | |
id-token: write | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.16.2 | |
- name: Build wheels | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_SKIP: cp36-* cp37-* cp39-* cp310-* cp311-* pp* *win32 *musl* | |
CIBW_ARCHS_LINUX: s390x | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: wheelhouse/ | |
repository-url: https://test.pypi.org/legacy/ | |
build_wheels_s390x_part2: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
environment: release | |
permissions: | |
id-token: write | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.16.2 | |
- name: Build wheels | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_SKIP: cp36-* cp37-* cp38-* cp312-* pp* *win32 *musl* | |
CIBW_ARCHS_LINUX: s390x | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: wheelhouse/ | |
repository-url: https://test.pypi.org/legacy/ | |
build-mac-arm-wheels: | |
name: Build wheels on macos for arm and universal2 | |
runs-on: macos-latest | |
environment: release | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build wheels | |
uses: joerick/[email protected] | |
env: | |
CIBW_BEFORE_ALL: rustup target add aarch64-apple-darwin | |
CIBW_ARCHS_MACOS: arm64 universal2 | |
CIBW_BEFORE_BUILD: pip install -U setuptools-rust | |
CIBW_ENVIRONMENT: CARGO_BUILD_TARGET="aarch64-apple-darwin" PYO3_CROSS_LIB_DIR="/Library/Frameworks/Python.framework/Versions/$(python -c 'import sys; print(str(sys.version_info[0])+"."+str(sys.version_info[1]))')/lib/python$(python -c 'import sys; print(str(sys.version_info[0])+"."+str(sys.version_info[1]))')" | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
name: shared-wheel-builds | |
build-win32-wheels: | |
name: Build wheels on win32 | |
runs-on: windows-latest | |
environment: release | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
architecture: 'x86' | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: i686-pc-windows-msvc | |
- name: Force win32 rust | |
run: rustup default stable-i686-pc-windows-msvc | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.16.2 | |
- name: Build wheels | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_SKIP: cp36-* cp37-* pp* *amd64 *musl* | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
name: shared-wheel-builds | |
retworkx-compat-build: | |
name: Build retworkx | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
needs: ["upload_shared_wheels"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.10' | |
- name: Install deps | |
run: pip install -U setuptools-rust wheel build | |
- name: Build sdist | |
run: python setup.py bdist_wheel | |
env: | |
RUSTWORKX_PKG_NAME: retworkx | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./dist/* | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ |