Skip to content

Staging/update ci

Staging/update ci #260

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python_version: ['3.10']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python ${{ matrix.python_version }}
with:
python-version: ${{ matrix.python_version }}
- name: Create empty setup.py file
shell: bash
run: |
mkdir ${{ github.workspace }}/build
touch ${{ github.workspace }}/build/setup.py
- name: Get some sample wheels
run: |
python -m pip install cibuildwheel twine
cibuildwheel --output-dir ${{ github.workspace }}/wheelhouse ${{ github.workspace }}/build
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_24
CIBW_MANYLINUX_I686_IMAGE: manylinux_2_24
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_24
# Skip building PyPy wheels on all platforms
# Skip musllinux builds
CIBW_SKIP: "pp* *-musllinux*"
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_ALL: >
cd {project} && ./.github/scripts/install_deps.sh {package}
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-*"
CIBW_ENVIRONMENT: COMPILE_BINDINGS="True"
- uses: actions/upload-artifact@v2
with:
name: manylinux_wheels
path: ${{ github.workspace }}/wheelhouse
deploy_wheels:
name: Deploy wheels on test PyPI
runs-on: ubuntu-latest
needs: [build_wheels]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python 3.10
with:
python-version: '3.10'
- uses: actions/download-artifact@v2
with:
name: manylinux_wheels
- name: Upload to PyPI
shell: bash
run: |
python -m pip install twine
python -m twine upload --repository "testpypi" ${{ github.workspace }}/wheelhouse/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}