diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0ed26d3 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: Build + +on: [push, pull_request] + +# Skip Python versions: +# PyPy: Different C headers +# Python 2.7: Python libary uses Python 3 syntax +env: + CIBW_SKIP: "pp* cp27-* *-manylinux_i686 *-win32" + CIBW_BEFORE_ALL_LINUX: "yum install -y gcc g++ python3-devel" + CIBW_BUILD_VERBOSITY: 2 + CIBW_TEST_COMMAND: "python {project}/tests/run_all_tests.py" + +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 + + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: '3.7' + + - name: Install cibuildwheel + run: | + python -m pip install cibuildwheel==1.7.1 + + - name: Build wheels + run: | + python -m cibuildwheel --output-dir wheelhouse + + - uses: actions/upload-artifact@v2 + with: + path: ./wheelhouse/*.whl