From 5599bd33f78b659c553467fe416a1ffdaee9905e Mon Sep 17 00:00:00 2001 From: sdarwin Date: Wed, 30 Dec 2020 14:06:00 +0000 Subject: [PATCH] add drone config [ci skip] --- .drone.star | 22 ++++++++++++++++++++++ .drone/drone.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .drone.star create mode 100755 .drone/drone.sh diff --git a/.drone.star b/.drone.star new file mode 100644 index 00000000..133eadcd --- /dev/null +++ b/.drone.star @@ -0,0 +1,22 @@ +# 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("Job 0", "g++", packages="", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv), + osx_cxx("Job 1", "g++", packages="", buildtype="boost", buildscript="drone", environment={'DRONE_JOB_UUID': '356a192b79'}, 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/drone.sh b/.drone/drone.sh new file mode 100755 index 00000000..24876775 --- /dev/null +++ b/.drone/drone.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Copyright 2020 Rene Rivera, Sam Darwin +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at http://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 + +if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then + +echo '==================================> INSTALL' + +cd .. +git clone -b $TRAVIS_BRANCH --depth 1 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 +git submodule update --init tools/boost_install +git submodule update --init libs/headers +cp -r $TRAVIS_BUILD_DIR/* libs/lambda +python tools/boostdep/depinst/depinst.py lambda +./bootstrap.sh +./b2 headers + +echo '==================================> SCRIPT' + +TOOLSET=gcc,clang +if [ $TRAVIS_OS_NAME == osx ]; then TOOLSET=clang; fi +./b2 --verbose-test libs/config/test//config_info toolset=$TOOLSET || true +./b2 libs/lambda/test toolset=$TOOLSET + +fi