Repository navigation
58 lines (55 loc) · 1.8 KB
/
Copy pathci.yml
File metadata and controls
58 lines (55 loc) · 1.8 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
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
inputs:
parity:
description: "Record MATLAB golden calls (static2d) and replay them"
type: boolean
default: false
jobs:
test:
name: Lint and unit tests (no MATLAB)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e ".[dev]" scikit-image h5py
- run: ruff check src tests examples tools demo
- run: pytest tests/unit -q
parity:
name: MATLAB parity (static2d)
if: github.event_name == 'workflow_dispatch' && inputs.parity
runs-on: ubuntu-latest
env:
UPSTREAM_COMMIT: 0cb5cf93c699870bcd93a00b2e2cd787bef73fcc
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: MattechLab/monalisa
ref: ${{ env.UPSTREAM_COMMIT }}
path: upstream
- uses: matlab-actions/setup-matlab@v2
with:
products: Image_Processing_Toolbox Statistics_and_Machine_Learning_Toolbox
- name: Compile upstream MEX files
uses: matlab-actions/run-command@v2
with:
command: addpath(genpath('upstream/src')); compile_mex_for_monalisa
- name: Record golden calls
uses: matlab-actions/run-command@v2
with:
command: addpath('tools/matlab_capture'); run_capture('static2d', fullfile(pwd,'fixtures','matlab'), fullfile(pwd,'upstream'), 'maxBytes', 20e6)
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -e ".[dev]" scikit-image h5py
- run: pytest tests/parity -q -n auto