Repository navigation
94 lines (81 loc) · 3.15 KB
/
Copy pathci.yml
File metadata and controls
94 lines (81 loc) · 3.15 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: CI
on:
push:
branches: ["develop"]
tags: ["v*"]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
# ===========================================================================
# Python package (preppy/)
# ---------------------------------------------------------------------------
# Runs the suite across supported interpreters. ImageMagick + the `preview`
# extra (trimesh/pyrender, with OSMesa for offscreen GL) are installed so the
# texture-normalization and rendered-thumbnail paths actually execute and
# catch regressions here rather than self-skipping. The heavier geometry
# toolchain (ktx/gltfpack/node) and pymeshlab remain the manual `integration`
# job's job; those tests still self-skip here. The tool-availability skips are
# for bare local-dev machines, not CI.
# ===========================================================================
test:
name: py ${{ matrix.python-version }}
runs-on: ubuntu-latest
env:
# Headless offscreen GL backend so the pyrender model-preview tests run
# instead of skipping on a missing GL context.
PYOPENGL_PLATFORM: osmesa
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install system deps (ImageMagick + offscreen GL)
run: |
sudo apt-get update
sudo apt-get install -y imagemagick libosmesa6 libgl1
- name: Install
run: |
python -m pip install --upgrade pip setuptools wheel
pip install '.[test,preview]'
- name: Run tests
run: python -m pytest tests/
- name: Smoke test
run: preppy -h
# Full end-to-end run over the sample object, exercising the real toolchain.
# Heavy and environment-sensitive, so it is opt-in (manual dispatch) and
# non-blocking (continue-on-error); whatever tools install successfully are
# exercised, the rest self-skip. See README / singularity/preppy.def for the
# authoritative install.
integration:
name: integration (full toolchain)
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install external toolchain
run: |
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt-get update
sudo apt-get install -y imagemagick nodejs
npm install -g gltfpack
# KTX-Software (`ktx create`) — install per README for full KTX2 tests;
# absent, the KTX2/embed integration tests skip cleanly.
- name: Install package + embed helper deps
run: |
pip install '.[test,validate,preview]'
npm install --prefix preppy/node
- name: Run tests
run: python -m pytest tests/