Skip to content

OS X wheels

OS X wheels #699

Workflow file for this run

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: 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=/usr/local/Cellar/monetdb/11.40.1 \
-DPY3INTEGRATION=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DASSERT=OFF \
-DRINTEGRATION=OFF \
-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison
make install -j3
-
uses: actions/upload-artifact@v4
with:
name: monetdb-osx-${{ matrix.branch }}
path: /usr/local/Cellar/monetdb
osx-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]
env:
MONETDB_BRANCH: ${{ matrix.branch }}
MONETDBE_INCLUDE_PATH: '/usr/local/Cellar/monetdb/11.40.1/include'
MONETDBE_LIBRARY_PATH: '/usr/local/Cellar/monetdb/11.40.1/lib'
LD_LIBRARY_PATH: '/usr/local/Cellar/monetdb/11.40.1/lib'
needs: [osx-monetdb-build]
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: downlod 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()"