From f4e60c9cfccf204d0cb164f2f1e93a91b13e0e90 Mon Sep 17 00:00:00 2001 From: Marco Thaller Date: Fri, 8 Nov 2024 09:18:55 +0100 Subject: [PATCH] Workflow (re)enable tests --- .github/workflows/build_windows.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 5526aa2..98460e9 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -60,28 +60,27 @@ jobs: & .\Slint-cpp-$env:SLINT_VERSION-win64.exe /S /D=c:\slint Write-Output "SLINT_INSTALL_LOCATION=c:\slint" >> $env:GITHUB_ENV - # Tests build only on Linux right now + # Tests build - name: Configure project run: > cmake -S . -B ./build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - -DBUILD_TESTS=${{ matrix.os == 'Linux' && matrix.build_type == 'Debug'}} + -DBUILD_TESTS=${{ matrix.build_type == 'Debug'}} -DCMAKE_PREFIX_PATH=${{ env.SLINT_INSTALL_LOCATION }} - name: Build Project run: cmake --build ./build -# Tests turned off due to linker errors on Windows -# - name: Run tests on Windows/macOS -# if: ${{ matrix.build_type == 'Debug' && runner.os != 'Linux' }} -# run: ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure + - name: Run tests on Windows/macOS + if: ${{ matrix.build_type == 'Debug' && runner.os != 'Linux' }} + run: ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure - # - name: Run tests on Linux - # if: ${{ matrix.build_type == 'Debug' && runner.os == 'Linux' }} - # run: ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure + - name: Run tests on Linux + if: ${{ matrix.build_type == 'Debug' && runner.os == 'Linux' }} + run: ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure - # - name: Read tests log when it fails - # uses: andstor/file-reader-action@v1 - # if: ${{ failure() && matrix.build_type == 'Debug' }} - # with: - # path: "./build/Testing/Temporary/LastTest.log" + - name: Read tests log when it fails + uses: andstor/file-reader-action@v1 + if: ${{ failure() && matrix.build_type == 'Debug' }} + with: + path: "./build/Testing/Temporary/LastTest.log"