Skip to content

Commit

Permalink
🔀 merge main into addDroplet1D
Browse files Browse the repository at this point in the history
  • Loading branch information
micheltakken committed Nov 17, 2023
1 parent d47d706 commit 3e08488
Show file tree
Hide file tree
Showing 11 changed files with 941 additions and 613 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ubuntu_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Ubuntu-test

on:
pull_request:
types: [opened, reopened, edited]
branches: [main, develop]

jobs:
test:
runs-on: ubuntu-latest

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

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
run: cmake --build ${{github.workspace}}/build

- name: Test
working-directory: ${{github.workspace}}/build
run: ./simulatorTest
18 changes: 17 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ FetchContent_Declare(
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG 3.3.9
)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.11.0
)
FetchContent_Declare(
json
GIT_REPOSITORY https://github.com/nlohmann/json.git
Expand All @@ -32,7 +37,7 @@ FetchContent_Declare(
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
)
FetchContent_MakeAvailable(eigen json lbm)
FetchContent_MakeAvailable(eigen googletest json lbm)

add_library(lbmLib)

Expand Down Expand Up @@ -103,3 +108,14 @@ option(BINDINGS "Configure for building Python bindings")
if(BINDINGS)
add_subdirectory(python/mmft/hybridsim)
endif()

# create tests
enable_testing()
include(GoogleTest)
set(TARGET_NAME simulatorTest)
add_executable(${TARGET_NAME})
target_link_libraries(${TARGET_NAME} PUBLIC gtest gtest_main)
target_link_libraries(${TARGET_NAME} PUBLIC gtest lbmLib)
target_link_libraries(${TARGET_NAME} PUBLIC gtest hybridLib)
add_subdirectory(tests)
gtest_discover_tests(${TARGET_NAME})
Loading

0 comments on commit 3e08488

Please sign in to comment.