Browse Source

package/ci: code coverage on AppVeyor MinGW.

pull/231/head
Vladimír Vondruš 8 years ago
parent
commit
b9280fc0c0
  1. 9
      doc/building.dox
  2. 11
      package/ci/appveyor-desktop-mingw.bat
  3. 16
      package/ci/appveyor-lcov.sh
  4. 1
      package/ci/appveyor.yml

9
doc/building.dox

@ -861,14 +861,17 @@ building your projects for Android.
In `package/ci/` there is a `travis.yml` file with Linux GCC 4.7, macOS, Linux
desktop GLES2/GLES3, iOS GLES2/GLES3, Emscripten WebGL1/WebGL2, Android
GLES2/GLES3, AddressSanitizer and ThreadSanitizer configuration. Online at
https://travis-ci.org/mosra/magnum. The builds have code coverage reports
available online at https://codecov.io/gh/mosra/magnum.
https://travis-ci.org/mosra/magnum.
@subsection building-ci-appveyor AppVeyor
In `package/ci/` there is an `appveyor.yml` file with Windows desktop MSVC,
MinGW, Windows desktop GLES2/GLES3 and Windows RT GLES2/GLES3 configuration.
Online at https://ci.appveyor.com/project/mosra/magnum.
*/
@subsection building-ci-coverage Codecov.io
Linux, Linux GLES, macOS and Windows MinGW builds contribute to a combined code
coverage report, available online at https://codecov.io/gh/mosra/magnum.
*/
}

11
package/ci/appveyor-desktop-mingw.bat

@ -7,7 +7,8 @@ git clone --depth 1 git://github.com/mosra/corrade.git || exit /b
cd corrade || exit /b
mkdir build && cd build || exit /b
cmake .. ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_CXX_FLAGS="--coverage" ^
-DCMAKE_BUILD_TYPE=Debug ^
-DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/deps ^
-DWITH_INTERCONNECT=OFF ^
-G Ninja || exit /b
@ -18,7 +19,8 @@ cd .. && cd ..
rem Build
mkdir build && cd build || exit /b
cmake .. ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_CXX_FLAGS="--coverage" ^
-DCMAKE_BUILD_TYPE=Debug ^
-DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/deps ^
-DCMAKE_PREFIX_PATH="%APPVEYOR_BUILD_FOLDER%/SDL;%APPVEYOR_BUILD_FOLDER%/openal" ^
-DWITH_AUDIO=ON ^
@ -45,3 +47,8 @@ cmake --build . --target install || exit /b
rem Test
ctest -V -E GLTest || exit /b
rem Coverage upload
set PATH=C:\msys64\usr\bin;%PATH%
bash %APPVEYOR_BUILD_FOLDER%\package\ci\appveyor-lcov.sh || exit /b
codecov -f coverage.info -X gcov

16
package/ci/appveyor-lcov.sh

@ -0,0 +1,16 @@
#!/bin/bash
set -ev
pacman -Sy --noconfirm mingw-w64-x86_64-perl
# mingw lcov package is empty, so download and use it manually
# https://github.com/appveyor/ci/issues/1628
wget https://github.com/linux-test-project/lcov/archive/v1.13.tar.gz
tar -xzf v1.13.tar.gz
# Keep in sync with PKBUILD-coverage, please
lcov-1.13/bin/lcov --gcov-tool /c/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/bin/gcov --directory . --capture --output-file coverage.info > /dev/null
lcov-1.13/bin/lcov --gcov-tool /c/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/bin/gcov --extract coverage.info "*/src/Magnum*/*" --output-file coverage.info > /dev/null
lcov-1.13/bin/lcov --gcov-tool /c/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/bin/gcov --remove coverage.info "*/src/MagnumExternal/*" --output-file coverage.info > /dev/null
lcov-1.13/bin/lcov --gcov-tool /c/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/bin/gcov --remove coverage.info "*/Test/*" --output-file coverage.info > /dev/null
lcov-1.13/bin/lcov --gcov-tool /c/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/bin/gcov --remove coverage.info "*/build/src/*" --output-file coverage.info > /dev/null

1
package/ci/appveyor.yml

@ -59,6 +59,7 @@ notifications:
install:
- cinst ninja
- set PATH=C:/tools/ninja;%PATH%
- IF "%TARGET%" == "desktop" IF "%COMPILER%" == "mingw" pip install codecov
# OpenAL
- IF NOT "%TARGET%" == "rt" IF NOT EXIST %APPVEYOR_BUILD_FOLDER%\openal-soft-1.17.2-bin.zip appveyor DownloadFile http://kcat.strangesoft.net/openal-binaries/openal-soft-1.17.2-bin.zip

Loading…
Cancel
Save