-
Notifications
You must be signed in to change notification settings - Fork 7
134 lines (130 loc) · 3.89 KB
/
osx.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
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()"