-
Notifications
You must be signed in to change notification settings - Fork 7
103 lines (94 loc) · 3.18 KB
/
ci-python.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
name: Python API CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
run-tests:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9"]
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- name: Install OpenBLAS
run: sudo apt install libopenblas-dev
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Print Python version
run: |
which python
which pip
python --version
- name: Build and test python
run: |
pip install .[test]
pip list
cd apis/python
pytest -n logical --durations=0
# TODO: fix editable on linux
#pip uninstall -y tiledb.vector_search
#pip install -e .
#pytest
pip install -r test/ipynb/requirements.txt
export TILEDB_REST_TOKEN=$TILEDB_CLOUD_HELPER_VAR
pytest -n logical --durations=0 --nbmake test/ipynb
env:
TILEDB_CLOUD_HELPER_VAR: ${{ secrets.TILEDB_CLOUD_HELPER_VAR }}
shell: bash -el {0}
# TODO(paris): This is a temporary job where we will build with numpy2, but run with numpy1.
# Remove once the UDFs have numpy2 and do not fail.
continue-on-error: true
- name: Check tiledb-vector-search version
run: |
python -c "from tiledb.vector_search.version import version; print(version)"
# TODO(paris): This is a temporary job where we will build with numpy2, but run with numpy1.
# Remove once the UDFs have numpy2 and do not fail.
run-tests-numpy-1:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9"]
runs-on: ${{ matrix.os }}
steps:
- name: Install OpenBLAS
run: sudo apt install libopenblas-dev
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Print Python version
run: |
which python
which pip
python --version
- name: Build and test python
run: |
# This will build with numpy 2.
pip install .[test]
pip list
# Then we will uninstall numpy 2 and install numpy 1.
pip uninstall -y numpy
pip install numpy==1.25.0
pip list
cd apis/python
pytest -n logical --durations=0
# TODO: fix editable on linux
#pip uninstall -y tiledb.vector_search
#pip install -e .
#pytest
pip install -r test/ipynb/requirements.txt numpy==1.25.0
export TILEDB_REST_TOKEN=$TILEDB_CLOUD_HELPER_VAR
pytest -n logical --durations=0 --nbmake test/ipynb
env:
TILEDB_CLOUD_HELPER_VAR: ${{ secrets.TILEDB_CLOUD_HELPER_VAR }}
shell: bash -el {0}
- name: Check tiledb-vector-search version
run: |
python -c "from tiledb.vector_search.version import version; print(version)"