diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-08-08 02:04:59 -0600 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-08-08 02:04:59 -0600 |
commit | ee54a3f03e66f69d9355013486f3d5e963a36dd4 (patch) | |
tree | 5e42fbefd57da86d3415bce60662f690c7d25944 /appveyor.yml | |
parent | cfd717e43be63ba778cc50eb8716e22065629246 (diff) | |
download | google-benchmark-ee54a3f03e66f69d9355013486f3d5e963a36dd4.tar.gz google-benchmark-ee54a3f03e66f69d9355013486f3d5e963a36dd4.zip |
Rework Appveyor config
Currently the Appveyor bot is a PIT. It never passes and it often hangs
or gives very poor output. This patch rewrites the configuration.
This patch also attempts to fix a flaky complexity test as a drive-by.
Diffstat (limited to 'appveyor.yml')
-rw-r--r-- | appveyor.yml | 136 |
1 files changed, 32 insertions, 104 deletions
diff --git a/appveyor.yml b/appveyor.yml index 877b3b1..b332e75 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,127 +1,55 @@ version: '{build}' configuration: - - Static Debug - - Static Release -# - Shared Debug -# - Shared Release - -platform: - - x86 - - x64 + - Debug + - Release environment: matrix: - compiler: msvc-12-seh + generator: "Visual Studio 12 2013" + + - compiler: msvc-12-seh + generator: "Visual Studio 12 2013 Win64" + - compiler: msvc-14-seh + generator: "Visual Studio 14 2015" + + - compiler: msvc-14-seh + generator: "Visual Studio 14 2015 Win64" + - compiler: gcc-4.9.2-posix -# - compiler: gcc-4.8.4-posix + generator: "MinGW Makefiles" + arch: i686 -artifacts: - - path: '_build/CMakeFiles/*.log' - name: logs - - path: '_build/Testing/**/*.xml' - name: test_results + - compiler: gcc-4.9.2-posix + generator: "MinGW Makefiles" + arch: x86_64 -install: - # derive some extra information - - for /f "tokens=1-2" %%a in ("%configuration%") do (@set "linkage=%%a") - - for /f "tokens=1-2" %%a in ("%configuration%") do (@set "variant=%%b") - - if "%linkage%"=="Shared" (set shared=YES) else (set shared=NO) - - for /f "tokens=1-3 delims=-" %%a in ("%compiler%") do (@set "compiler_name=%%a") - - for /f "tokens=1-3 delims=-" %%a in ("%compiler%") do (@set "compiler_version=%%b") - - for /f "tokens=1-3 delims=-" %%a in ("%compiler%") do (@set "compiler_threading=%%c") - - if "%platform%"=="x64" (set arch=x86_64) - - if "%platform%"=="x86" (set arch=i686) - # download the specific version of MinGW - - if "%compiler_name%"=="gcc" (for /f %%a in ('python mingw.py --quiet --version "%compiler_version%" --arch "%arch%" --threading "%compiler_threading%" --location "C:\mingw-builds"') do @set "compiler_path=%%a") +matrix: + fast_finish: true -before_build: - # Set up mingw commands - - if "%compiler_name%"=="gcc" (set "generator=MinGW Makefiles") - - if "%compiler_name%"=="gcc" (set "build=mingw32-make -j4") - - if "%compiler_name%"=="gcc" (set "test=mingw32-make CTEST_OUTPUT_ON_FAILURE=1 test") - # msvc specific commands - - if "%compiler_name%"=="msvc" if "%compiler_version%"=="12" if "%platform%"=="x86" (set "generator=Visual Studio 12 2013") - - if "%compiler_name%"=="msvc" if "%compiler_version%"=="12" if "%platform%"=="x64" (set "generator=Visual Studio 12 2013 Win64") - - if "%compiler_name%"=="msvc" if "%compiler_version%"=="14" if "%platform%"=="x86" (set "generator=Visual Studio 14 2015") - - if "%compiler_name%"=="msvc" if "%compiler_version%"=="14" if "%platform%"=="x64" (set "generator=Visual Studio 14 2015 Win64") - - if "%compiler_name%"=="msvc" (set "build=cmake --build . --config %variant%") - - if "%compiler_name%"=="msvc" (set "test=ctest -c Release --timeout 300 --output-on-failure") - # add the compiler path if needed +install: + - if "%compiler%"=="gcc-4.9.2-posix" (for /f %%a in ('python mingw.py --quiet --version "4.9.2" --arch "%arch%" --threading "posix" --location "C:\mingw-builds"') do @set "compiler_path=%%a") - if not "%compiler_path%"=="" (set "PATH=%PATH%;%compiler_path%") # git bash conflicts with MinGW makefiles - if "%generator%"=="MinGW Makefiles" (set "PATH=%PATH:C:\Program Files\Git\usr\bin;=%") build_script: -- ps: | - md _build -Force - cd _build - & cmake -G "$env:generator" "-DCMAKE_BUILD_TYPE=$env:variant" .. - if ($LastExitCode -ne 0) { - throw "Exec: $ErrorMessage" - } - iex "& $env:build" - if ($LastExitCode -ne 0) { - throw "Exec: $ErrorMessage" - } + - md _build -Force + - cd _build + - echo %configuration% + - cmake -G "%generator%" "-DCMAKE_BUILD_TYPE=%configuration%" .. + - cmake --build . --config %configuration% test_script: -- ps: | - iex "& $env:test" - if ($LastExitCode -ne 0) { - throw "Exec: $ErrorMessage" - } - - function Add-CTest-Result($testResult) - { - $tests = ([xml](get-content $testResult)).Site.Testing - $testsCount = 0 - $anyFailures = $FALSE - - foreach ($test in $tests.test) { - $testsCount++ - $testName = $test.Name - $testpath = $test.Path - $timeNode = $test.SelectSingleNode('Results/NamedMeasurement[@name="Execution Time"]/Value') - if ($test.status -eq "failure") { - $time = ([double]$timeNode.InnerText * 1000) - Add-AppveyorTest $testName -Outcome Failed -FileName $testpath -Duration $time -ErrorMessage $($test.results.measurement.value) - Add-AppveyorMessage `"$testName failed`" -Category Error - $anyFailures = $TRUE - } - elseif ($test.status -eq "skipped") { - Add-AppveyorTest $testName -Outcome Ignored -Filename $testpath - } - else { - $time = ([double]$timeNode.InnerText * 1000) - Add-AppveyorTest $testName -Outcome Passed -FileName $testpath -Duration $time -StdOut $($test.results.measurement.value) - } - } - return $testsCount, $anyFailures - } - - $testsCount = 0 - $anyFailures = $FALSE - - # Run tests and upload results to AppVeyor one by one - Get-ChildItem ".\Testing\*.xml" -Recurse | foreach { - $testfile = $_.fullname - $count, $testsResult = Add-CTest-Result $testfile - Write-Host "Found $testfile with $count tests" - $testsCount = $testsCount + $count - $anyFailures = $anyFailures -or $testsResult - } - - Write-Host "There are $testsCount tests found" - - if ($anyFailures -eq $TRUE){ - Write-Host "Failing build as there are broken tests" - $host.SetShouldExit(1) - } + - ctest -c %configuration% --timeout 300 --output-on-failure -matrix: - fast_finish: true +artifacts: + - path: '_build/CMakeFiles/*.log' + name: logs + - path: '_build/Testing/**/*.xml' + name: test_results cache: - C:\mingw-builds |