From a58836505ad21f5bee2bfe73f49da589951f239f Mon Sep 17 00:00:00 2001 From: Michael Brunner <71121348+Brunner246@users.noreply.github.com> Date: Mon, 23 Sep 2024 17:46:27 +0200 Subject: [PATCH 1/9] Update build-matrix.yml --- .github/workflows/build-matrix.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-matrix.yml b/.github/workflows/build-matrix.yml index 1efa3f1..139e114 100644 --- a/.github/workflows/build-matrix.yml +++ b/.github/workflows/build-matrix.yml @@ -67,7 +67,6 @@ jobs: echo "Contents of output directory:" ls -R ${{ github.workspace }}/output/bin/release - -# - name: Run tests -# run: | -# ctest --test-dir ${{ github.workspace }}/output/bin/release --output-on-failure -C Release \ No newline at end of file + - name: Run tests + run: | + ctest --test-dir ${{ github.workspace }}/output/bin/release --output-on-failure -C Release From 6dc96c7bd8a2060b7a4809cf41ba7b440ebaf19d Mon Sep 17 00:00:00 2001 From: Michael Brunner <71121348+Brunner246@users.noreply.github.com> Date: Mon, 23 Sep 2024 18:02:38 +0200 Subject: [PATCH 2/9] Update build-matrix.yml --- .github/workflows/build-matrix.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-matrix.yml b/.github/workflows/build-matrix.yml index 139e114..ad34084 100644 --- a/.github/workflows/build-matrix.yml +++ b/.github/workflows/build-matrix.yml @@ -67,6 +67,18 @@ jobs: echo "Contents of output directory:" ls -R ${{ github.workspace }}/output/bin/release - - name: Run tests + - name: Run tests on both platforms run: | - ctest --test-dir ${{ github.workspace }}/output/bin/release --output-on-failure -C Release + if [[ "$RUNNER_OS" == "Linux" ]]; then + for test_exe in ${{ github.workspace }}/build/*_tests; do + echo "Running $test_exe" + "$test_exe" + done + elif [[ "$RUNNER_OS" == "Windows" ]]; then + Get-ChildItem -Path "${{ github.workspace }}\build\*_tests.exe" | ForEach-Object { + echo "Running $($_.FullName)" + & $_.FullName + } + fi + shell: bash + From 6f0a562e6eafefaae714da5557fd6f9303edc306 Mon Sep 17 00:00:00 2001 From: Michael Brunner <71121348+Brunner246@users.noreply.github.com> Date: Mon, 23 Sep 2024 18:15:09 +0200 Subject: [PATCH 3/9] Update build-matrix.yml --- .github/workflows/build-matrix.yml | 31 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-matrix.yml b/.github/workflows/build-matrix.yml index ad34084..ae28efa 100644 --- a/.github/workflows/build-matrix.yml +++ b/.github/workflows/build-matrix.yml @@ -67,18 +67,23 @@ jobs: echo "Contents of output directory:" ls -R ${{ github.workspace }}/output/bin/release - - name: Run tests on both platforms - run: | - if [[ "$RUNNER_OS" == "Linux" ]]; then - for test_exe in ${{ github.workspace }}/build/*_tests; do - echo "Running $test_exe" - "$test_exe" - done - elif [[ "$RUNNER_OS" == "Windows" ]]; then - Get-ChildItem -Path "${{ github.workspace }}\build\*_tests.exe" | ForEach-Object { - echo "Running $($_.FullName)" - & $_.FullName - } - fi + # run tests for Linux + - name: Run tests on Linux + if: runner.os == 'Linux' shell: bash + run: | + for test_exe in ${{ github.workspace }}/build/*_tests; do + echo "Running $test_exe" + "$test_exe" + done + + # run tests for Windows + - name: Run tests on Windows + if: runner.os == 'Windows' + shell: pwsh + run: | + Get-ChildItem -Path "${{ github.workspace }}\build\*_tests.exe" | ForEach-Object { + echo "Running $($_.FullName)" + & $_.FullName + } From b88b1ed3b298723a23e34efe111f0152db75c5f1 Mon Sep 17 00:00:00 2001 From: Michael Brunner <71121348+Brunner246@users.noreply.github.com> Date: Mon, 23 Sep 2024 18:34:27 +0200 Subject: [PATCH 4/9] Update build-matrix.yml --- .github/workflows/build-matrix.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/build-matrix.yml b/.github/workflows/build-matrix.yml index ae28efa..b495eeb 100644 --- a/.github/workflows/build-matrix.yml +++ b/.github/workflows/build-matrix.yml @@ -67,16 +67,6 @@ jobs: echo "Contents of output directory:" ls -R ${{ github.workspace }}/output/bin/release - # run tests for Linux - - name: Run tests on Linux - if: runner.os == 'Linux' - shell: bash - run: | - for test_exe in ${{ github.workspace }}/build/*_tests; do - echo "Running $test_exe" - "$test_exe" - done - # run tests for Windows - name: Run tests on Windows if: runner.os == 'Windows' From 776e69e9f9a6d4df4645a99919ba5ecf7487a1c4 Mon Sep 17 00:00:00 2001 From: Michael Brunner <71121348+Brunner246@users.noreply.github.com> Date: Mon, 23 Sep 2024 18:53:23 +0200 Subject: [PATCH 5/9] Update build-matrix.yml try https://github.com/marketplace/actions/ctest-action --- .github/workflows/build-matrix.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-matrix.yml b/.github/workflows/build-matrix.yml index b495eeb..ee835ee 100644 --- a/.github/workflows/build-matrix.yml +++ b/.github/workflows/build-matrix.yml @@ -58,22 +58,18 @@ jobs: run: | cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake - - name: Build - run: | - cmake --build build --config Release + - name: Configure and Build Project + uses: threeal/cmake-action@v1.3.0 + with: + run-build: true - name: List contents of output directory run: | echo "Contents of output directory:" ls -R ${{ github.workspace }}/output/bin/release - # run tests for Windows - - name: Run tests on Windows - if: runner.os == 'Windows' - shell: pwsh - run: | - Get-ChildItem -Path "${{ github.workspace }}\build\*_tests.exe" | ForEach-Object { - echo "Running $($_.FullName)" - & $_.FullName - } + - name: Test RaptorXX + uses: threeal/ctest-action@v1.1.0 + with: + build-config: Release From c19d27fe883a776a0ff874d24a9352058e2a3c02 Mon Sep 17 00:00:00 2001 From: Michael Brunner <71121348+Brunner246@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:02:03 +0200 Subject: [PATCH 6/9] Update build-matrix.yml --- .github/workflows/build-matrix.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-matrix.yml b/.github/workflows/build-matrix.yml index ee835ee..9ea0f5b 100644 --- a/.github/workflows/build-matrix.yml +++ b/.github/workflows/build-matrix.yml @@ -58,10 +58,9 @@ jobs: run: | cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake - - name: Configure and Build Project - uses: threeal/cmake-action@v1.3.0 - with: - run-build: true + - name: Build + run: | + cmake --build build --config Release - name: List contents of output directory run: | @@ -72,4 +71,5 @@ jobs: uses: threeal/ctest-action@v1.1.0 with: build-config: Release + test-dir: ${{ github.workspace }}/output/bin/release From 6b0f6957e77adffe1caff7c6fd0ab850e132e327 Mon Sep 17 00:00:00 2001 From: Michael Brunner <71121348+Brunner246@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:39:14 +0200 Subject: [PATCH 7/9] Update CMakeLists.txt --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e05323..d040270 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,9 @@ else () message(WARNING "You are using an unsupported compiler! Compilation has only been tested with MSVC, GCC and Clang.") endif () +include(CTest) +enable_testing() + configure_file( "src/ProjectConfig.h.in" "${PROJECT_BINARY_DIR}/ProjectConfig.h" @@ -61,6 +64,3 @@ add_subdirectory(test/test_gtfsRaptorConfig) # BECHMARKS add_subdirectory(benchmark/benchmark_schedule) add_subdirectory(benchmark/benchmark_gtfsRaptor) - -include(CTest) -enable_testing() From a5f1755ce13a79bf3f4be29b82c31a795e7bac0d Mon Sep 17 00:00:00 2001 From: Michael Brunner <71121348+Brunner246@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:40:40 +0200 Subject: [PATCH 8/9] Update build-matrix.yml --- .github/workflows/build-matrix.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-matrix.yml b/.github/workflows/build-matrix.yml index 9ea0f5b..a3eea83 100644 --- a/.github/workflows/build-matrix.yml +++ b/.github/workflows/build-matrix.yml @@ -67,9 +67,8 @@ jobs: echo "Contents of output directory:" ls -R ${{ github.workspace }}/output/bin/release - - name: Test RaptorXX - uses: threeal/ctest-action@v1.1.0 - with: - build-config: Release - test-dir: ${{ github.workspace }}/output/bin/release + - name: Run Tests with CTest + run: | + cd build + ctest --output-on-failure -C Release From 455eee1240143a5db59a3146b8252c39977589a4 Mon Sep 17 00:00:00 2001 From: Michael Brunner <71121348+Brunner246@users.noreply.github.com> Date: Mon, 23 Sep 2024 20:02:36 +0200 Subject: [PATCH 9/9] Update build-matrix.yml --- .github/workflows/build-matrix.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build-matrix.yml b/.github/workflows/build-matrix.yml index a3eea83..4f2f2a5 100644 --- a/.github/workflows/build-matrix.yml +++ b/.github/workflows/build-matrix.yml @@ -67,8 +67,3 @@ jobs: echo "Contents of output directory:" ls -R ${{ github.workspace }}/output/bin/release - - name: Run Tests with CTest - run: | - cd build - ctest --output-on-failure -C Release -