1# Copyright 2016, 2017 Peter Dimov 2# Copyright (C) 2017 - 2019 James E. King III 3# Distributed under the Boost Software License, Version 1.0. 4# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) 5 6# 7# Generic Appveyor build script for boostorg repositories 8# See: https://github.com/boostorg/boost-ci/ 9# 10# Instructions for customizing this script for your library: 11# 12# 1. Customize the compilers and language levels you want. 13# 2. If you have more than include/, src/, test/, example/, examples/, 14# benchmark/ or tools/ directories, set the environment variable DEPINST. 15# For example if your build uses code in "bench/" and "fog/" directories: 16# - DEPINST: --include bench --include fog 17# 3. Enable pull request builds in your boostorg/<library> account. 18# 19# That's it - the script will do everything else for you. 20# 21 22version: 1.0.{build}-{branch} 23 24shallow_clone: true 25 26branches: 27 only: 28 - master 29 - develop 30 - /bugfix\/.*/ 31 - /feature\/.*/ 32 - /fix\/.*/ 33 - /pr\/.*/ 34 35matrix: 36 # Adding MAYFAIL to any matrix job allows it to fail but the build stays green: 37 allow_failures: 38 - MAYFAIL: true 39 40environment: 41 global: 42 # see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties 43 # to use the default for a given environment, comment it out; recommend you build debug and release however: 44 # on Windows it is important to exercise all the possibilities, especially shared vs static, however most 45 # libraries that care about this exercise it in their Jamfiles... 46 # B2_ADDRESS_MODEL: address-model=64,32 47 # B2_LINK: link=shared,static 48 # B2_THREADING: threading=multi,single 49 B2_VARIANT: variant=release 50 51 matrix: 52 - FLAVOR: Visual Studio 2019 53 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 54 B2_ADDRESS_MODEL: address-model=64 55 B2_CXXFLAGS: cxxflags=-permissive- 56 B2_CXXSTD: latest # 2a 57 B2_TOOLSET: msvc-14.2 58 59 - FLAVOR: Visual Studio 2017 C++2a Strict 60 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 61 B2_ADDRESS_MODEL: address-model=64 62 B2_CXXFLAGS: cxxflags=-permissive- 63 B2_CXXSTD: latest # 2a 64 B2_TOOLSET: msvc-14.1 65 66 - FLAVOR: Visual Studio 2017 C++17 67 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 68 B2_ADDRESS_MODEL: address-model=64 69 B2_CXXSTD: 17 70 B2_TOOLSET: msvc-14.1 71 B2_VARIANT: variant=debug 72 73 - FLAVOR: Visual Studio 2017 C++14 (Default) 74 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 75 B2_ADDRESS_MODEL: address-model=64,32 76 B2_TOOLSET: msvc-14.1 77 78 - FLAVOR: clang-cl 79 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 80 B2_ADDRESS_MODEL: address-model=64 81 B2_CXXSTD: 11 82 B2_TOOLSET: clang-win 83 84 - FLAVOR: Visual Studio 2015 C++14 (Default) 85 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 86 B2_ADDRESS_MODEL: address-model=64,32 87 B2_TOOLSET: msvc-14.0 88 B2_VARIANT: variant=debug 89 90 - FLAVOR: Visual Studio 2010, 2012, 2013 91 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 92 B2_TOOLSET: msvc-10.0,msvc-11.0,msvc-12.0 93 94 - FLAVOR: cygwin (32-bit) 95 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 96 ADDPATH: C:\cygwin\bin; 97 B2_ADDRESS_MODEL: address-model=32 98 B2_CXXSTD: 03,11 99 # https://github.com/boostorg/test/issues/144 100 B2_DEFINES: define=_POSIX_C_SOURCE=200112L 101 B2_THREADING: threadapi=pthread 102 B2_TOOLSET: gcc 103 B2_VARIANT: variant=debug 104 105 - FLAVOR: cygwin (64-bit) 106 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 107 ADDPATH: C:\cygwin64\bin; 108 B2_ADDRESS_MODEL: address-model=64 109 B2_CXXSTD: 11,17 110 # https://github.com/boostorg/test/issues/144 111 B2_DEFINES: define=_POSIX_C_SOURCE=200112L define=__USE_ISOC99 112 B2_THREADING: threadapi=pthread 113 B2_TOOLSET: gcc 114 115 - FLAVOR: mingw32 116 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 117 ARCH: i686 118 B2_ADDRESS_MODEL: address-model=32 119 B2_CXXSTD: 03,11 120 SCRIPT: ci\appveyor\mingw.bat 121 B2_VARIANT: variant=debug 122 123 - FLAVOR: mingw64 124 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 125 ARCH: x86_64 126 B2_ADDRESS_MODEL: address-model=64 127 B2_CXXSTD: 11,17 128 B2_DEFINES: define=__USE_ISOC99 129 SCRIPT: ci\appveyor\mingw.bat 130 131install: 132 - set SELF=%APPVEYOR_PROJECT_NAME:-=_% 133 - git clone https://github.com/boostorg/boost-ci.git C:\boost-ci 134 - xcopy /s /e /q /i C:\boost-ci\ci .\ci 135 - ci\appveyor\install.bat 136 137build: off 138 139test_script: 140 - set SELF=%APPVEYOR_PROJECT_NAME:-=_% 141 - PATH=%ADDPATH%%PATH% 142 # The definition of B2_TOOLCXX omits B2_CXXSTD= if it was not defined above 143 - IF NOT DEFINED B2_CXXSTD (SET B2_TOOLCXX=toolset=%B2_TOOLSET%) ELSE (SET B2_TOOLCXX=toolset=%B2_TOOLSET% cxxstd=%B2_CXXSTD%) 144 # Echo the complete build command to the build log 145 - IF NOT DEFINED SCRIPT (ECHO b2 libs/%SELF:\=/% %B2_TOOLCXX% %B2_CXXFLAGS% %B2_DEFINES% %B2_THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3) 146 # Now go build... 147 - IF DEFINED SCRIPT (call libs\%SELF%\%SCRIPT%) ELSE (b2 libs/%SELF:\=/% %B2_TOOLCXX% %B2_CXXFLAGS% %B2_DEFINES% %B2_THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3) 148