-
Notifications
You must be signed in to change notification settings - Fork 7
65 lines (64 loc) · 2.37 KB
/
codecov.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
name: CodeCov
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install build dependencies
run: |
sudo apt update
sudo apt install -y meson libgl1-mesa-glx libcairo2-dev libgdk-pixbuf2.0-dev libglib2.0-dev libjpeg-dev libpng-dev libtiff5-dev libxml2-dev libopenjp2-7-dev libsqlite3-dev zlib1g-dev libzstd-dev
sudo apt install -y libfftw3-dev libexpat1-dev libgsf-1-dev liborc-0.4-dev libtiff5-dev ninja-build libboost-all-dev libopencv-dev
- name: Install Rust for pyhaloxml
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "Rust and Cargo installed in:"
echo $HOME/.cargo/bin
ls $HOME/.cargo/bin
export PATH="$HOME/.cargo/bin:$PATH"
- name: Build and install OpenSlide
run: |
export PATH="$HOME/.cargo/bin:$PATH"
git clone https://github.com/openslide/openslide.git
cd openslide
meson setup builddir
meson compile -C builddir
sudo meson install -C builddir
cd ..
- name: Build and install libvips
run: |
export PATH="$HOME/.cargo/bin:$PATH"
git clone https://github.com/libvips/libvips.git
cd libvips
meson setup builddir --prefix=/usr/local
meson compile -C builddir
sudo meson install -C builddir
sudo ldconfig
cd ..
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install environment
run: |
export PATH="$HOME/.cargo/bin:$PATH"
python -m pip install --upgrade pip
python -m pip install ninja meson meson-python>=0.15.0 numpy==1.26.4 Cython>=0.29 spin pybind11
python -m pip install tifffile>=2024.7.2 pyvips>=2.2.3 tqdm>=2.66.4 pillow>=10.3.0 openslide-python>=1.3.1 spin
python -m pip install opencv-python-headless>=4.9.0.80 shapely>=2.0.4 pybind11>=2.8.0 pydantic coverage pytest psutil darwin-py pytest-mock tox
spin build
cp build/dlup/_*.so dlup/
cp build/src/_*.so dlup/
python -m pip install .
- name: Run coverage
run: |
coverage run -m pytest || true
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}