@@ -14,27 +14,29 @@ jobs:
14
14
shell : bash
15
15
strategy :
16
16
matrix :
17
- os : [ubuntu-latest, macos-12, windows-latest]
17
+ os :
18
+ - ubuntu-latest
19
+ - macos-13
20
+ # libfaketime tests fail on macos arm. Disable tests for now.
21
+ # - macos-14
22
+ - windows-latest
18
23
python-version : ["3.8", "3.9", "3.10", "3.11", "3.12"]
19
24
fail-fast : false
20
25
env :
21
- # 11.7 necessary due to: https://github.com/actions/setup-python/issues/682#issuecomment-1604261330
22
- MACOSX_DEPLOYMENT_TARGET : ${{ matrix.os == 'macos-12' && matrix.python-version == '3.8' && '11.7' || '11' }}
23
- # MACOSX_DEPLOYMENT_TARGET: "10.11"
24
- # On windows-2019 we are using the Visual Studio generator, which is multi-config and places the build artifacts in a subdirectory
26
+ MACOSX_DEPLOYMENT_TARGET : " 11"
25
27
steps :
26
28
- name : Checkout TileDB-Py `dev`
27
- uses : actions/checkout@v3
29
+ uses : actions/checkout@v4
28
30
29
31
- name : Setup MSVC toolset (VS 2022)
30
32
uses : TheMrMilchmann/setup-msvc-dev@v3
31
- if : matrix.os == 'windows-latest'
33
+ if : startsWith( matrix.os, 'windows')
32
34
with :
33
35
arch : x64
34
36
35
37
- name : Install Ninja (VS 2022)
36
38
uses : seanmiddleditch/gha-setup-ninja@v4
37
- if : matrix.os == 'windows-latest'
39
+ if : startsWith( matrix.os, 'windows')
38
40
39
41
- name : Set up Python ${{ matrix.python-version }}
40
42
uses : actions/setup-python@v4
@@ -57,79 +59,29 @@ jobs:
57
59
# - https://github.com/actions/runner-images/pull/7125
58
60
- name : " Install homebrew dependencies"
59
61
run : brew install pkg-config
60
- if : matrix.os == 'macos-12'
61
-
62
- - name : " Install dependencies"
63
- run : python -m pip install --upgrade -r misc/requirements_ci.txt
64
-
65
- - name : " Get TILEDB_VERSION"
66
- run : echo "LIBTILEDB_VERSION=$(python setup.py get_tiledb_version | tail -n 1)" >> $GITHUB_ENV
67
-
68
- - name : " Get LIBTILEDB_SHA"
69
- run : echo "LIBTILEDB_SHA=$(git ls-remote https://github.com/TileDB-Inc/TileDB $LIBTILEDB_VERSION | cut -c1-7)" >> $GITHUB_ENV
70
-
71
- - name : " Download TileDB From Zip And Build TileDB-Py (Windows)"
72
- run : |
73
- choco install wget --no-progress
74
-
75
- if wget https://github.com/TileDB-Inc/TileDB/releases/download/$LIBTILEDB_VERSION/tiledb-windows-x86_64-$LIBTILEDB_VERSION-$LIBTILEDB_SHA.zip; then
76
- mkdir libtiledb
77
- unzip tiledb-windows-x86_64-$LIBTILEDB_VERSION-$LIBTILEDB_SHA.zip -d libtiledb
78
- cp libtiledb/bin/tiledb.dll tiledb
79
- python setup.py develop --tiledb=libtiledb
80
- else
81
- # Build from source as fallback
82
- python setup.py build_ext --inplace
83
- python setup.py develop
84
- fi
85
- env :
86
- TILEDB_FORCE_ALL_DEPS : True
87
- CMAKE_GENERATOR : " Ninja"
88
- if : matrix.os == 'windows-latest'
89
-
90
- - name : " Download TileDB From Tarball And Build TileDB-Py (macOS)"
91
- run : |
92
- set -xeo pipefail
93
-
94
- if wget https://github.com/TileDB-Inc/TileDB/releases/download/$LIBTILEDB_VERSION/tiledb-macos-x86_64-$LIBTILEDB_VERSION-$LIBTILEDB_SHA.tar.gz; then
95
- mkdir libtiledb
96
- sudo tar -vzxf tiledb-macos-x86_64-$LIBTILEDB_VERSION-$LIBTILEDB_SHA.tar.gz -C libtiledb
97
- python setup.py develop --tiledb=libtiledb
98
- else
99
- # Build from source as fallback
100
- python setup.py build_ext --inplace
101
- python setup.py develop
102
- fi
103
- if : matrix.os == 'macos-12'
104
-
105
- - name : " Download TileDB From Tarball And Build TileDB-Py (Linux)"
106
- run : |
107
- set -xeo pipefail
108
-
109
- if wget https://github.com/TileDB-Inc/TileDB/releases/download/$LIBTILEDB_VERSION/tiledb-linux-x86_64-$LIBTILEDB_VERSION-$LIBTILEDB_SHA.tar.gz; then
110
- mkdir libtiledb
111
- sudo tar -vzxf tiledb-linux-x86_64-$LIBTILEDB_VERSION-$LIBTILEDB_SHA.tar.gz -C libtiledb
112
- python setup.py develop --tiledb=libtiledb
113
- else
114
- # Build from source as fallback
115
- python setup.py build_ext --inplace
116
- python setup.py develop
117
- fi
118
- if : matrix.os == 'ubuntu-latest'
119
-
120
- - name : " Check build directory"
121
- run : ls -Rl
62
+ if : startsWith(matrix.os, 'macos')
122
63
123
64
- name : " Install libfaketime (linux and macOS)"
124
- if : matrix.os == 'ubuntu-latest' || matrix.os == 'macos-12'
65
+ if : ${{ ! startsWith( matrix.os, 'windows') }}
125
66
run : |
126
67
git clone https://github.com/wolfcw/libfaketime/
127
68
cd libfaketime
128
69
sudo make install
129
70
cd ..
130
71
72
+ - name : " Build and Install TileDB-Py"
73
+ # We use pipx here to produce wheel/sdist to upload as artifact in case of error
74
+ run : |
75
+ pipx run --python ${{ matrix.python-version }} build
76
+ WHEEL_NAME=$(ls dist/*.whl)
77
+ pip install --verbose ${WHEEL_NAME}[test]
78
+
131
79
- name : " Run tests"
132
- run : pytest -vv --showlocals
80
+ run : |
81
+ PROJECT_CWD=$PWD
82
+ rm tiledb/__init__.py
83
+ cd /tmp
84
+ pytest -vv --showlocals $PROJECT_CWD
133
85
134
86
- name : " Print log files (failed build only)"
135
87
run : |
@@ -144,3 +96,10 @@ jobs:
144
96
cat $f
145
97
done;
146
98
if : failure()
99
+
100
+ - name : " Upload files for debug"
101
+ if : always()
102
+ uses : actions/upload-artifact@v4
103
+ with :
104
+ name : cibw-wheels-${{ matrix.os }}-${{ matrix.python-version }}
105
+ path : " ."
0 commit comments