Skip to content

Commit

Permalink
Revise CTest configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeu committed Oct 27, 2024
1 parent 7677f73 commit 0926ac7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/checkCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
build:
name: build_cmake_${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}
timeout-minutes: 5
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -45,11 +45,11 @@ jobs:
- name: Configure
run: |
if [ "${{ matrix.compiler }}" == "msvc" ]; then
cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" -DBUILD_TESTING=ON -DMODELICA_DEBUG_TIME_EVENTS=ON
cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" -DMODELICA_DEBUG_TIME_EVENTS=ON
elif [ "${{ matrix.compiler }}" == "mingw" ]; then
cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" -DBUILD_TESTING=ON -DMODELICA_DEBUG_TIME_EVENTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -G "MinGW Makefiles"
cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" -DMODELICA_DEBUG_TIME_EVENTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -G "MinGW Makefiles"
else
cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" -DBUILD_TESTING=ON -DMODELICA_DEBUG_TIME_EVENTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_C_FLAGS="-Wall -Wextra"
cmake -S "$SRCDIR" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$TESTDIR" -DMODELICA_DEBUG_TIME_EVENTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_C_FLAGS="-Wall -Wextra"
fi
env:
SRCDIR: ${{ github.workspace }}/ModelicaTableAdditions/Resources
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- name: Configure
run: |
export PATH=/usr/bin:$PATH
cmake -S "$(cygpath ${SRCDIR})" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$(cygpath ${TESTDIR})" -DBUILD_TESTING=ON -DMODELICA_DEBUG_TIME_EVENTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -G Ninja
cmake -S "$(cygpath ${SRCDIR})" -B build -DMODELICA_UTILITIES_INCLUDE_DIR="$(cygpath ${TESTDIR})" -DMODELICA_DEBUG_TIME_EVENTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -G Ninja
shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'
env:
CYGWIN_NOWINPATH: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ option(MODELICA_COPY_TABLE_DATA "Deep-copy table arrays (passed as array)" ON)

# Option to add a dummy function "usertabadditions"
option(MODELICA_DUMMY_FUNCTION_USERTAB "Add a dummy usertabadditions function" OFF)

# Option to enable testsuite
option(MODELICA_BUILD_TESTING "Build testing" ON)

set(BUILD_TESTING OFF)
if(MODELICA_BUILD_TESTING)
set(BUILD_TESTING ON)
endif()
5 changes: 1 addition & 4 deletions ModelicaTableAdditions/Resources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/Library/${MODELICA_PLATFORM_NA
include(BuildProjects/CMake/compiler_options.cmake)
include(BuildProjects/CMake/options.cmake)

if(BUILD_TESTING)
if(MODELICA_BUILD_TESTING)
enable_testing()
if(PROJECT_IS_TOP_LEVEL)
include(CTest)
endif()
include(BuildProjects/CMake/Modelica_utilities.cmake)
include(BuildProjects/CMake/test.cmake)
endif()
Expand Down

0 comments on commit 0926ac7

Please sign in to comment.