Fixed $GITHUB_WORKSPACE backslashes being escaped by bash when passed to the sh command.

This commit is contained in:
binary1248 2023-04-13 02:47:33 +02:00 committed by Lukas Dürrenberger
parent c6226258db
commit 26b300f923

View File

@ -138,7 +138,8 @@ jobs:
set -e set -e
if [ "${{ runner.os }}" == "Windows" ]; then if [ "${{ runner.os }}" == "Windows" ]; then
# Make use of a test to print OpenGL vendor/renderer/version info to the console # Make use of a test to print OpenGL vendor/renderer/version info to the console
find $GITHUB_WORKSPACE/build/bin -name test-sfml-window.exe -exec sh -c "{} --test-case=\"[Window] sf::Context\" --subcase=\"Version String\" | grep OpenGL" \; # We have to convert the backslashes in $GITHUB_WORKSPACE to (forward) slashes so bash doesn't try to escape them in the sh command
find $(echo $GITHUB_WORKSPACE | sed 's/\\\\/\\//g')/build/bin -name test-sfml-window.exe -exec sh -c "{} --test-case=\"[Window] sf::Context\" --subcase=\"Version String\" | grep OpenGL" \;
# Run the tests # Run the tests
cmake --build $GITHUB_WORKSPACE/build --target runtests --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }} cmake --build $GITHUB_WORKSPACE/build --target runtests --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }}
# Coverage is already generated on Windows when running tests. # Coverage is already generated on Windows when running tests.