Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lbinria committed Feb 2, 2024
1 parent a458414 commit 90061f9
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 16 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Continuous

on: [push]

jobs:

linux-mac:
strategy:
matrix:
cfg: [{os: ubuntu-latest, cxx: g++-12},
{os: ubuntu-latest, cxx: g++-9},
{os: macos-latest, cxx: clang++}]
config: [Release, Debug]

runs-on: ${{ matrix.cfg.os }}

env:
CXX: ${{ matrix.cfg.cxx }}

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config }}

- name: CMake Build
run: cmake --build build --parallel

- name: Run executable
run: build/delete_face_addon model=build/catorus.geogram facet_index=0


windows-msvc:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure CMake
run: cmake -B build

- name: Release build
run: cmake --build build --parallel --config Release

- name: Release run
run: build/Release/delete_face_addon.exe model=build/catorus.geogram facet_index=0

- name: Debug build
run: cmake --build build --parallel --config Debug

- name: Debug run
run: build/Debug/delete_face_addon.exe model=build/catorus.geogram facet_index=0
26 changes: 10 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ if(NOT is_multi_config AND NOT (CMAKE_BUILD_TYPE OR DEFINED ENV{CMAKE_BUILD_TYPE
set(CMAKE_BUILD_TYPE Release CACHE STRING "Release default")
endif()

# Try to find OpenMP package (if installed)
find_package(OpenMP COMPONENTS CXX)

# Display warning and error levels
if (MSVC)
# warning level 4 (and all warnings as errors, /WX)
add_compile_options(/W4)
else()
# lots of warnings and all warnings as errors
add_compile_options(-Wall -Wextra -pedantic)
endif()

# Get development version of ultimaille directly from git repository
include(FetchContent)
FetchContent_Declare(
Expand All @@ -38,14 +26,20 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(param_parser)

message(${ultimaille_SOURCE_DIR})
message(${param_parser_SOURCE_DIR})
# Add ultimaille directory to get ultimaille CMakeLists
include_directories(${ultimaille_SOURCE_DIR})
include_directories(${param_parser_SOURCE_DIR})

# Add executable binary
add_executable(delete_face_addon delete_face_addon.cpp)

# Link binary with ultimaille
target_link_libraries(delete_face_addon ${CMAKE_DL_LIBS} param-parser ultimaille m $<$<BOOL:${OpenMP_CXX_FOUND}>:OpenMP::OpenMP_CXX>)
# Link binary with ultimaille / param-parser
target_link_libraries(delete_face_addon ${CMAKE_DL_LIBS} param-parser ultimaille $<$<BOOL:${OpenMP_CXX_FOUND}>:OpenMP::OpenMP_CXX>)

IF (NOT WIN32)
target_link_libraries(delete_face_addon m)
ENDIF()



file(COPY assets/catorus.geogram DESTINATION .)
Binary file added assets/catorus.geogram
Binary file not shown.

0 comments on commit 90061f9

Please sign in to comment.