diff options
| author | Michael Elsdörfer <michael@elsdoerfer.info> | 2020-06-10 08:47:01 +0100 |
|---|---|---|
| committer | Michael Elsdörfer <michael@elsdoerfer.info> | 2020-06-14 17:38:00 +0100 |
| commit | 958da5e5e9ce71d1be7580e45bdb142b019a9791 (patch) | |
| tree | bb80e8403ea7455aba56b40b6db8cc37f1f2b0f4 /.github/workflows/build-python-package.yml | |
| parent | 5846622c4ddab56deae4bdeeec1c176828072a77 (diff) | |
Add Github action workflow to build Python wheels.
Diffstat (limited to '.github/workflows/build-python-package.yml')
| -rw-r--r-- | .github/workflows/build-python-package.yml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml new file mode 100644 index 000000000..0a610881a --- /dev/null +++ b/.github/workflows/build-python-package.yml @@ -0,0 +1,48 @@ +name: Build Python Package + +on: [push, pull_request] + +jobs: + build_wheels: + name: Build wheel on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-18.04, macos-latest] + + steps: + - uses: actions/checkout@v1 + + - uses: actions/setup-python@v1 + name: Install Python + with: + python-version: '3.7' + + - name: Install cibuildwheel + run: | + python -m pip install cibuildwheel==1.4.2 + + - name: Install build tools for OSX + if: startsWith(matrix.os, 'macos') + run: | + brew install automake + + - name: Build wheels on Linux + if: startsWith(matrix.os, 'macos') != true + env: + CIBW_BEFORE_BUILD: cd src/runtime/c && autoreconf -i && ./configure && make && make install + run: | + python -m cibuildwheel src/runtime/python --output-dir wheelhouse + + - name: Build wheels on OSX + if: startsWith(matrix.os, 'macos') + env: + CIBW_BEFORE_BUILD: cd src/runtime/c && glibtoolize && autoreconf -i && ./configure && make && make install + run: | + python -m cibuildwheel src/runtime/python --output-dir wheelhouse + + - uses: actions/upload-artifact@v1 + with: + name: wheels + path: ./wheelhouse |
