From 5f42eb25019bcebc0a51a097d459398e3d05314b Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 7 Feb 2022 08:05:11 +0200 Subject: [PATCH] Update Drone files --- .drone.jsonnet | 18 ++---------------- .drone/drone.sh | 27 ++++++++++----------------- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index e5824a9..ebf7d1e 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -32,22 +32,8 @@ 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 []) + [ - 'SELF=system', - - 'DRONE_BUILD_DIR=$(pwd)', - 'BOOST_BRANCH=develop', - 'if [ "$DRONE_BRANCH" = "master" ]; then BOOST_BRANCH=master; fi', - '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', - './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}', + 'export SELF=system', + './.drone/drone.sh', ] } ] diff --git a/.drone/drone.sh b/.drone/drone.sh index 0e4a50f..b734b06 100755 --- a/.drone/drone.sh +++ b/.drone/drone.sh @@ -1,31 +1,24 @@ #!/bin/bash -# Copyright 2020 Rene Rivera, Sam Darwin +# Copyright 2022 Peter Dimov # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt) +# https://www.boost.org/LICENSE_1_0.txt -set -e -export TRAVIS_BUILD_DIR=$(pwd) -export DRONE_BUILD_DIR=$(pwd) -export TRAVIS_BRANCH=$DRONE_BRANCH -export VCS_COMMIT_ID=$DRONE_COMMIT -export GIT_COMMIT=$DRONE_COMMIT -export REPO_NAME=$DRONE_REPO -export PATH=~/.local/bin:/usr/local/bin:$PATH +set -ex -echo '==================================> INSTALL' +DRONE_BUILD_DIR=$(pwd) + +BOOST_BRANCH=develop +if [ "$DRONE_BRANCH" = "master" ]; then BOOST_BRANCH=master; fi -BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true 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 $TRAVIS_BUILD_DIR/* libs/system -python tools/boostdep/depinst/depinst.py system +cp -r $DRONE_BUILD_DIR/* libs/$SELF +python tools/boostdep/depinst/depinst.py $SELF ./bootstrap.sh ./b2 -d0 headers -echo '==================================> SCRIPT' - echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam -./b2 -j3 libs/system/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/$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}