mirror of
https://github.com/boostorg/beast.git
synced 2025-08-03 23:04:35 +02:00
Improve compilation of tests for continuous integration:
fix #1293 * Build ASIO's non-template entities into a static library to reduce the compiler's memory usage during test compilation. * Retry as single-threaded build after the first build failure.
This commit is contained in:
committed by
Vinnie Falco
parent
c18f3f0ef1
commit
9816d61f38
@@ -197,7 +197,7 @@ script:
|
||||
- |-
|
||||
echo "using $TOOLSET : : $COMPILER : <cxxflags>-std=$CXXSTD ;" > ~/user-config.jam
|
||||
- cd ../boost-root
|
||||
- travis_retry libs/beast/tools/build-and-test.sh
|
||||
- libs/beast/tools/retry.sh libs/beast/tools/build-and-test.sh
|
||||
|
||||
after_script:
|
||||
- cat nohup.out || echo "nohup.out already deleted"
|
||||
|
16
Jamfile
16
Jamfile
@@ -12,6 +12,7 @@ import feature ;
|
||||
import boost ;
|
||||
import modules ;
|
||||
import testing ;
|
||||
import ../../config/checks/config : requires ;
|
||||
|
||||
boost.use-project ;
|
||||
|
||||
@@ -69,6 +70,20 @@ variant ubasan
|
||||
|
||||
path-constant TEST_MAIN : include/boost/beast/_experimental/unit_test/main.cpp ;
|
||||
|
||||
lib static_asio
|
||||
: test/asio.cpp
|
||||
: requirements
|
||||
[ requires
|
||||
cxx11_constexpr
|
||||
cxx11_decltype
|
||||
cxx11_hdr_tuple
|
||||
cxx11_template_aliases
|
||||
cxx11_variadic_templates
|
||||
]
|
||||
<define>BOOST_ASIO_SEPARATE_COMPILATION
|
||||
<link>static
|
||||
;
|
||||
|
||||
project /boost/beast
|
||||
: requirements
|
||||
<implicit-dependency>/boost//headers
|
||||
@@ -77,6 +92,7 @@ project /boost/beast
|
||||
<library>/boost/system//boost_system
|
||||
<library>/boost/coroutine//boost_coroutine
|
||||
<library>/boost/filesystem//boost_filesystem
|
||||
<library>static_asio
|
||||
<threading>multi
|
||||
<runtime-link>shared
|
||||
<debug-symbols>on
|
||||
|
@@ -22,6 +22,7 @@ project /boost/beast/test
|
||||
]
|
||||
<include>./extern
|
||||
<define>BOOST_BEAST_ALLOW_DEPRECATED
|
||||
<define>BOOST_ASIO_SEPARATE_COMPILATION
|
||||
;
|
||||
|
||||
path-constant ZLIB_SOURCES :
|
||||
|
1
test/asio.cpp
Normal file
1
test/asio.cpp
Normal file
@@ -0,0 +1 @@
|
||||
#include <boost/asio/impl/src.hpp>
|
@@ -17,7 +17,9 @@ if [[ $TRAVIS_BRANCH == "master" || $TRAVIS_BRANCH == "develop" ]]; then
|
||||
MAIN_BRANCH="1"
|
||||
fi
|
||||
|
||||
if [[ "${TRAVIS}" == "true" ]]; then
|
||||
if [[ "${BEAST_RETRY}" == "true" ]]; then
|
||||
JOBS=1
|
||||
elif [[ "${TRAVIS}" == "true" ]]; then
|
||||
JOBS="2"
|
||||
elif [[ $(uname -s) == "Linux" ]]; then
|
||||
# Physical cores
|
||||
|
7
tools/retry.sh
Executable file
7
tools/retry.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
for i in {1..3}
|
||||
do
|
||||
$1 "${@:2:99}" && break;
|
||||
export BEAST_RETRY="true"
|
||||
done
|
Reference in New Issue
Block a user