DNM: test publish to testpypi #18
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-use-trusted-publisher-test-pypi] | |
jobs: | |
sdist: | |
name: Build sdist | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
needs: ["build_wheels", "build-win32-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 | |
permissions: | |
id-token: write | |
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: 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: | |
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 | |
permissions: | |
id-token: write | |
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: 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-win32-wheels: | |
name: Build wheels on win32 | |
runs-on: windows-latest | |
environment: release | |
permissions: | |
id-token: write | |
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: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: wheelhouse/ | |
repository-url: https://test.pypi.org/legacy/ |