Update Drone files

This commit is contained in:
Peter Dimov
2022-02-07 09:30:32 +02:00
parent c0bc88f17f
commit d8e86f3a85
3 changed files with 15 additions and 29 deletions

View File

@@ -2,6 +2,8 @@
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
local library = "system";
local triggers =
{
branch: [ "master", "develop", "feature/*" ]
@@ -32,7 +34,7 @@ local linux_pipeline(name, image, environment, packages = "", sources = [], arch
(if sources != [] then [ ('apt-add-repository "' + source + '"') for source in sources ] else []) +
(if packages != "" then [ 'apt-get update', 'apt-get -y install ' + packages ] else []) +
[
'export SELF=system',
'export LIBRARY=' + library,
'./.drone/drone.sh',
]
}
@@ -62,22 +64,7 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
environment: environment,
commands:
[
'set SELF=system',
'set DRONE_BUILD_DIR=%CD%',
'set BOOST_BRANCH=develop',
'if "%DRONE_BRANCH%" == "master" set BOOST_BRANCH=master',
'cd ..',
'git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root',
'cd boost-root',
'git submodule update --init tools/boostdep',
'xcopy /s /e /q %DRONE_BUILD_DIR% libs\\\\%SELF%\\\\',
'python tools/boostdep/depinst/depinst.py %SELF%',
'cmd /c bootstrap',
'b2 -d0 headers',
'if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%',
'if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%',
'b2 -j3 libs/%SELF%/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker',
'cmd /C .drone\\\\drone.bat ' + library,
]
}
]

View File

@@ -1,24 +1,23 @@
@REM Copyright 2022 Peter Dimov
@REM Distributed under the Boost Software License, Version 1.0.
@REM https://www.boost.org/LICENSE_1_0.txt
@ECHO ON
set LIBRARY=%1
set DRONE_BUILD_DIR=%CD%
IF "%DRONE_BRANCH%" == "" (
for /F %%i in ("%GITHUB_REF%") do @set DRONE_BRANCH=%%~nxi
)
for /F %%i in ("%DRONE_REPO%") do @set SELF=%%~nxi
set BOOST_BRANCH=develop
if "%DRONE_BRANCH%" == "master" set BOOST_BRANCH=master
cd ..
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
git submodule update --init tools/boostdep
xcopy /s /e /q %DRONE_BUILD_DIR% libs\%SELF%\
python tools/boostdep/depinst/depinst.py %SELF%
xcopy /s /e /q %DRONE_BUILD_DIR% libs\%LIBRARY%\
python tools/boostdep/depinst/depinst.py %LIBRARY%
cmd /c bootstrap
b2 -d0 headers
if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
b2 -j3 libs/%SELF%/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker
b2 -j3 libs/%LIBRARY%/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker

View File

@@ -15,10 +15,10 @@ cd ..
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
git submodule update --init tools/boostdep
cp -r $DRONE_BUILD_DIR/* libs/$SELF
python tools/boostdep/depinst/depinst.py $SELF
cp -r $DRONE_BUILD_DIR/* libs/$LIBRARY
python tools/boostdep/depinst/depinst.py $LIBRARY
./bootstrap.sh
./b2 -d0 headers
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
./b2 -j3 libs/$SELF/test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${ADDRMD:+address-model=$ADDRMD} ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined define=UBSAN=1 debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
./b2 -j3 libs/$LIBRARY/test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${ADDRMD:+address-model=$ADDRMD} ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined define=UBSAN=1 debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}