mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-22 11:23:29 +01:00
Speed up AppVeyor build times
* Examples are no longer built for all images * Coverage is no longer collected from every build * The number of configurations is reduced
This commit is contained in:
parent
9d1858b195
commit
dc8a8e6371
41
appveyor.yml
41
appveyor.yml
@ -19,18 +19,51 @@ environment:
|
||||
|
||||
- additional_flags: "/D_UNICODE /DUNICODE"
|
||||
wmain: 1
|
||||
coverage: 0
|
||||
|
||||
# Have a coverage dimension
|
||||
- additional_flags: ""
|
||||
wmain: 0
|
||||
coverage: 1
|
||||
|
||||
# Have an examples dimension
|
||||
- additional_flags: ""
|
||||
wmain: 0
|
||||
examples: 1
|
||||
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
- os: Visual Studio 2015
|
||||
additional_flags: "/permissive- /std:c++latest"
|
||||
|
||||
init:
|
||||
- git config --global core.autocrlf input
|
||||
- os: Visual Studio 2015
|
||||
additional_flags: "/D_UNICODE /DUNICODE"
|
||||
|
||||
# Exclude unwanted coverage configurations
|
||||
- coverage: 1
|
||||
platform: Win32
|
||||
|
||||
- coverage: 1
|
||||
os: Visual Studio 2015
|
||||
|
||||
- coverage: 1
|
||||
configuration: Release
|
||||
|
||||
# Exclude unwanted examples configurations
|
||||
- examples: 1
|
||||
platform: Win32
|
||||
|
||||
- examples: 1
|
||||
os: Visual Studio 2015
|
||||
|
||||
- examples: 1
|
||||
configuration: Release
|
||||
|
||||
|
||||
install:
|
||||
- ps: if (($env:CONFIGURATION) -eq "Debug" ) { python -m pip install codecov }
|
||||
- ps: if (($env:CONFIGURATION) -eq "Debug" ) { .\misc\installOpenCppCoverage.ps1 }
|
||||
- ps: if (($env:CONFIGURATION) -eq "Debug" -And ($env:coverage) -eq "1" ) { python -m pip install codecov }
|
||||
- ps: if (($env:CONFIGURATION) -eq "Debug" -And ($env:coverage) -eq "1" ) { .\misc\installOpenCppCoverage.ps1 }
|
||||
|
||||
# Win32 and x64 are CMake-compatible solution platform names.
|
||||
# This allows us to pass %PLATFORM% to CMake -A.
|
||||
|
@ -1,12 +1,26 @@
|
||||
@REM # In debug build, we want to
|
||||
@REM # 1) Prebuild memcheck redirecter
|
||||
@REM # 2) Regenerate single header include for examples
|
||||
@REM # 3) Enable building examples
|
||||
|
||||
@REM # Possibilities:
|
||||
@REM # Debug build + coverage
|
||||
@REM # Debug build + examples
|
||||
@REM # Debug build + ---
|
||||
@REM # Release build
|
||||
if "%CONFIGURATION%"=="Debug" (
|
||||
python scripts\generateSingleHeader.py
|
||||
cmake -Hmisc -Bbuild-misc -A%PLATFORM%
|
||||
cmake --build build-misc
|
||||
cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain% -DCATCH_BUILD_EXAMPLES=ON -DMEMORYCHECK_COMMAND=build-misc\Debug\CoverageHelper.exe -DMEMORYCHECK_COMMAND_OPTIONS=--sep-- -DMEMORYCHECK_TYPE=Valgrind
|
||||
if "%coverage%"=="1" (
|
||||
@REM # coverage needs to build the special helper as well as the main
|
||||
cmake -Hmisc -Bbuild-misc -A%PLATFORM%
|
||||
cmake --build build-misc
|
||||
cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain% -DMEMORYCHECK_COMMAND=build-misc\Debug\CoverageHelper.exe -DMEMORYCHECK_COMMAND_OPTIONS=--sep-- -DMEMORYCHECK_TYPE=Valgrind
|
||||
) else (
|
||||
@REM # We know that coverage is 0
|
||||
if "%examples%"=="1" (
|
||||
@REM # Examples live off the single header, so it needs to be regenerated
|
||||
python scripts\generateSingleHeader.py
|
||||
cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain% -DCATCH_BUILD_EXAMPLES=ON
|
||||
) else (
|
||||
@REM # This is just a plain debug build
|
||||
cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain%
|
||||
)
|
||||
)
|
||||
)
|
||||
if "%CONFIGURATION%"=="Release" (
|
||||
cmake -H. -BBuild -A%PLATFORM% -DUSE_WMAIN=%wmain%
|
||||
|
@ -1,8 +1,12 @@
|
||||
cd Build
|
||||
if "%CONFIGURATION%"=="Debug" (
|
||||
ctest -j 2 -C %CONFIGURATION% -D ExperimentalMemCheck
|
||||
python ..\misc\appveyorMergeCoverageScript.py
|
||||
codecov --root .. --no-color --disable gcov -f cobertura.xml -t %CODECOV_TOKEN%
|
||||
if "%coverage%"=="1" (
|
||||
ctest -j 2 -C %CONFIGURATION% -D ExperimentalMemCheck
|
||||
python ..\misc\appveyorMergeCoverageScript.py
|
||||
codecov --root .. --no-color --disable gcov -f cobertura.xml -t %CODECOV_TOKEN%
|
||||
) else (
|
||||
ctest -j 2 -C %CONFIGURATION%
|
||||
)
|
||||
)
|
||||
if "%CONFIGURATION%"=="Release" (
|
||||
ctest -j 2 -C %CONFIGURATION%
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Downloads are done from the oficial github release page links
|
||||
$downloadUrl = "https://github.com/OpenCppCoverage/OpenCppCoverage/releases/download/release-0.9.6.1/OpenCppCoverageSetup-x64-0.9.6.1.exe"
|
||||
$downloadUrl = "https://github.com/OpenCppCoverage/OpenCppCoverage/releases/download/release-0.9.7.0/OpenCppCoverageSetup-x64-0.9.7.0.exe"
|
||||
$installerPath = [System.IO.Path]::Combine($Env:USERPROFILE, "Downloads", "OpenCppCoverageSetup.exe")
|
||||
|
||||
if(-Not (Test-Path $installerPath)) {
|
||||
|
Loading…
Reference in New Issue
Block a user