Skip to content

Commit

Permalink
Merge pull request topology-tool-kit#1058 from julien-tierny/ci
Browse files Browse the repository at this point in the history
[CI] Updating test workflow to ParaView 5.13 (with extensions to Ubuntu 24.04 and MacOS 14)
  • Loading branch information
julien-tierny authored Sep 13, 2024
2 parents f5c6044 + 9b8ba01 commit 35c5d66
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 20 deletions.
52 changes: 40 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ concurrency:
cancel-in-progress: true

env:
PV_TAG: v5.12.0-headless
PV_TAG: v5.13.0-headless
PV_REPO: topology-tool-kit/ttk-paraview


Expand All @@ -39,7 +39,7 @@ jobs:
if: ${{ github.repository_owner == 'topology-tool-kit' || !contains(github.ref, 'heads') }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]

steps:
- uses: actions/checkout@v4
Expand All @@ -59,11 +59,11 @@ jobs:
libsqlite3-dev \
libwebsocketpp-dev \
graphviz \
python3-sklearn \
ninja-build \
zlib1g-dev \
libqhull-dev \
dpkg-dev
sudo python3 -m pip install scikit-learn
cargo install sccache --version 0.4.2 --locked
echo "PATH=/root/.cargo/bin:$PATH" >> $GITHUB_ENV
Expand Down Expand Up @@ -92,6 +92,7 @@ jobs:
run: |
sudo apt install ./ttk-paraview-headless.deb
# TODO: more aggressive warnings? (ubuntu-24.04)
- name: Create & configure TTK build directory
run: |
mkdir build
Expand Down Expand Up @@ -143,13 +144,12 @@ jobs:
needs: test-build-ubuntu
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
testSet: [pyTests, screenshotTests]
steps:
- name: Install Ubuntu dependencies
run: |
sudo apt update
sudo python3 -m pip install scikit-learn
- name: Install Torch
shell: bash
Expand Down Expand Up @@ -201,18 +201,21 @@ jobs:
run: |
VERS=$(hostnamectl | grep "Operating System")
# Ubuntu 22.04 OOM killer also kills the parent process...
if [[ "$VERS" == *"22.04"* ]]; then
if [[ "$VERS" == *"22.04"* ]] || [[ "$VERS" == *"24.04"* ]]; then
rm ttk-data/states/mergeTreeClustering.pvsm
rm ttk-data/states/mergeTreePGA.pvsm
rm ttk-data/states/mergeTreeTemporalReduction.pvsm
rm ttk-data/states/persistentGenerators_darkSky.pvsm
fi
# remove buggy example
# related issue: https://github.com/topology-tool-kit/ttk/issues/1055
rm ttk-data/states/nestedTrackingFromOverlap.py
cd ttk-data/tests
mkdir output_screenshots
if ! python3 -u validate.py; then
if [[ "$VERS" == *"22.04"* ]]; then
if [[ "$VERS" == *"22.04"* ]] || [[ "$VERS" == *"24.04"* ]]; then
# weird opacity difference between the two Ubuntus
rm -f output_screenshots/clusteringKelvinHelmholtzInstabilities_1.png
rm -f output_screenshots/clusteringKelvinHelmholtzInstabilities_2.png
Expand All @@ -235,6 +238,9 @@ jobs:
if: matrix.testSet == 'pyTests'
run: |
cd ttk-data
# remove buggy example
# related issue: https://github.com/topology-tool-kit/ttk/issues/1055
rm python/nestedTrackingFromOverlap.py
python3 -u python/run.py
- name: Test ttk-data Python scripts results [NOT ENFORCED]
Expand All @@ -257,7 +263,10 @@ jobs:
# Test macOS build #
# -----------------#
test-build-macos:
runs-on: macos-12
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12, macos-14]
if: ${{ github.repository_owner == 'topology-tool-kit' || !contains(github.ref, 'heads') }}

steps:
Expand All @@ -275,7 +284,7 @@ jobs:
brew install --cask xquartz
brew install llvm ninja open-mpi
# TTK dependencies
brew install boost eigen graphviz numpy qhull
brew install boost eigen graphviz spectra sqlite zlib numpy qhull
- name: Install and setup sccache
uses: f3d-app/sccache-setup-action@v1
Expand All @@ -287,11 +296,20 @@ jobs:

- name: Fetch TTK-ParaView headless macOS binary archive
run: |
wget https://github.com/${{ env.PV_REPO }}/releases/download/${{ env.PV_TAG }}/ttk-paraview-headless-macos-12.tar.gz
if [[ "${{ matrix.os }}" == "macos-12" ]]; then
wget -O ttk-paraview-headless.tar.gz \
https://github.com/${{ env.PV_REPO }}/releases/download/${{ env.PV_TAG }}/ttk-paraview-headless-${{ matrix.os }}.tar.gz
fi
if [[ "${{ matrix.os }}" == "macos-14" ]]; then
wget -O ttk-paraview-headless.tar.gz \
https://github.com/${{ env.PV_REPO }}/releases/download/${{ env.PV_TAG }}/ttk-paraview-headless-${{ matrix.os }}-arm64.tar.gz
fi
# NOTE: pvpython is broken on macos-14, but not on macos-12 (?)
- name: Install ParaView
continue-on-error: true
run: |
tar xzf ttk-paraview-headless-macos-12.tar.gz
tar xzf ttk-paraview-headless.tar.gz
sudo cp -r ttk-paraview/* /usr/local
pvpython -m pip install --break-system-packages scikit-learn
Expand Down Expand Up @@ -338,6 +356,7 @@ jobs:
echo "PYTHONPATH=/usr/local/lib/python3.12/site-packages:$PYTHONPATH" >> $GITHUB_ENV
- name: Run TTK tests
continue-on-error: true
uses: ./.github/actions/test-ttk-unix

- uses: actions/checkout@v4
Expand All @@ -352,6 +371,9 @@ jobs:
id: validate
continue-on-error: true
run: |
# remove buggy example
# related issue: https://github.com/topology-tool-kit/ttk/issues/1055
rm ttk-data/states/nestedTrackingFromOverlap.py
cd ttk-data/tests
mkdir output_screenshots
pvpython -u validate.py || (tar zcf screenshots.tar.gz output_screenshots && false)
Expand All @@ -367,8 +389,12 @@ jobs:
retention-days: 10

- name: Run ttk-data Python scripts
continue-on-error: true
run: |
cd ttk-data
# remove buggy example
# related issue: https://github.com/topology-tool-kit/ttk/issues/1055
rm python/nestedTrackingFromOverlap.py
pvpython -u python/run.py
env:
PV_PLUGIN_PATH: /usr/local/bin/plugins/TopologyToolKit
Expand Down Expand Up @@ -400,7 +426,8 @@ jobs:
shell: bash
run: |
conda install -c conda-forge libboost-devel glew eigen spectralib zfp \
scikit-learn graphviz ninja python=3.10 zlib qhull llvm-openmp clangxx
sqlite scikit-learn graphviz ninja python=3.10 zlib qhull \
llvm-openmp clangxx
# add TTK & ParaView install folders to PATH
echo "$PV_DIR/bin" >> $GITHUB_PATH
echo "$TTK_DIR/bin" >> $GITHUB_PATH
Expand Down Expand Up @@ -549,6 +576,7 @@ jobs:
set PYTHONPATH=%PV_DIR%\bin\Lib\site-packages;%TTK_DIR%\bin\Lib\site-packages;%CONDA_ROOT%\Lib;%CONDA_ROOT%\DLLs
set PV_PLUGIN_PATH=%TTK_DIR%\bin\plugins
cd ttk-data
rm python/nestedTrackingFromOverlap.py
pvpython.exe -u python\run.py
- name: Test ttk-data Python scripts results [NOT ENFORCED]
Expand Down
2 changes: 1 addition & 1 deletion CMake/cpack_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ else()
set(CPACK_RESOURCE_FILE_README ${PROJECT_BINARY_DIR}/Readme.txt)
endif()
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"ttk-paraview (= 5.12.0), python3-sklearn, libboost-system-dev, python3-dev, libgraphviz-dev, libsqlite3-dev, libgl1-mesa-dev")
"ttk-paraview (= 5.13.0), libboost-system-dev, libeigen3-dev, libgraphviz-dev, libsqlite3-dev, graphviz, python3-sklearn, zlib1g-dev, libqhull-dev, python3-dev, libgl1-mesa-dev")
# autogenerate dependency information
set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
# package will be installed under %ProgramFiles%\${CPACK_PACKAGE_INSTALL_DIRECTORY} on Windows
Expand Down
2 changes: 1 addition & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- DMS performance improvements (allocation)
- Saddle connector reversal performance improvements
- Signed distance fields
- Migration to ParaView 5.12
- Migration to ParaView 5.12, 5.13
- Switch to C++17
- Bug fixes

Expand Down
4 changes: 2 additions & 2 deletions core/base/cinemaQuery/CinemaQuery.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <CinemaQuery.h>
#include <iostream>

#if TTK_ENABLE_SQLITE3
#ifdef TTK_ENABLE_SQLITE3
#include <sqlite3.h>
#endif

Expand All @@ -18,7 +18,7 @@ int ttk::CinemaQuery::execute(
int &csvNColumns,
int &csvNRows) const {

#if TTK_ENABLE_SQLITE3
#ifdef TTK_ENABLE_SQLITE3
// print input
{
std::vector<std::string> sqlLines;
Expand Down
22 changes: 19 additions & 3 deletions core/base/discreteMorseSandwich/DiscreteMorseSandwich.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,12 +478,28 @@ namespace ttk {
this->pairedCritCells_[i].resize(
this->dg_.getNumberOfCells(i, triangulation), false);
}
for(int i = 1; i < dim + 1; ++i) {
// NOTE:
// a for loop used to stand here, but gcc 13 looks buggy with it...
if(dim >= 1) {
#ifdef TTK_ENABLE_OPENMP
#pragma omp task
#endif
this->critCellsOrder_[i].resize(
this->dg_.getNumberOfCells(i, triangulation), -1);
this->critCellsOrder_[1].resize(
this->dg_.getNumberOfCells(1, triangulation), -1);
}
if(dim >= 2) {
#ifdef TTK_ENABLE_OPENMP
#pragma omp task
#endif
this->critCellsOrder_[2].resize(
this->dg_.getNumberOfCells(2, triangulation), -1);
}
if(dim >= 3) {
#ifdef TTK_ENABLE_OPENMP
#pragma omp task
#endif
this->critCellsOrder_[3].resize(
this->dg_.getNumberOfCells(3, triangulation), -1);
}
}
this->printMsg("Memory allocations", 1.0, tm.getElapsedTime(), 1,
Expand Down
2 changes: 1 addition & 1 deletion core/base/webSocketIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ ttk_add_base_library(webSocketIO

if (TTK_ENABLE_WEBSOCKETPP)
target_compile_definitions(webSocketIO PUBLIC TTK_ENABLE_WEBSOCKETPP)
target_include_directories(webSocketIO PUBLIC ${WEBSOCKETPP_INCLUDE_DIR})
target_include_directories(webSocketIO SYSTEM PRIVATE ${WEBSOCKETPP_INCLUDE_DIR})
endif()

0 comments on commit 35c5d66

Please sign in to comment.