Added test-shared (expected to fail)

This commit is contained in:
Charlton, Scott R. 2024-08-02 16:22:53 -06:00
parent e63b635632
commit 44c7f133e7
2 changed files with 65 additions and 0 deletions

View File

@ -71,6 +71,39 @@ jobs:
name: ${{ matrix.os }}-test-results
path: ${{ github.workspace }}/_ctest/Testing/
test-shared:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install ninja valgrind (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y ninja-build valgrind
- name: Install ninja (macOS)
if: runner.os == 'macOS'
run: brew install ninja
- name: Set up Visual Studio shell (Windows)
if: runner.os == 'Windows'
uses: egor-tensin/vs-shell@v2
with:
arch: x64
- name: CTest
run: ctest -S ctest-shared.cmake -V --output-on-failure --timeout 900
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-test-shared-results
path: ${{ github.workspace }}/_ctest_shared/Testing/
chm:
runs-on: windows-latest

32
ctest-shared.cmake Normal file
View File

@ -0,0 +1,32 @@
include(CTestConfig.cmake)
site_name(CTEST_SITE)
set(CTEST_BUILD_NAME ${CMAKE_HOST_SYSTEM_NAME})
set(CTEST_SOURCE_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}")
set(CTEST_BINARY_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}/_ctest_shared")
##set(ENV{CXXFLAGS} "--coverage")
set(CTEST_CMAKE_GENERATOR Ninja)
set(CTEST_CONFIGURATION_TYPE Debug)
set(CTEST_BUILD_CONFIGURATION Debug)
set(CTEST_USE_LAUNCHERS 1)
set(CTEST_UPDATE_TYPE git)
set(CTEST_UPDATE_COMMAND git)
set(CTEST_UPDATE_VERSION_ONLY TRUE)
##set(CTEST_COVERAGE_COMMAND "gcov")
##find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
ctest_start("Continuous")
ctest_update()
ctest_configure(OPTIONS "-L;-DBUILD_SHARED_LIBS:BOOL=ON")
ctest_build()
ctest_test()
#ctest_coverage()
if (CTEST_MEMORYCHECK_COMMAND)
ctest_memcheck()
endif()
##ctest_submit()