• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2016, 2017 Peter Dimov
2# Copyright (C) 2017, 2018 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/jeking3/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 move 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    - develop
29    - master
30
31matrix:
32  # Adding MAYFAIL to any matrix job allows it to fail but the build stays green:
33  allow_failures:
34    - MAYFAIL: true
35
36environment:
37  global:
38    # see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
39    # to use the default for a given environment, comment it out; recommend you build debug and release however:
40    # on Windows it is important to exercise all the possibilities, especially shared vs static, however most
41    # libraries that care about this exercise it in their Jamfiles...
42    # B2_ADDRESS_MODEL: address-model=64,32
43    # B2_LINK: link=shared,static
44    # B2_THREADING: threading=multi,single
45    B2_VARIANT: variant=release,debug
46
47  matrix:
48    - FLAVOR: Visual Studio 2019
49      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
50      TOOLSET: msvc-14.2
51      B2_ADDRESS_MODEL: address-model=64,32
52      CXXSTD: 14,17,latest
53
54    - FLAVOR: Visual Studio 2019 New Preprocessor
55      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
56      TOOLSET: msvc-14.2
57      B2_ADDRESS_MODEL: address-model=64,32
58      CXXFLAGS: cxxflags="/Zc:preprocessor"
59      CXXSTD: 14,17,latest
60
61    - FLAVOR: Visual Studio 2017 C++2a Strict
62      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
63      TOOLSET: msvc-14.1
64      B2_ADDRESS_MODEL: address-model=64
65      CXXFLAGS: cxxflags=-permissive-
66      CXXSTD: latest # 2a
67
68    - FLAVOR: Visual Studio 2017 C++17
69      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
70      TOOLSET: msvc-14.1
71      B2_ADDRESS_MODEL: address-model=64
72      CXXSTD: 17
73
74    - FLAVOR: Visual Studio 2017 C++14 (Default)
75      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
76      TOOLSET: msvc-14.1
77      B2_ADDRESS_MODEL: address-model=64,32
78
79    - FLAVOR: Visual Studio 2015
80      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
81      TOOLSET: msvc-14.0
82      B2_ADDRESS_MODEL: address-model=64,32
83
84    - FLAVOR: Visual Studio 2013
85      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
86      TOOLSET: msvc-12.0
87      B2_ADDRESS_MODEL: address-model=64,32
88
89    - FLAVOR: Visual Studio 2012
90      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
91      TOOLSET: msvc-11.0
92      B2_ADDRESS_MODEL: address-model=32
93
94    - FLAVOR: Visual Studio 2010
95      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
96      TOOLSET: msvc-10.0
97      B2_ADDRESS_MODEL: address-model=32
98
99    - FLAVOR: cygwin (32-bit)
100      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
101      ADDPATH: C:\cygwin\bin;
102      B2_ADDRESS_MODEL: address-model=32
103      CXXSTD: 03,11
104      # https://github.com/boostorg/test/issues/144
105      DEFINES: define=_POSIX_C_SOURCE=200112L
106      THREADING: threadapi=pthread
107      TOOLSET: gcc
108
109    - FLAVOR: cygwin (64-bit)
110      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
111      ADDPATH: C:\cygwin64\bin;
112      B2_ADDRESS_MODEL: address-model=64
113      CXXSTD: 11,17
114      # https://github.com/boostorg/test/issues/144
115      DEFINES: define=_POSIX_C_SOURCE=200112L define=__USE_ISOC99
116      THREADING: threadapi=pthread
117      TOOLSET: gcc
118
119    - FLAVOR: mingw32
120      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
121      ARCH: i686
122      B2_ADDRESS_MODEL: address-model=32
123      CXXSTD: 03,11
124      SCRIPT: ci\appveyor\mingw.bat
125
126    - FLAVOR: mingw64
127      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
128      ARCH: x86_64
129      B2_ADDRESS_MODEL: address-model=64
130      CXXSTD: 11,17
131      B2_DEFINES: define=__USE_ISOC99
132      SCRIPT: ci\appveyor\mingw.bat
133
134install:
135  - set SELF=%APPVEYOR_PROJECT_NAME:-=_%
136  - git clone https://github.com/jeking3/boost-ci.git C:\boost-ci
137  - xcopy /s /e /q /i C:\boost-ci\ci .\ci
138  - ci\appveyor\install.bat
139
140build: off
141
142test_script:
143  - set SELF=%APPVEYOR_PROJECT_NAME:-=_%
144  - PATH=%ADDPATH%%PATH%
145  # The definition of TOOLCXX omits CXXSTD= if it was not defined above
146  - IF NOT DEFINED CXXSTD (SET TOOLCXX=toolset=%TOOLSET%) ELSE (SET TOOLCXX=toolset=%TOOLSET% cxxstd=%CXXSTD%)
147  # Echo the complete build command to the build log
148  - IF NOT DEFINED SCRIPT                         (ECHO b2 libs/%SELF:\=/% %TOOLCXX% %CXXFLAGS% %DEFINES% %THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)
149  # Now go build...
150  - IF DEFINED SCRIPT (call libs\%SELF%\%SCRIPT%) ELSE (b2 libs/%SELF:\=/% %TOOLCXX% %CXXFLAGS% %DEFINES% %THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)
151