mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #5876
5876: Try code coverage (fixes #5873) r=Robyt3 a=def- <!-- What is the motivation for the changes of this pull request? --> <!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. --> ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
commit
2da08777ff
17
.github/workflows/build.yaml
vendored
17
.github/workflows/build.yaml
vendored
|
@ -58,7 +58,7 @@ jobs:
|
|||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get upgrade -y
|
||||
sudo apt-get install pkg-config cmake ninja-build libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev libvulkan-dev glslang-tools spirv-tools libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libx264-dev libpng-dev valgrind -y
|
||||
sudo apt-get install pkg-config cmake ninja-build libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev libvulkan-dev glslang-tools spirv-tools libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libx264-dev libpng-dev valgrind gcovr -y
|
||||
|
||||
- name: Prepare Linux (non-fancy)
|
||||
if: ${{ contains(matrix.os, 'ubuntu') && !matrix.fancy }}
|
||||
|
@ -138,16 +138,22 @@ jobs:
|
|||
./DDNet-Server shutdown
|
||||
|
||||
- name: Build headless client
|
||||
if: contains(matrix.os, 'ubuntu-latest')
|
||||
env: ${{ matrix.env }}
|
||||
run: |
|
||||
mkdir headless
|
||||
cd headless
|
||||
CFLAGS="$CFLAGS --coverage"
|
||||
CXXFLAGS="$CXXFLAGS --coverage"
|
||||
LDFLAGS="$LDFLAGS --coverage"
|
||||
${{ matrix.cmake-path }}cmake --version
|
||||
${{ matrix.cmake-path }}cmake ${{ matrix.cmake-args }} -DHEADLESS_CLIENT=ON -DCMAKE_BUILD_TYPE=Debug -Werror=dev -DDOWNLOAD_GTEST=ON -DDEV=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=. ..
|
||||
${{ matrix.cmake-path }}cmake --build . --config Debug ${{ matrix.build-args }}
|
||||
- name: Test headless client
|
||||
if: contains(matrix.os, 'ubuntu-latest')
|
||||
run: |
|
||||
cd headless
|
||||
${{ matrix.cmake-path }}cmake --build . --config Debug --target run_tests ${{ matrix.build-args }}
|
||||
./DDNet-Server &
|
||||
./DDNet "cl_download_skins 0;connect localhost:8303;quit"
|
||||
|
||||
|
@ -174,7 +180,7 @@ jobs:
|
|||
./DDNet-Server shutdown
|
||||
|
||||
- name: Run integration tests with Valgrind's Memcheck
|
||||
if: contains(matrix.os, 'ubuntu')
|
||||
if: contains(matrix.os, 'ubuntu-latest')
|
||||
run: |
|
||||
cd headless
|
||||
./integration_test.sh --valgrind-memcheck
|
||||
|
@ -191,3 +197,10 @@ jobs:
|
|||
with:
|
||||
name: ddnet-${{ matrix.os }}
|
||||
path: release/artifacts
|
||||
|
||||
- name: Upload Codecov report
|
||||
if: contains(matrix.os, 'ubuntu-latest')
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
gcov: true
|
||||
gcov_include: src
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[![DDraceNetwork](https://ddnet.org/ddnet-small.png)](https://ddnet.org) [![](https://github.com/ddnet/ddnet/workflows/Build/badge.svg)](https://github.com/ddnet/ddnet/actions?query=workflow%3ABuild+event%3Apush+branch%3Amaster)
|
||||
[![DDraceNetwork](https://ddnet.org/ddnet-small.png)](https://ddnet.org) [![](https://github.com/ddnet/ddnet/workflows/Build/badge.svg)](https://github.com/ddnet/ddnet/actions?query=workflow%3ABuild+event%3Apush+branch%3Amaster) [![](https://codecov.io/gh/ddnet/ddnet/branch/master/graph/badge.svg)](https://codecov.io/gh/ddnet/ddnet/branch/master)
|
||||
|
||||
Our own flavor of DDRace, a Teeworlds mod. See the [website](https://ddnet.org) for more information.
|
||||
|
||||
|
|
Loading…
Reference in a new issue