From 2ffb4cb8bddc90aef0aeb0b88527476ecde67b4b Mon Sep 17 00:00:00 2001 From: sdarwin Date: Tue, 12 Jan 2021 16:57:51 +0000 Subject: [PATCH] add drone config [ci skip] --- .drone.star | 23 +++++++++++++++++++++++ .drone/after-success.sh | 3 +++ .drone/before-install.sh | 3 +++ .drone/before-script.sh | 3 +++ .drone/boost.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 .drone.star create mode 100755 .drone/after-success.sh create mode 100755 .drone/before-install.sh create mode 100755 .drone/before-script.sh create mode 100755 .drone/boost.sh diff --git a/.drone.star b/.drone.star new file mode 100644 index 0000000..da51024 --- /dev/null +++ b/.drone.star @@ -0,0 +1,23 @@ +# Use, modification, and distribution are +# subject to the Boost Software License, Version 1.0. (See accompanying +# file LICENSE.txt) +# +# Copyright Rene Rivera 2020. + +# For Drone CI we use the Starlark scripting language to reduce duplication. +# As the yaml syntax for Drone CI is rather limited. +# +# +globalenv={} +linuxglobalimage="cppalliance/droneubuntu1604:1" +windowsglobalimage="cppalliance/dronevs2019" + +def main(ctx): + return [ + linux_cxx("TOOLSET=gcc CXXSTD=03,11 Job 0", "g++", packages="", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv), + linux_cxx("TOOLSET=clang CXXSTD=03,11,14,1z Job 1", "clang++", packages="libstdc++-4.9-dev", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv), + osx_cxx("TOOLSET=clang CXXSTD=03,11,14,1z Job 2", "clang++", packages="", buildtype="boost", environment={'TOOLSET': 'clang', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv), + ] + +# from https://github.com/boostorg/boost-ci +load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx") diff --git a/.drone/after-success.sh b/.drone/after-success.sh new file mode 100755 index 0000000..7a693aa --- /dev/null +++ b/.drone/after-success.sh @@ -0,0 +1,3 @@ +#!/bin/bash + + diff --git a/.drone/before-install.sh b/.drone/before-install.sh new file mode 100755 index 0000000..7a693aa --- /dev/null +++ b/.drone/before-install.sh @@ -0,0 +1,3 @@ +#!/bin/bash + + diff --git a/.drone/before-script.sh b/.drone/before-script.sh new file mode 100755 index 0000000..7a693aa --- /dev/null +++ b/.drone/before-script.sh @@ -0,0 +1,3 @@ +#!/bin/bash + + diff --git a/.drone/boost.sh b/.drone/boost.sh new file mode 100755 index 0000000..7b34595 --- /dev/null +++ b/.drone/boost.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +set -ex +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 + +echo '==================================> BEFORE_INSTALL' + +. .drone/before-install.sh + +echo '==================================> INSTALL' + +BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true +cd .. +git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root +cd boost-root +git submodule update --init tools/build +git submodule update --init libs/config +git submodule update --init tools/boostdep +cp -r $TRAVIS_BUILD_DIR/* libs/sort +python tools/boostdep/depinst/depinst.py sort +./bootstrap.sh +./b2 headers + +echo '==================================> BEFORE_SCRIPT' + +. $DRONE_BUILD_DIR/.drone/before-script.sh + +echo '==================================> SCRIPT' + +./b2 libs/sort/test toolset=$TOOLSET cxxstd=$CXXSTD + +echo '==================================> AFTER_SUCCESS' + +. $DRONE_BUILD_DIR/.drone/after-success.sh