This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
build(deps): bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #1
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 | |
on: | |
pull_request: | |
release: | |
types: | |
- published | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-18.04, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
# Include all history and tags | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v2 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==1.6.4 | |
- name: Build wheels | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_SKIP: pp* cp27-win* | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: ./wheelhouse/*.whl | |
build_wheels_aarch64: | |
name: Build wheels on linux ${{ matrix.arch }} | |
strategy: | |
matrix: | |
arch: [aarch64] | |
fail-fast: false | |
runs-on: ubuntu-18.04 | |
env: | |
img: quay.io/pypa/manylinux2014_${{ matrix.arch }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v1 | |
- name: Available platforms | |
run: echo ${{ steps.qemu.outputs.platforms }} | |
- name: Setup environment | |
run: | | |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ | |
${{ env.img }} bash -c \ | |
' | |
for pyv in `which /opt/python/*/bin/python`; do | |
pyenv=.pyenv`echo $pyv | grep -o -E '[0-9]+' | head -1 | sed -e 's/^0\+//'`; | |
$pyv -m venv $pyenv; | |
done | |
' | |
- name: Install tools | |
run: | | |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ | |
${{ env.img }} bash -c \ | |
' | |
for pyenv in `find . -name activate`; do | |
source $pyenv; | |
pip install -U setuptools wheel Cython; | |
deactivate; | |
done | |
' | |
- name: Make wheel | |
run: | | |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ | |
${{ env.img }} bash -c \ | |
' | |
for pyenv in `find . -name activate`; do | |
source $pyenv; | |
python setup.py bdist_wheel; | |
deactivate; | |
done | |
' | |
- name: Repair wheel wheel | |
run: | | |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ | |
${{ env.img }} bash -c \ | |
' | |
for whl in `find dist -name "*whl"`; do | |
auditwheel repair $whl --wheel-dir wheelhouse/ | |
done | |
' | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# Include all history and tags | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v2 | |
name: Install Python | |
with: | |
python-version: '3.7' | |
- name: Build sdist | |
run: | | |
pip install cython | |
python setup.py sdist | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: dist/*.tar.gz | |
upload_pypi: | |
needs: [build_wheels, build_sdist, build_wheels_aarch64] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/[email protected] | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} | |
# To test: repository_url: https://test.pypi.org/legacy/ |