diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..0b3bdfc91d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,55 @@ +name: Build + +on: [push, pull_request] + +jobs: + build_wheels: + name: Build wheel on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + cibw_arch: aarch64 + + steps: + - uses: actions/checkout@master + with: + submodules: 'recursive' + + - name: Setup QEMU + if: startsWith(matrix.os,'ubuntu') + uses: docker/setup-qemu-action@v1 + with: + platforms: arm64 + + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: '3.9' + + - name: Build wheels + env: + # Only build on Python 3 and skip 32-bit builds + CIBW_BUILD: cp3?-* + CIBW_ARCHS: ${{ matrix.cibw_arch }} + run: | + python -m pip install cibuildwheel==1.9.0 + python -m cibuildwheel --output-dir wheelhouse + - name: Build source + if: startsWith(matrix.os, 'ubuntu') + run: | + python setup.py sdist --dist-dir=wheelhouse + - name: Release to pypi + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.pypi_password }} + run: | + python -m pip install --upgrade twine + twine upload wheelhouse/* + - name: Upload artifacts to github + uses: actions/upload-artifact@v1 + with: + name: wheels + path: ./wheelhouse diff --git a/tox.ini b/tox.ini index d883a1f973..438685cf15 100644 --- a/tox.ini +++ b/tox.ini @@ -14,6 +14,7 @@ deps = nose futurist lz4_dependency = py27,py35,py36,py37,py38: lz4 + [testenv] deps = {[base]deps} {[base]lz4_dependency}