OS X wheels #848
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: OS X wheels | |
on: | |
push: | |
branches: [ "*" ] | |
tags: [ "*" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
- cron: '15 1 * * *' | |
jobs: | |
osx-monetdb-build: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
branch: [default] | |
steps: | |
- | |
name: brew packages | |
run: brew install bison | |
- | |
name: find bison executable | |
run: echo "BISON=`brew list bison | grep 'bison$'`" >> $GITHUB_ENV | |
- | |
name: download MonetDB | |
run: curl https://www.monetdb.org/hg/MonetDB/archive/${{ matrix.branch }}.tar.bz2 -O | |
- | |
name: extract MonetDB | |
run: tar jxvf ${{ matrix.branch }}.tar.bz2 | |
- | |
name: build monetdb | |
run: | | |
mkdir MonetDB-${{ matrix.branch }}/build | |
cd MonetDB-${{ matrix.branch }}/build | |
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/monetdb \ | |
-DPY3INTEGRATION=OFF \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DASSERT=OFF \ | |
-DRINTEGRATION=OFF \ | |
-DBISON_EXECUTABLE=$BISON | |
make install -j3 | |
- | |
uses: actions/upload-artifact@v4 | |
with: | |
name: monetdb-osx-${{ matrix.branch }} | |
path: $HOME/monetdb | |
osx-wheel: | |
needs: [osx-monetdb-build] | |
continue-on-error: true | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] | |
branch: [default] | |
env: | |
MONETDB_BRANCH: ${{ matrix.branch }} | |
MONETDBE_INCLUDE_PATH: '$HOME/monetdb/include' | |
MONETDBE_LIBRARY_PATH: '$HOME/monetdb/lib' | |
LD_LIBRARY_PATH: '$HOME/monetdb/lib' | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
uses: actions/download-artifact@v4 | |
with: | |
name: monetdb-osx-${{ matrix.branch }} | |
path: /usr/local/Cellar/monetdb | |
- | |
name: Homebrew link monetdb | |
run: brew link monetdb | |
- | |
name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- | |
name: prepare virtuale env | |
run: python3 -m venv venv | |
- | |
name: Install Python dependencies | |
run: venv/bin/pip install --upgrade pip wheel delocate pytest build | |
- | |
name: Compile and install MonetDBe-python | |
run: venv/bin/pip install -e ".[test]" | |
- | |
name: make binary wheel | |
run: venv/bin/pyproject-build | |
- | |
name: Delocate binary wheel | |
run: venv/bin/delocate-wheel --ignore-missing-dependencies -v dist/*.whl | |
- | |
name: Publish OS X binary wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: monetdbe-osx-wheel-${{ matrix.branch }}-${{ matrix.python-version }} | |
path: dist/*.whl | |
osx-test-wheel: | |
continue-on-error: true | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] | |
branch: [default] | |
needs: [osx-wheel] | |
steps: | |
- | |
name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- | |
name: prepare virtuale env | |
run: python3 -m venv venv | |
- | |
name: Install Python dependencies | |
run: venv/bin/pip install --upgrade pip pytest | |
- | |
name: download OS X binary wheels | |
uses: actions/download-artifact@v4 | |
with: | |
name: monetdbe-osx-wheel-${{ matrix.branch }}-${{ matrix.python-version }} | |
- | |
name: list allowed wheel versions | |
run: venv/bin/pip debug --verbose | |
- | |
name: Install Python wheel | |
run: venv/bin/pip install *.whl | |
- | |
name: Print version info | |
run: venv/bin/python -c "from monetdbe._cffi.util import print_info; print_info()" |