appveyor.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. version: '{build}'
  2. configuration:
  3. - Static Debug
  4. - Static Release
  5. # - Shared Debug
  6. # - Shared Release
  7. platform:
  8. - x86
  9. - x64
  10. environment:
  11. matrix:
  12. - compiler: gcc-4.9.2-posix
  13. # - compiler: gcc-4.8.4-posix
  14. # - compiler: msvc-12-seh
  15. install:
  16. # derive some extra information
  17. - for /f "tokens=1-2" %%a in ("%configuration%") do (@set "linkage=%%a")
  18. - for /f "tokens=1-2" %%a in ("%configuration%") do (@set "variant=%%b")
  19. - if "%linkage%"=="Shared" (set shared=YES) else (set shared=NO)
  20. - for /f "tokens=1-3 delims=-" %%a in ("%compiler%") do (@set "compiler_name=%%a")
  21. - for /f "tokens=1-3 delims=-" %%a in ("%compiler%") do (@set "compiler_version=%%b")
  22. - for /f "tokens=1-3 delims=-" %%a in ("%compiler%") do (@set "compiler_threading=%%c")
  23. - if "%platform%"=="x64" (set arch=x86_64)
  24. - if "%platform%"=="x86" (set arch=i686)
  25. # download the specific version of MinGW
  26. - 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")
  27. before_build:
  28. # Set up mingw commands
  29. - if "%compiler_name%"=="gcc" (set "generator=MinGW Makefiles")
  30. - if "%compiler_name%"=="gcc" (set "build=mingw32-make -j4")
  31. - if "%compiler_name%"=="gcc" (set "test=mingw32-make CTEST_OUTPUT_ON_FAILURE=1 test")
  32. # msvc specific commands
  33. # TODO :)
  34. # add the compiler path if needed
  35. - if not "%compiler_path%"=="" (set "PATH=%PATH%;%compiler_path%")
  36. # git bash conflicts with MinGW makefiles
  37. - if "%generator%"=="MinGW Makefiles" (set "PATH=%PATH:C:\Program Files (x86)\Git\bin=%")
  38. build_script:
  39. - cmake -G "%generator%" "-DCMAKE_BUILD_TYPE=%variant%" "-DBENCHMARK_ENABLE_SHARED=%shared%"
  40. - cmd /c "%build%"
  41. test_script:
  42. - cmd /c "%test%"
  43. matrix:
  44. fast_finish: true
  45. cache:
  46. - C:\mingw-builds