diff options
author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2017-05-07 03:43:04 -0400 |
---|---|---|
committer | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2017-05-21 16:11:33 -0400 |
commit | 6e2fff1f4421309a182ca5cf55d971ff31fda7d1 (patch) | |
tree | 8f7b8ee37f54e227fd69ba922ce0c41b24a3906c | |
parent | fcfe3c32316ade43b65eeed4337f305f03e0687b (diff) | |
download | meson-6e2fff1f4421309a182ca5cf55d971ff31fda7d1.zip meson-6e2fff1f4421309a182ca5cf55d971ff31fda7d1.tar.gz meson-6e2fff1f4421309a182ca5cf55d971ff31fda7d1.tar.bz2 |
Enable code coverage on AppVeyor.
* Install pip on msys (which doesn't have it)
* Install codecov/coverage everywhere.
* Generate coverage XML file manually because codecov tries to call the
coverage script itself and it's in a weird place on the path.
-rw-r--r-- | .appveyor.yml | 24 | ||||
-rw-r--r-- | ci/appveyor-install.bat | 2 |
2 files changed, 19 insertions, 7 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index 8ab1931..dba0bef 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -59,18 +59,24 @@ install: # For all other archs (including, say, arm), use the x64 python. - ps: (new-object net.webclient).DownloadFile('https://www.dropbox.com/s/bbzvepq85hv47x1/ninja.exe?dl=1', 'C:\projects\meson\ninja.exe') - cmd: if %arch%==x86 (set MESON_PYTHON_PATH=C:\python34) else (set MESON_PYTHON_PATH=C:\python34-x64) - - cmd: echo Using Python at %MESON_PYTHON_PATH% + # Set paths and config for each build type. - cmd: if %compiler%==msvc2010 ( call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %arch% ) - cmd: if %compiler%==msvc2015 ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch% ) - cmd: if %compiler%==msvc2017 ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=%arch% ) - - cmd: if %compiler%==msys2-mingw (if %arch%==x86 (set "PATH=C:\msys64\mingw32\bin;%PATH%") else (set "PATH=C:\msys64\mingw64\bin;%PATH%")) - - - cmd: if %compiler%==cygwin ( call ci\appveyor-install.bat ) - cmd: if not %compiler%==cygwin ( set "PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%;" ) - - cmd: if %compiler%==cygwin ( set WRAPPER=ci\run-in-cygwin.bat ) - cmd: if %compiler%==cygwin ( set PYTHON=python3 ) else ( set PYTHON=python ) + - cmd: if %compiler%==cygwin ( set WRAPPER=ci\run-in-cygwin.bat ) + - cmd: if %compiler%==cygwin ( %WRAPPER% which %PYTHON% ) else ( where %PYTHON% ) + + # Install additional packages needed for specific builds. + - ps: If($Env:compiler -eq 'msys2-mingw') {(new-object Net.WebClient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', 'C:\projects\meson\get-pip.py')} + - cmd: if %compiler%==msys2-mingw ( %PYTHON% "C:\projects\meson\get-pip.py" ) + - cmd: if %compiler%==cygwin ( call ci\appveyor-install.bat ) + + # Install additional packages needed for all builds. + - cmd: "%WRAPPER% %PYTHON% -m pip install codecov" build_script: - cmd: echo No build step. @@ -78,7 +84,13 @@ build_script: test_script: - cmd: echo Running tests for %arch% and %compiler% with the %backend% backend - - cmd: "%WRAPPER% %PYTHON% run_tests.py --backend=%backend%" + - cmd: "%WRAPPER% %PYTHON% run_tests.py --cov --backend=%backend%" + +after_test: + - cmd: "%WRAPPER% %PYTHON% -m coverage combine" + # Generate XML report manually because codecov module doesn't know how to run it properly. + - cmd: "%WRAPPER% %PYTHON% -m coverage xml" + - cmd: "%WRAPPER% %PYTHON% -m codecov -X search pycov -f coverage.xml" on_finish: - set "PATH=%ORIG_PATH%" diff --git a/ci/appveyor-install.bat b/ci/appveyor-install.bat index 0c1ce44..becc80a 100644 --- a/ci/appveyor-install.bat +++ b/ci/appveyor-install.bat @@ -7,5 +7,5 @@ if _%arch%_ == _x86_ set SETUP=setup-x86.exe && set CYGWIN_ROOT=C:\cygwin if not exist %CACHE% mkdir %CACHE% echo Updating Cygwin and installing ninja and test prerequisites -%CYGWIN_ROOT%\%SETUP% -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -l "%CACHE%" -g -P "ninja,gcc-objc,gcc-objc++,libglib2.0-devel,zlib-devel" +%CYGWIN_ROOT%\%SETUP% -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -l "%CACHE%" -g -P "ninja,gcc-objc,gcc-objc++,libglib2.0-devel,zlib-devel,python3-pip" echo Install done |