Remove $GITHUB_WORKSPACE
where not needed
This commit is contained in:
parent
157feec05d
commit
10bd1ffeba
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@ -132,7 +132,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cmake --build $GITHUB_WORKSPACE/build --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }} --target install
|
run: cmake --build build --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }} --target install
|
||||||
|
|
||||||
- name: Prepare Test
|
- name: Prepare Test
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -146,7 +146,7 @@ jobs:
|
|||||||
sleep 5
|
sleep 5
|
||||||
fi
|
fi
|
||||||
# Make sure the build/bin directory exists so that the find command does not fail if no executables are built
|
# Make sure the build/bin directory exists so that the find command does not fail if no executables are built
|
||||||
mkdir -p $GITHUB_WORKSPACE/build/bin
|
mkdir -p build/bin
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
uses: nick-fields/retry@v2
|
uses: nick-fields/retry@v2
|
||||||
@ -163,16 +163,16 @@ jobs:
|
|||||||
# We have to convert the backslashes in $GITHUB_WORKSPACE to (forward) slashes so bash doesn't try to escape them in the sh command
|
# 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 "{} *sf::Context* --section=\"Version String\" --success | grep OpenGL" \;
|
find $(echo $GITHUB_WORKSPACE | sed 's/\\\\/\\//g')/build/bin -name test-sfml-window.exe -exec sh -c "{} *sf::Context* --section=\"Version String\" --success | grep OpenGL" \;
|
||||||
# Run the tests
|
# Run the tests
|
||||||
cmake --build $GITHUB_WORKSPACE/build --target runtests --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }}
|
cmake --build 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.
|
||||||
else
|
else
|
||||||
# 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 -exec sh -c "{} *sf::Context* --section=\"Version String\" --success | grep OpenGL" \;
|
find build/bin -name test-sfml-window -exec sh -c "{} *sf::Context* --section=\"Version String\" --success | grep OpenGL" \;
|
||||||
# Run the tests
|
# Run the tests
|
||||||
ctest --test-dir $GITHUB_WORKSPACE/build --output-on-failure -C ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }}
|
ctest --test-dir build --output-on-failure -C ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }}
|
||||||
# Run gcovr to extract coverage information from the test run
|
# Run gcovr to extract coverage information from the test run
|
||||||
if [ "${{ matrix.type.name }}" == "Debug" ]; then
|
if [ "${{ matrix.type.name }}" == "Debug" ]; then
|
||||||
gcovr -r $GITHUB_WORKSPACE -x $GITHUB_WORKSPACE/build/coverage.out -s -f 'src/SFML/.*' -f 'include/SFML/.*' ${{ matrix.platform.gcovr_options }} $GITHUB_WORKSPACE
|
gcovr -r $GITHUB_WORKSPACE -x build/coverage.out -s -f 'src/SFML/.*' -f 'include/SFML/.*' ${{ matrix.platform.gcovr_options }} $GITHUB_WORKSPACE
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -206,8 +206,8 @@ jobs:
|
|||||||
if: matrix.platform.name != 'Android'
|
if: matrix.platform.name != 'Android'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake -S $GITHUB_WORKSPACE/test/install -B $GITHUB_WORKSPACE/test/install/build -DSFML_ROOT=$GITHUB_WORKSPACE/build/install -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }} ${{matrix.platform.flags}} ${{matrix.config.flags}} ${{matrix.type.flags}}
|
cmake -S test/install -B test/install/build -DSFML_ROOT=build/install -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }} ${{matrix.platform.flags}} ${{matrix.config.flags}} ${{matrix.type.flags}}
|
||||||
cmake --build $GITHUB_WORKSPACE/test/install/build --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }}
|
cmake --build test/install/build --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }}
|
||||||
|
|
||||||
format:
|
format:
|
||||||
name: Formatting
|
name: Formatting
|
||||||
@ -224,7 +224,7 @@ jobs:
|
|||||||
run: sudo apt-get install clang-format-14
|
run: sudo apt-get install clang-format-14
|
||||||
|
|
||||||
- name: Format Code
|
- name: Format Code
|
||||||
run: cmake -DCLANG_FORMAT_EXECUTABLE=clang-format-14 -P $GITHUB_WORKSPACE/cmake/Format.cmake
|
run: cmake -DCLANG_FORMAT_EXECUTABLE=clang-format-14 -P cmake/Format.cmake
|
||||||
|
|
||||||
- name: Check Formatting
|
- name: Check Formatting
|
||||||
run: git diff --exit-code
|
run: git diff --exit-code
|
||||||
@ -276,4 +276,4 @@ jobs:
|
|||||||
|
|
||||||
- name: Analyze Code
|
- name: Analyze Code
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cmake --build $GITHUB_WORKSPACE/build --target tidy
|
run: cmake --build build --target tidy
|
||||||
|
Loading…
Reference in New Issue
Block a user