Build & Publish TEST pypi #54
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: Build & Publish TEST pypi | |
on: workflow_dispatch | |
jobs: | |
build_binary_native: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, windows-2019, macos-11] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_SKIP: pp* | |
CIBW_ARCHS_MACOS: all | |
CIBW_BEFORE_BUILD: python -c "import shutil ; shutil.copyfile('tools/setup-pypi.cfg','setup.apsw')" | |
CIBW_TEST_COMMAND: python -m apsw.tests -v | |
APSW_HEAVY_DURATION: 2 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: wheelhouse | |
path: ./wheelhouse/*.whl | |
build_binary_qemu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_SKIP: pp* | |
CIBW_ARCHS_LINUX: aarch64 | |
CIBW_PROJECT_REQUIRES_PYTHON: ">= 3.10" | |
CIBW_BEFORE_BUILD: python -c "import shutil ; shutil.copyfile('tools/setup-pypi.cfg','setup.apsw')" | |
CIBW_TEST_COMMAND: python -m apsw.tests -v | |
APSW_HEAVY_DURATION: 2 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: wheelhouse | |
path: ./wheelhouse/*.whl | |
build_source: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
- name: Create source dist | |
run: python setup.py sdist --for-pypi | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: wheelhouse | |
path: ./dist/* | |
pypi_publish: | |
needs: [build_source, build_binary_native, build_binary_qemu] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- name: Stage wheels | |
uses: actions/download-artifact@v3 | |
with: | |
name: wheelhouse | |
path: dist | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |