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,debug 50 51 matrix: 52 - FLAVOR: Visual Studio 2017 C++2a Strict 53 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 54 B2_ADDRESS_MODEL: address-model=64 55 B2_CXXFLAGS: cxxflags=-permissive- 56 B2_CXXSTD: latest # 2a 57 B2_TOOLSET: msvc-14.1 58 59 - FLAVOR: Visual Studio 2017 C++17 60 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 61 B2_ADDRESS_MODEL: address-model=64 62 B2_CXXSTD: 17 63 B2_TOOLSET: msvc-14.1 64 65 - FLAVOR: Visual Studio 2017 C++14 (Default) 66 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 67 B2_ADDRESS_MODEL: address-model=64,32 68 B2_TOOLSET: msvc-14.1 69 70 - FLAVOR: Visual Studio 2015 C++14 (Default) 71 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 72 B2_ADDRESS_MODEL: address-model=64,32 73 B2_TOOLSET: msvc-14.0 74 75 - FLAVOR: Visual Studio 2010, 2012, 2013 76 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 77 B2_TOOLSET: msvc-10.0,msvc-11.0,msvc-12.0 78 79 - FLAVOR: cygwin (32-bit) 80 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 81 ADDPATH: C:\cygwin\bin; 82 B2_ADDRESS_MODEL: address-model=32 83 B2_CXXSTD: 03,11 84 # https://github.com/boostorg/test/issues/144 85 B2_DEFINES: define=_POSIX_C_SOURCE=200112L 86 B2_THREADING: threadapi=pthread 87 B2_TOOLSET: gcc 88 89 - FLAVOR: cygwin (64-bit) 90 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 91 ADDPATH: C:\cygwin64\bin; 92 B2_ADDRESS_MODEL: address-model=64 93 B2_CXXSTD: 11,17 94 # https://github.com/boostorg/test/issues/144 95 B2_DEFINES: define=_POSIX_C_SOURCE=200112L define=__USE_ISOC99 96 B2_THREADING: threadapi=pthread 97 B2_TOOLSET: gcc 98 99 - FLAVOR: mingw32 100 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 101 ARCH: i686 102 B2_ADDRESS_MODEL: address-model=32 103 B2_CXXSTD: 03,11 104 SCRIPT: ci\appveyor\mingw.bat 105 106 - FLAVOR: mingw64 107 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 108 ARCH: x86_64 109 B2_ADDRESS_MODEL: address-model=64 110 B2_CXXSTD: 11,17 111 B2_DEFINES: define=__USE_ISOC99 112 SCRIPT: ci\appveyor\mingw.bat 113 114install: 115 - set SELF=%APPVEYOR_PROJECT_NAME:-=_% 116 - git clone https://github.com/boostorg/boost-ci.git C:\boost-ci 117 - xcopy /s /e /q /i C:\boost-ci\ci .\ci 118 - ci\appveyor\install.bat 119 120build: off 121 122test_script: 123 - set SELF=%APPVEYOR_PROJECT_NAME:-=_% 124 - PATH=%ADDPATH%%PATH% 125 # The definition of B2_TOOLCXX omits B2_CXXSTD= if it was not defined above 126 - IF NOT DEFINED B2_CXXSTD (SET B2_TOOLCXX=toolset=%B2_TOOLSET%) ELSE (SET B2_TOOLCXX=toolset=%B2_TOOLSET% cxxstd=%B2_CXXSTD%) 127 # Echo the complete build command to the build log 128 - 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) 129 # Now go build... 130 - 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) 131