forked from boostorg/spirit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.appveyor.yml
100 lines (82 loc) · 3.94 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#==============================================================================
# Copyright (c) 2016-2020 Nikita Kniazev
#
# Use, modification and distribution is subject to the Boost Software
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#==============================================================================
clone_depth: 50
environment:
global:
PROJECT: libs\spirit
APPVEYOR_SAVE_CACHE_ON_ERROR: true
CLCACHE_HARDLINK: 1
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma2 -mx=3 -md=32m -ms=on"
CLCACHE_CACHESIZE: 2123123123 # Appveyor allows us to store 1Gb of 7zipped cache but
# object files compress ratio is 20:1 in our case
matrix:
- { APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019', ADDRMDL: 64, TOOLSET: 'msvc-14.2' }
- { APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017', ADDRMDL: 64, TOOLSET: 'msvc-14.1' }
- { APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015', ADDRMDL: 64, TOOLSET: 'msvc-14.0' }
- { APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015', ADDRMDL: 64, TOOLSET: 'msvc-12.0' }
- { APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015', ADDRMDL: 32, TOOLSET: 'msvc-11.0' }
- { APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015', ADDRMDL: 32, TOOLSET: 'msvc-10.0' }
cache:
- '%USERPROFILE%\clcache'
- '%LOCALAPPDATA%\pip\Cache'
init:
- set BOOST_ROOT=%APPVEYOR_BUILD_FOLDER%\..\boost
- set BOOST_BUILD_PATH=%BOOST_ROOT%\..\boost-build
- set B2_ARGS=link=shared threading=multi variant=release
address-model=%ADDRMDL% toolset=%TOOLSET%
define=BOOST_ALL_NO_LIB
define=BOOST_SPIRIT_X3_HIDE_CXX17_WARNING
before_build:
- set PATH=%BOOST_ROOT%;C:\Python36-x64\Scripts;%PATH%
- ps: |
# Creating %USERPROFILE%/user-config.jam file
@'
import feature os regex toolset pch ;
# clcache
local toolset = [ regex.split [ os.environ TOOLSET ] "-" ] ;
using $(toolset[1]) : $(toolset[2-]:J="-") : : <compiler>clcache ;
# A subfeature that tells Spirit tests to use PCH
feature.subfeature pch on : version : spirit : optional propagated incidental ;
'@ | sc "$env:USERPROFILE/user-config.jam"
- set BRANCH=%APPVEYOR_REPO_BRANCH%
# TODO: Determine the root branch when PR targeted/build from not our main branches.
- if not "%BRANCH%" == "master"
if not "%BRANCH%" == "develop"
set BRANCH=develop
- echo Root branch is %BRANCH%
# Sadly git's --shallow-submodules has hardcoded depth of 1 commit
# Patch the git binary with a little more depth to deal with boost-commitbot's lag
- ps: |
$git = Get-Command git | Select-Object -ExpandProperty Definition
$git = Split-Path -Parent $git | Split-Path -Parent
Get-ChildItem -Path "$git\mingw64\*" -Include *.exe -Recurse |
ForEach-Object -Process {(Get-Content -Raw $_).Replace("--depth=1","--depth=9") | Set-Content $_}
# Checkout Boost
- git clone -j10 --branch=%BRANCH% --depth=1 --quiet
--recurse-submodules=":(exclude)%PROJECT%" --shallow-submodules
https://github.com/boostorg/boost.git %BOOST_ROOT%
- pushd %BOOST_ROOT%
# Remove empty folder
- rmdir /S /Q %PROJECT%
# Move the repository to boost/libs and make a link to previous place
- move %APPVEYOR_BUILD_FOLDER% %PROJECT%
- mklink /J %APPVEYOR_BUILD_FOLDER% %PROJECT%
# Install clcache
- pip install clcache
- clcache -M %CLCACHE_CACHESIZE%
# Run clcache-server
- set CLCACHE_SERVER=1
- ps: Start-Process clcache-server.exe -PassThru
build_script:
- bootstrap.bat --with-toolset=msvc
# Let's have less noise (Appveyor cannot collapse command output)
- b2 headers 2>&1 >> deps_build.log
|| ( echo === deps_build.log === && cat deps_build.log )
test_script:
- b2 %B2_ARGS% %PROJECT%\classic\test %PROJECT%\repository\test %PROJECT%\test
warnings=extra warnings-as-errors=on pch=on-spirit