mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
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
|
||||
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
|
||||
shell: bash
|
||||
@ -146,7 +146,7 @@ jobs:
|
||||
sleep 5
|
||||
fi
|
||||
# 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
|
||||
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
|
||||
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
|
||||
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.
|
||||
else
|
||||
# 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
|
||||
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
|
||||
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
|
||||
|
||||
@ -206,8 +206,8 @@ jobs:
|
||||
if: matrix.platform.name != 'Android'
|
||||
shell: bash
|
||||
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 --build $GITHUB_WORKSPACE/test/install/build --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }}
|
||||
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 test/install/build --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }}
|
||||
|
||||
format:
|
||||
name: Formatting
|
||||
@ -224,7 +224,7 @@ jobs:
|
||||
run: sudo apt-get install clang-format-14
|
||||
|
||||
- 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
|
||||
run: git diff --exit-code
|
||||
@ -276,4 +276,4 @@ jobs:
|
||||
|
||||
- name: Analyze Code
|
||||
shell: bash
|
||||
run: cmake --build $GITHUB_WORKSPACE/build --target tidy
|
||||
run: cmake --build build --target tidy
|
||||
|
Loading…
Reference in New Issue
Block a user