Skip to content

Commit 59ba1f1

Browse files
Merge pull request #1123 from pierre-guillou/dev
GitHub Actions: Split test_build workflow in 3
2 parents a2f2f68 + ca0d5a5 commit 59ba1f1

File tree

7 files changed

+614
-607
lines changed

7 files changed

+614
-607
lines changed

.github/workflows/check.yml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,16 @@
11
name: check_code
22

33
on:
4-
push:
5-
# triggered on tag pushes with tags beginning with either "v" or "dev"
6-
branch-ignore:
7-
- '*'
8-
tags:
9-
- 'v*'
10-
- 'dev*'
11-
- 'ci*'
12-
- 'check*'
13-
pull_request:
14-
# also triggered by pull requests on the "dev" & "mpi" branches
15-
branches:
16-
- 'dev'
17-
- 'mpi'
18-
19-
20-
concurrency:
21-
group: ${{ github.workflow }}-${{ github.ref }}
22-
cancel-in-progress: true
4+
workflow_call:
5+
workflow_dispatch:
236

247
env:
25-
PV_TAG: v5.13.0-headless
8+
PV_TAG: v6.0.1-headless
269
PV_REPO: topology-tool-kit/ttk-paraview
2710

2811

2912
jobs:
3013

31-
3214
# ----------------------- #
3315
# Check source formatting #
3416
# ----------------------- #
@@ -177,7 +159,7 @@ jobs:
177159
# Check compiler warnings #
178160
# ----------------------- #
179161
check-warnings:
180-
runs-on: ubuntu-22.04
162+
runs-on: ubuntu-24.04
181163
strategy:
182164
matrix:
183165
kamikaze: [KAMIKAZE=TRUE, KAMIKAZE=FALSE]
@@ -219,7 +201,7 @@ jobs:
219201
- name: Fetch TTK-ParaView headless Debian package
220202
run: |
221203
wget -O ttk-paraview-headless.deb \
222-
https://github.com/${{ env.PV_REPO }}/releases/download/${{ env.PV_TAG }}/ttk-paraview-headless-ubuntu-22.04.deb
204+
https://github.com/${{ env.PV_REPO }}/releases/download/${{ env.PV_TAG }}/ttk-paraview-headless-ubuntu-24.04.deb
223205
224206
- name: Install ParaView .deb
225207
run: |

.github/workflows/test-macos.yml

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
name: test_build-macos
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
7+
env:
8+
PV_TAG: v6.0.1-headless
9+
PV_REPO: topology-tool-kit/ttk-paraview
10+
CMAKE_GENERATOR: Ninja
11+
CMAKE_BUILD_TYPE: Release
12+
CMAKE_CC_COMPILER_LAUNCHER: sccache
13+
CMAKE_CXX_COMPILER_LAUNCHER: sccache
14+
SCCACHE_GHA_ENABLED: "true"
15+
SCCACHE_IDLE_TIMEOUT: 0
16+
17+
18+
jobs:
19+
20+
# -----------------#
21+
# Test macOS build #
22+
# -----------------#
23+
test-build:
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
matrix:
27+
os: [macos-14, macos-15]
28+
env:
29+
DYLD_LIBRARY_PATH: /usr/local/lib
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
name: Checkout TTK source code
34+
35+
- uses: actions/setup-python@v5
36+
with:
37+
python-version: '3.13'
38+
39+
- name: Install macOS dependencies
40+
run: |
41+
# ParaView dependencies
42+
brew install --cask xquartz
43+
brew install ninja open-mpi libomp
44+
# TTK dependencies
45+
brew install boost cgal eigen graphviz spectra sqlite numpy qhull
46+
47+
- name: Run sccache-cache
48+
uses: mozilla-actions/[email protected]
49+
50+
- name: Install optional Spectra dependency
51+
uses: ./.github/actions/install-spectra-unix
52+
53+
- name: Install optional ZFP dependency
54+
uses: ./.github/actions/install-zfp-unix
55+
56+
- name: Fetch TTK-ParaView headless macOS binary archive
57+
run: |
58+
wget -O ttk-paraview-headless.tar.gz \
59+
https://github.com/${{ env.PV_REPO }}/releases/download/${{ env.PV_TAG }}/ttk-paraview-headless-${{ matrix.os }}.tar.gz
60+
61+
- name: Install ParaView
62+
run: |
63+
tar xzf ttk-paraview-headless.tar.gz
64+
sudo cp -r ttk-paraview/* /usr/local
65+
# pvpython does not embed the correct PYTHONPATH
66+
echo "PYTHONPATH=/usr/local/lib/python3.13/site-packages:$PYTHONPATH" >> $GITHUB_ENV
67+
pvpython -m pip install --break-system-packages scikit-learn
68+
# pvpython is expecting a vtkpython executable at this path
69+
sudo ln -s /usr/local/bin/pvpython /Library/Frameworks/Python.framework/Versions/3.13/vtkpython
70+
71+
- name: Create & configure TTK build directory
72+
run: |
73+
mkdir build
74+
cd build
75+
cmake \
76+
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
77+
-DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include" \
78+
-DOpenMP_C_LIB_NAMES="omp" \
79+
-DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include" \
80+
-DOpenMP_CXX_LIB_NAMES="omp" \
81+
-DOpenMP_omp_LIBRARY=/opt/homebrew/opt/libomp/lib/libomp.dylib \
82+
-DCMAKE_EXE_LINKER_FLAGS="-L/opt/homebrew/opt/libomp/lib -lomp" \
83+
-DTTK_BUILD_PARAVIEW_PLUGINS=TRUE \
84+
-DTTK_BUILD_VTK_WRAPPERS=TRUE \
85+
-DTTK_BUILD_STANDALONE_APPS=TRUE \
86+
-DTTK_ENABLE_KAMIKAZE=TRUE \
87+
-DTTK_ENABLE_MPI=FALSE \
88+
-DTTK_ENABLE_CPU_OPTIMIZATION=FALSE \
89+
-DTTK_ENABLE_SHARED_BASE_LIBRARIES=TRUE \
90+
-DTTK_IMPLICIT_PRECONDITIONS_THRESHOLD=64*64*64 \
91+
$GITHUB_WORKSPACE
92+
93+
- uses: ammaraskar/gcc-problem-matcher@master
94+
- name: Build & install TTK
95+
run: |
96+
cd build
97+
cmake --build . --parallel
98+
sudo cmake --build . --target install
99+
100+
- name: Run TTK tests
101+
uses: ./.github/actions/test-ttk-macos
102+
103+
- uses: actions/checkout@v4
104+
with:
105+
repository: "topology-tool-kit/ttk-data"
106+
ref: "dev"
107+
path: "ttk-data"
108+
name: Checkout ttk-data
109+
110+
- name: Run ttk-data states [NOT ENFORCED]
111+
id: validate
112+
continue-on-error: true
113+
run: |
114+
# remove buggy example
115+
# related issue: https://github.com/topology-tool-kit/ttk/issues/1055
116+
rm ttk-data/states/nestedTrackingFromOverlap.py
117+
# remove examples which fill up the memory
118+
rm ttk-data/states/topologicalOptimization_darkSky.pvsm
119+
# remove examples that take too long to render under mac
120+
rm ttk-data/states/cosmicWeb.pvsm
121+
rm ttk-data/states/persistenceClusteringGallery.pvsm
122+
rm ttk-data/states/persistentGenerators_householdAnalysis.pvsm
123+
rm ttk-data/states/topologicalOptimization*.pvsm
124+
cd ttk-data/tests
125+
mkdir output_screenshots
126+
pvpython -u validate.py || (tar zcf screenshots.tar.gz output_screenshots && false)
127+
env:
128+
PV_PLUGIN_PATH: /usr/local/bin/plugins/TopologyToolKit
129+
130+
- name: Upload result screenshots
131+
if: steps.validate.outcome == 'failure'
132+
uses: actions/upload-artifact@v4
133+
with:
134+
name: screenshots-${{ matrix.os }}.tar.gz
135+
path: ttk-data/tests/screenshots.tar.gz
136+
retention-days: 10
137+
138+
- name: Run ttk-data Python scripts
139+
run: |
140+
cd ttk-data
141+
# remove buggy example
142+
# related issue: https://github.com/topology-tool-kit/ttk/issues/1055
143+
rm python/nestedTrackingFromOverlap.py
144+
# tmp removal of mpi example
145+
rm python/mpiExample.py
146+
rm python/distributedPersistenceDiagram.py
147+
# remove examples which fill up the memory
148+
rm python/topologicalOptimization_darkSky.py
149+
# remove sklearn examples -- buggy on MacOS since sklearn-1.7
150+
rm python/1manifoldLearning.py python/clusteringKelvinHelmholtzInstabilities.py python/karhunenLoveDigits64Dimensions.py python/mergeTreeClustering.py python/persistentGenerators_householdAnalysis.py python/persistentGenerators_periodicPicture.py
151+
pvpython -u python/run.py
152+
env:
153+
PV_PLUGIN_PATH: /usr/local/bin/plugins/TopologyToolKit
154+
155+
- name: Test ttk-data Python scripts results [NOT ENFORCED]
156+
continue-on-error: true
157+
run: |
158+
cd ttk-data
159+
cat python/res.json
160+
diff python/hashes/macOS.json python/res.json

0 commit comments

Comments
 (0)