annotate src/capnproto-0.6.0/appveyor.yml @ 77:4edcd14160a5 pa_catalina

Duplicate for patch testing
author Chris Cannam
date Wed, 30 Oct 2019 11:25:10 +0000
parents 0994c39f1e94
children
rev   line source
cannam@62 1 # Cap'n Proto AppVeyor configuration
cannam@62 2 #
cannam@62 3 # See https://www.appveyor.com/docs/appveyor-yml/ for configuration options.
cannam@62 4 #
cannam@62 5 # This script configures AppVeyor to:
cannam@62 6 # - Download and unzip MinGW-w64 4.8.5 for x86_64, the minimum gcc version Cap'n Proto advertises
cannam@62 7 # support for.
cannam@62 8 # - Use CMake to ...
cannam@62 9 # build Cap'n Proto with MinGW.
cannam@62 10 # build Cap'n Proto with VS2015 and VS2017.
cannam@62 11 # build Cap'n Proto samples with VS2015 and VS2017.
cannam@62 12
cannam@62 13 version: "{build}"
cannam@62 14
cannam@62 15 branches:
cannam@62 16 only:
cannam@62 17 - master
cannam@62 18 - /release-.*/
cannam@62 19 # Don't build non-master branches (unless they open a pull request).
cannam@62 20
cannam@62 21 image: Visual Studio 2017
cannam@62 22 # AppVeyor build worker image (VM template).
cannam@62 23
cannam@62 24 shallow_clone: true
cannam@62 25 # Fetch repository as zip archive.
cannam@62 26
cannam@62 27 cache:
cannam@62 28 - x86_64-4.8.5-release-win32-seh-rt_v4-rev0.7z
cannam@62 29
cannam@62 30 environment:
cannam@62 31 MINGW_DIR: mingw64
cannam@62 32 MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.8.5/threads-win32/seh/x86_64-4.8.5-release-win32-seh-rt_v4-rev0.7z/download
cannam@62 33 MINGW_ARCHIVE: x86_64-4.8.5-release-win32-seh-rt_v4-rev0.7z
cannam@62 34 BUILD_TYPE: debug
cannam@62 35
cannam@62 36 matrix:
cannam@62 37 # TODO(someday): Add MSVC x64 builds, MinGW x86 build?
cannam@62 38
cannam@62 39 - CMAKE_GENERATOR: Visual Studio 15 2017
cannam@62 40 BUILD_NAME: vs2017
cannam@62 41 EXTRA_BUILD_FLAGS: # /maxcpucount
cannam@62 42 # TODO(someday): Right now /maxcpucount occasionally expresses a filesystem-related race:
cannam@62 43 # capnp-capnpc++ complains that it can't create test.capnp.h.
cannam@62 44
cannam@62 45 - CMAKE_GENERATOR: Visual Studio 14 2015
cannam@62 46 BUILD_NAME: vs2015
cannam@62 47 EXTRA_BUILD_FLAGS: # /maxcpucount
cannam@62 48
cannam@62 49 - CMAKE_GENERATOR: MinGW Makefiles
cannam@62 50 BUILD_NAME: mingw
cannam@62 51 EXTRA_BUILD_FLAGS: -j2
cannam@62 52
cannam@62 53 install:
cannam@62 54 - if not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%"
cannam@62 55 - 7z x -y "%MINGW_ARCHIVE%" > nul
cannam@62 56 - ps: Get-Command sh.exe -All | Remove-Item
cannam@62 57 # CMake refuses to generate MinGW Makefiles if sh.exe is in the PATH
cannam@62 58
cannam@62 59 before_build:
cannam@62 60 - set PATH=%CD%\%MINGW_DIR%\bin;%PATH%
cannam@62 61 - set BUILD_DIR=build-%BUILD_NAME%
cannam@62 62 - set INSTALL_PREFIX=%CD%\capnproto-c++-%BUILD_NAME%
cannam@62 63 - cmake --version
cannam@62 64
cannam@62 65 build_script:
cannam@62 66 - echo "Building Cap'n Proto with %CMAKE_GENERATOR%"
cannam@62 67 - >-
cannam@62 68 cmake -Hc++ -B%BUILD_DIR% -G "%CMAKE_GENERATOR%"
cannam@62 69 -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
cannam@62 70 -DCMAKE_INSTALL_PREFIX=%INSTALL_PREFIX%
cannam@62 71 - cmake --build %BUILD_DIR% --config %BUILD_TYPE% --target install -- %EXTRA_BUILD_FLAGS%
cannam@62 72 # MinGW wants the build type at configure-time while MSVC wants the build type at build-time. We
cannam@62 73 # can satisfy both by passing the build type to both cmake invocations. We have to suffer a
cannam@62 74 # warning, but both generators will work.
cannam@62 75
cannam@62 76 - echo "Building Cap'n Proto samples with %CMAKE_GENERATOR%"
cannam@62 77 - >-
cannam@62 78 cmake -Hc++/samples -B%BUILD_DIR%-samples -G "%CMAKE_GENERATOR%"
cannam@62 79 -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
cannam@62 80 -DCMAKE_PREFIX_PATH=%INSTALL_PREFIX%
cannam@62 81 - cmake --build %BUILD_DIR%-samples --config %BUILD_TYPE%
cannam@62 82
cannam@62 83 test_script:
cannam@62 84 - timeout /t 2
cannam@62 85 # Sleep a little to prevent interleaving test output with build output.
cannam@62 86 - cd %BUILD_DIR%\src
cannam@62 87 - ctest -V -C %BUILD_TYPE%