Repository navigation
94 lines (86 loc) · 3.1 KB
/
Copy pathtest-vesuvius.yml
File metadata and controls
94 lines (86 loc) · 3.1 KB
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
name: Test vesuvius Python
on:
pull_request:
paths:
- 'vesuvius/**'
- 'lasagna/**'
# Local source dependencies installed by uv sync --extra all.
- 'volume-cartographer/**'
- 'vc_object_store/**'
- 'vc_reader/**'
- '.github/workflows/test-vesuvius.yml'
jobs:
test-vesuvius-python:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Limit the test matrix to ubuntu-latest for now, as other platforms may not
# support all dependencies yet. Extend this list once the build scripts
# for macOS and Windows are confirmed.
os: [blacksmith-4vcpu-ubuntu-2404]
zarr: ['2.18.7', '3.2.1']
defaults:
run:
shell: bash
working-directory: ./vesuvius
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install native build dependencies on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
# Native dependency closure for the Python-only scikit-build
# configurations of volume-cartographer (apps, UI tracer, flatboi,
# tests: OFF) and vc_object_store (tools: OFF).
# qt6-base-dev: utils links Qt6::Core (SFTP remote access, #1941).
sudo apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
libblosc-dev \
libboost-dev \
libceres-dev \
libcurl4-openssl-dev \
libeigen3-dev \
liblz4-dev \
libopencv-contrib-dev \
libopencv-dev \
libsuitesparse-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libzstd-dev \
ninja-build \
nlohmann-json3-dev \
pkg-config \
qt6-base-dev \
zlib1g-dev
- name: Install uv and restore dependency cache
uses: astral-sh/setup-uv@v10.3.3
with:
enable-cache: true
# Preserve downloaded wheels as well as built wheels; the ML stack
# is expensive to download again. Never cache the virtualenv itself.
prune-cache: false
cache-suffix: vesuvius-zarr-${{ matrix.zarr }}
# Include transitive reader sources: volume-cartographer's own uv
# wheel cache keys do not currently cover this sibling dependency.
cache-dependency-glob: |
.github/workflows/test-vesuvius.yml
vesuvius/uv.lock
vesuvius/pyproject.toml
volume-cartographer/pyproject.toml
vc_object_store/pyproject.toml
vc_reader/**
gpu_manager/pyproject.toml
segmentation/models/batchgeneratorsv2/pyproject.toml
segmentation/models/arch/nnunet/pyproject.toml
- name: Sync dependencies
run: uv sync --extra all
- name: Select Zarr version
run: uv pip install "zarr==${{ matrix.zarr }}"
- name: Run tests
env:
PYTHONPATH: ${{ github.workspace }}
run: uv run --no-sync pytest tests -m "not slow and not network"