-
Notifications
You must be signed in to change notification settings - Fork 33
110 lines (94 loc) · 3.05 KB
/
ci.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
name: TileDB Python CI
on: [push, pull_request, workflow_dispatch]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os:
- ubuntu-latest
- macos-13
# libfaketime tests fail on macos arm. Disable tests for now.
# - macos-14
- windows-latest
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false
env:
MACOSX_DEPLOYMENT_TARGET: "11"
steps:
- name: Checkout TileDB-Py `dev`
uses: actions/checkout@v4
- name: Setup MSVC toolset (VS 2022)
uses: TheMrMilchmann/setup-msvc-dev@v3
if: startsWith(matrix.os, 'windows')
with:
arch: x64
- name: Install Ninja (VS 2022)
uses: seanmiddleditch/gha-setup-ninja@v4
if: startsWith(matrix.os, 'windows')
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Print Python version
run: |
which python
which pip
python --version
- name: Print env
run: printenv
- name: Print pip debug info
run: pip debug --verbose
# Remove after upstream PR fully-deployed:
# - https://github.com/actions/runner-images/pull/7125
- name: "Install homebrew dependencies"
run: brew install pkg-config
if: startsWith(matrix.os, 'macos')
- name: "Install libfaketime (linux and macOS)"
if: ${{ ! startsWith(matrix.os, 'windows') }}
run: |
git clone https://github.com/wolfcw/libfaketime/
cd libfaketime
sudo make install
cd ..
- name: "Build and Install TileDB-Py"
# We use pipx here to produce wheel/sdist to upload as artifact in case of error
run: |
pipx run --python ${{ matrix.python-version }} build
WHEEL_NAME=$(ls dist/*.whl)
pip install --verbose ${WHEEL_NAME}[test]
- name: "Run tests"
run: |
PROJECT_CWD=$PWD
rm tiledb/__init__.py
cd /tmp
pytest -vv --showlocals $PROJECT_CWD
- name: "Re-run tests without pandas"
run: |
pip uninstall -y pandas
pytest -vv --showlocals $PROJECT_CWD
- name: "Print log files (failed build only)"
run: |
set -xeo pipefail
# Display log files if the build failed
echo 'Dumping log files for failed build'
echo '----------------------------------'
for f in $(find build -name *.log);
do echo '------'
echo $f
echo '======'
cat $f
done;
if: failure()
- name: "Upload files for debug"
if: always()
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ matrix.python-version }}
path: "."