Skip to content

Commit eab2761

Browse files
authored
Merge pull request #867 from wildmeshing/cis
updated test ci
2 parents 327c8a9 + 0a30e92 commit eab2761

34 files changed

+210
-441
lines changed

.github/workflows/continuous.yml

Lines changed: 59 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@ name: Build
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- hackathon/dev
5+
branches: [main]
86
pull_request:
9-
branches:
10-
- main
11-
- hackathon/dev
127

138
env:
149
CTEST_OUTPUT_ON_FAILURE: ON
15-
CTEST_PARALLEL_LEVEL: 2
10+
CTEST_PARALLEL_LEVEL: 1
1611

1712
jobs:
1813
####################
@@ -21,8 +16,7 @@ jobs:
2116

2217
Linux:
2318
name: ${{ matrix.name }} (${{ matrix.config }})
24-
runs-on: [self-hosted,Linux]
25-
#runs-on: ${{ matrix.os }}
19+
runs-on: ${{ matrix.os }}
2620
strategy:
2721
fail-fast: false
2822
matrix:
@@ -33,25 +27,27 @@ jobs:
3327
name: Linux
3428
steps:
3529
- name: Checkout repository
36-
uses: actions/checkout@v1
30+
uses: actions/checkout@v4.1.6
3731
with:
3832
fetch-depth: 10
3933

4034
- name: Dependencies
4135
run: |
42-
echo 'CACHE_PATH=~/.ccache' >> "$GITHUB_ENV"
36+
sudo apt-get update
37+
sudo apt-get -o Acquire::Retries=3 install ccache
38+
echo 'CACHE_PATH=~/.cache/ccache' >> "$GITHUB_ENV"
4339
4440
- name: Cache Build
4541
id: cache-build
46-
uses: actions/cache@v2
42+
uses: actions/cache@v4
4743
with:
4844
path: ${{ env.CACHE_PATH }}
49-
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.tbb }}-cache-${{ github.sha }}
50-
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.tbb }}-cache
45+
key: ${{ runner.os }}-${{ matrix.config }}-cache-${{ github.sha }}
46+
restore-keys: ${{ runner.os }}-${{ matrix.config }}-cache
5147

5248
- name: Prepare ccache
5349
run: |
54-
ccache --max-size=20.0G
50+
# ccache --max-size=20.0G
5551
ccache -V && ccache --show-stats && ccache --zero-stats
5652
5753
- name: Configure
@@ -63,7 +59,7 @@ jobs:
6359
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
6460
6561
- name: Build
66-
run: cd build; make -j8; ccache --show-stats
62+
run: cd build; make -j2; ccache --show-stats
6763

6864
- name: Tests
6965
run: cd build; ctest --verbose --output-on-failure
@@ -73,40 +69,36 @@ jobs:
7369
####################
7470

7571
MacOS:
76-
name: ${{ matrix.name }}-${{ matrix.arch }} (${{ matrix.config }})
77-
#runs-on: ${{ matrix.os }}
78-
runs-on: [self-hosted, MacOS]
72+
name: ${{ matrix.os }} (${{ matrix.config }})
73+
runs-on: ${{ matrix.os }}
7974
strategy:
8075
fail-fast: false
8176
matrix:
82-
os: [macos-latest]
83-
arch: [arm64] # arm64 no arm as GMP is binary
77+
os: [macos-latest, macos-14]
8478
config: [Debug, Release]
85-
include:
86-
- os: macos-latest
87-
name: macOS
8879

8980
steps:
9081
- name: Checkout repository
91-
uses: actions/checkout@v1
82+
uses: actions/checkout@v4.1.6
9283
with:
9384
fetch-depth: 10
9485

9586
- name: Dependencies
9687
run: |
88+
brew install ccache
9789
echo 'CACHE_PATH=~/Library/Caches/ccache' >> "$GITHUB_ENV"
9890
9991
- name: Cache Build
10092
id: cache-build
101-
uses: actions/cache@v2
93+
uses: actions/cache@v4
10294
with:
10395
path: ${{ env.CACHE_PATH }}
104-
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.arch }}-${{ matrix.tbb }}-cache-${{ github.sha }}
105-
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.arch }}-${{ matrix.tbb }}-cache
96+
key: ${{ matrix.os }}-${{ matrix.config }}-cache-${{ github.sha }}
97+
restore-keys: ${{ matrix.os }}-${{ matrix.config }}-cache
10698

10799
- name: Prepare ccache
108100
run: |
109-
ccache --max-size=20.0G
101+
# ccache --max-size=20.0G
110102
ccache -V && ccache --show-stats && ccache --zero-stats
111103
112104
- name: Configure
@@ -115,14 +107,12 @@ jobs:
115107
cd build
116108
cmake .. \
117109
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
118-
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \
119110
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
120111
121112
- name: Build
122-
run: cd build; make -j8; ccache --show-stats
113+
run: cd build; make -j2; ccache --show-stats
123114

124115
- name: Tests
125-
#if: matrix.arch == 'x86_64' # no ARM vm on actions yet
126116
run: cd build; ctest --verbose --output-on-failure
127117

128118
####################
@@ -131,35 +121,60 @@ jobs:
131121

132122
Windows:
133123
name: Windows (${{ matrix.config }})
134-
runs-on: [self-hosted, Windows]
135-
#runs-on: windows-2022
124+
runs-on: windows-2022
136125
env:
137-
CC: cl.exe
138-
CXX: cl.exe
139126
SCCACHE_IDLE_TIMEOUT: "12000"
140127
strategy:
141128
fail-fast: false
142129
matrix:
143130
config: [Debug, Release]
131+
144132
steps:
145133
- name: Checkout repository
146-
uses: actions/checkout@v1
134+
uses: actions/checkout@v4.1.6
147135
with:
148136
fetch-depth: 10
149-
150-
- name: Configure and build
137+
138+
- name: Install Ninja
139+
uses: seanmiddleditch/gha-setup-ninja@master
140+
141+
- name: Dependencies
142+
run: |
143+
choco install -y sccache
144+
"SCCACHE_DIR=${env:LOCALAPPDATA}\Mozilla\sccache" | Out-File -FilePath $env:GITHUB_ENV -Append
145+
146+
- name: Cache build
147+
id: cache-build
148+
uses: actions/cache@v4
149+
with:
150+
path: ${{ env.SCCACHE_DIR }}
151+
key: ${{ runner.os }}-${{ matrix.config }}-cache-${{ github.sha }}
152+
restore-keys: ${{ runner.os }}-${{ matrix.config }}-cache
153+
154+
- name: Prepare sccache
155+
run: |
156+
sccache --max-size=1.0G
157+
sccache -V && sccache --show-stats && sccache --zero-stats
158+
159+
- name: Configure
151160
shell: cmd
152161
run: |
153-
call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" -arch=x64
154-
cmake --version
162+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
155163
cmake -G Ninja ^
164+
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache ^
165+
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW ^
166+
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded ^
156167
-DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
157168
-B build ^
158169
-S .
159-
cd build
160-
ninja -j8
170+
171+
- name: Build
172+
shell: cmd
173+
run: |
174+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
175+
cmake --build build -j2 && sccache --show-stats
161176
162177
- name: Tests
163178
run: |
164179
cd build
165-
ctest --verbose --output-on-failure
180+
ctest --verbose --output-on-failure

CMakeLists.txt

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ else()
88
endif()
99

1010
# Check required CMake version
11-
set(REQUIRED_CMAKE_VERSION "3.15.0")
12-
11+
set(REQUIRED_CMAKE_VERSION "3.25.0")
1312
if(WILDMESHING_TOOLKIT_TOPLEVEL_PROJECT)
1413
cmake_minimum_required(VERSION ${REQUIRED_CMAKE_VERSION})
14+
if(CMAKE_VERSION VERSION_GREATER_EQUAL "4.0.0")
15+
message(WARNING "CMake version is ${CMAKE_VERSION}, setting stuff for dependencies.")
16+
SET(CMAKE_POLICY_VERSION_MINIMUM ${REQUIRED_CMAKE_VERSION})
17+
endif()
1518
else()
1619
# Don't use cmake_minimum_required here to avoid implicitly overriding parent policies
1720
if(${CMAKE_VERSION} VERSION_LESS ${REQUIRED_CMAKE_VERSION})
18-
message(FATAL_ERROR "CMake required version to build the toolkit is ${REQUIRED_CMAKE_VERSION}")
21+
message(FATAL_ERROR "CMake required version to build WildMeshingToolkit is ${REQUIRED_CMAKE_VERSION}")
1922
endif()
2023
endif()
2124

@@ -54,19 +57,14 @@ include(sanitizers)
5457
include(wmtk_colors)
5558
include(wmtk_warnings)
5659
include(wmtk_copy_dll)
57-
include(tracy)
5860
include(nlohmann_json)
59-
include(hdf5)
60-
include(high_five)
6161
include(delaunay_psm)
6262
include(onetbb)
6363
include(mshio)
6464
include(metis)
6565
include(gmp)
66-
include(probabilistic_quadrics)
6766
include(lagrange)
6867
include(libigl)
69-
igl_include(predicates)
7068
include(spdlog)
7169
include(paraviewo)
7270
include(fenvelope)
@@ -119,12 +117,8 @@ target_link_libraries(wildmeshing_toolkit PUBLIC
119117
mshio::mshio
120118
metis::metis
121119
lagrange::core
122-
Tracy::TracyClient
123120
nlohmann_json::nlohmann_json
124121
nanoflann::nanoflann
125-
HighFive::HighFive
126-
hdf5::hdf5
127-
probabilistic_quadrics::probabilistic_quadrics
128122
paraviewo::paraviewo
129123
FastEnvelope::FastEnvelope
130124
simple_bvh::simple_bvh

app/harmonic_tet/HarmonicTet.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
#include <igl/predicates/predicates.h>
1212

13-
#include <tracy/Tracy.hpp>
14-
1513
#include <limits>
1614
#include <queue>
1715

attic/app/incremental_tetwild/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,10 @@ add_library(wmtk::incremental_tetwild ALIAS wmtk_incremental_tetwild)
2626
target_include_directories(wmtk_incremental_tetwild PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/)
2727

2828
target_link_libraries(wmtk_incremental_tetwild PUBLIC
29-
Tracy::TracyClient
3029
wmtk::toolkit
3130
wmtk::data
3231
wmtk::sec_lib
3332
wmtk::remeshing_lib
34-
igl::predicates
35-
gmp::gmp
3633
VolumeRemesher::VolumeRemesher
3734
)
3835

attic/app/incremental_tetwild/IncrementalTetWild.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <tbb/concurrent_vector.h>
1515
#include <spdlog/fmt/ostr.h>
1616
#include <spdlog/fmt/bundled/format.h>
17-
#include <tracy/Tracy.hpp>
1817
#include <igl/predicates/predicates.h>
1918
#include <igl/winding_number.h>
2019
#include <igl/write_triangle_mesh.h>
@@ -42,7 +41,6 @@ void tetwild::TetWild::mesh_improvement(int max_its)
4241
////preprocessing
4342
// TODO: refactor to eliminate repeated partition.
4443
//
45-
ZoneScopedN("meshimprovementmain");
4644

4745
// rounding
4846
// std::atomic_int cnt_round(0);
@@ -825,8 +823,9 @@ std::vector<std::array<size_t, 3>> tetwild::TetWild::get_faces_by_condition(
825823
if (cond(m_face_attribute[fid])) {
826824
auto tid = fid / 4, lid = fid % 4;
827825
auto verts = get_face_vertices(f);
828-
res.emplace_back(std::array<size_t, 3>{
829-
{verts[0].vid(*this), verts[1].vid(*this), verts[2].vid(*this)}});
826+
res.emplace_back(
827+
std::array<size_t, 3>{
828+
{verts[0].vid(*this), verts[1].vid(*this), verts[2].vid(*this)}});
830829
}
831830
}
832831
return res;

attic/app/tetwild/TetWild.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ void tetwild::TetWild::mesh_improvement(int max_its)
3737
////preprocessing
3838
// TODO: refactor to eliminate repeated partition.
3939
//
40-
ZoneScopedN("meshimprovementmain");
4140

4241
compute_vertex_partition_morton();
4342

@@ -580,8 +579,9 @@ std::vector<std::array<size_t, 3>> tetwild::TetWild::get_faces_by_condition(
580579
if (cond(m_face_attribute[fid])) {
581580
auto tid = fid / 4, lid = fid % 4;
582581
auto verts = get_face_vertices(f);
583-
res.emplace_back(std::array<size_t, 3>{
584-
{verts[0].vid(*this), verts[1].vid(*this), verts[2].vid(*this)}});
582+
res.emplace_back(
583+
std::array<size_t, 3>{
584+
{verts[0].vid(*this), verts[1].vid(*this), verts[2].vid(*this)}});
585585
}
586586
}
587587
return res;

attic/app/tetwild/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727

2828
int main(int argc, char** argv)
2929
{
30-
ZoneScopedN("tetwildmain");
31-
3230
tetwild::Parameters params;
3331

3432
CLI::App app{argv[0]};

cmake/recipes/fmt.cmake

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)