Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ on:
branches:
- main
- dev

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
builds-and-tests:
env:
VCPKG_BINARY_SOURCES: clear
strategy:
matrix:
preset: [
Expand Down Expand Up @@ -51,7 +56,19 @@ jobs:
- name: Windows configure and build
if: matrix.preset.name=='msbuild'
run: |
cmake --preset ${{matrix.preset.name}} -S . -B build
$configured = $false
for ($attempt = 1; $attempt -le 3; $attempt++) {
cmake --preset ${{matrix.preset.name}} -S . -B build
if ($LASTEXITCODE -eq 0) {
$configured = $true
break
}
if ($attempt -lt 3) {
Write-Host "Configure failed (attempt $attempt/3). Retrying in 20 seconds..."
Start-Sleep -Seconds 20
}
}
if (-not $configured) { exit 1 }
cmake --build build --config ${{matrix.build-type}} -j

- name: Windows Run tests
Expand All @@ -61,12 +78,20 @@ jobs:
- name: Ubuntu configure and build
if: matrix.preset.name=='gnu'
run: |
cmake --preset ${{matrix.preset.name}} -S . -B build
configured=0
for attempt in 1 2 3; do
cmake --preset ${{matrix.preset.name}} -S . -B build && configured=1 && break
if [ "$attempt" -lt 3 ]; then
echo "Configure failed (attempt $attempt/3). Retrying in 20 seconds..."
sleep 20
fi
done
[ "$configured" -eq 1 ] || exit 1
cmake --build build -j

- name: Ubuntu Run tests
if: matrix.preset.name=='gnu'
run: build/bin/tessellator_tests




3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ CMakeUserPresets.json
sliced.vtk
contour.vtk

testData/
testData/
build
65 changes: 65 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "tessellator (gdb)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dbg/bin/tessellator",
"args": ["-i", "testData/cases/alhambra/alhambra.tessellator.json"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"visualizerFile": [
"${workspaceFolder}/resources/Eigen.natvis",
"${workspaceFolder}/resources/nlohmann_json.natvis"
],
"additionalSOLibSearchPath": "",
"showDisplayString": true,
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
},
{
"name": "tessellator_tests (gdb)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build-dbg/bin/tesselator_tests",
Comment thread
lmdiazangulo marked this conversation as resolved.
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"visualizerFile": [
"${workspaceFolder}/resources/Eigen.natvis",
"${workspaceFolder}/resources/nlohmann_json.natvis"
],
"additionalSOLibSearchPath": "",
"showDisplayString": true,
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
]
}
15 changes: 14 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,20 @@
"name": "gnu",
"displayName": "GNU g++ compiler",
"generator": "Ninja",
"inherits": "default"
"inherits": "default",
"cacheVariables": {
"TESSELLATOR_ENABLE_TESTS": "ON",
"TESSELLATOR_ENABLE_CGAL": "OFF"
}
},
{
"name": "gnu-dbg",
"displayName": "GNU g++ compiler - Debug",
"inherits": "gnu",
"binaryDir": "build-dbg/",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "docker",
Expand Down
Loading
Loading