Skip to content

Commit

Permalink
drone
Browse files Browse the repository at this point in the history
  • Loading branch information
sdarwin committed Dec 30, 2020
1 parent 8ec9f60 commit 136f4c9
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .drone.star
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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', 'TRAVIS_COMPILER': 'g++', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc CXXSTD=98,0x Job 1", "g++", packages="g++-4.4", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'CXXSTD': '98,0x', 'TRAVIS_COMPILER': 'g++-4.4', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc CXXSTD=03,0x Job 2", "g++", packages="g++-4.6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'CXXSTD': '03,0x', 'TRAVIS_COMPILER': 'g++-4.6', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc CXXSTD=03,11,14,1z Job 3", "g++", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'CXXSTD': '03,11,14,1z', 'TRAVIS_COMPILER': 'g++-5', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc CXXSTD=03,11,14,1z Job 4", "g++", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'CXXSTD': '03,11,14,1z', 'TRAVIS_COMPILER': 'g++-6', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc CXXSTD=03,11,14,17 Job 5", "g++", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'CXXSTD': '03,11,14,17', 'TRAVIS_COMPILER': 'g++-7', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc CXXSTD=03,11,14,17 Job 6", "g++", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'CXXSTD': '03,11,14,17', 'TRAVIS_COMPILER': 'g++-8', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang CXXSTD=03,11,14,1z Job 7", "clang++", packages="", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'CXXSTD': '03,11,14,1z', 'TRAVIS_COMPILER': 'clang++', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang CXXSTD=03,11,14 Job 8", "clang++", packages="libc++-dev", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'CXXSTD': '03,11,14', 'TRAVIS_COMPILER': 'clang++-libc++', 'DRONE_JOB_UUID': 'fe5dbbcea5'}, globalenv=globalenv),
osx_cxx("TOOLSET=clang CXXSTD=03,11,14,1z Job 9", "clang++", packages="", buildtype="boost", environment={'TOOLSET': 'clang', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_OS_NAME': 'osx', 'TRAVIS_COMPILER': 'clang++', 'DRONE_JOB_UUID': '0ade7c2cf9'}, globalenv=globalenv),
]

# from https://github.com/boostorg/boost-ci
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")
3 changes: 3 additions & 0 deletions .drone/after-success.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash


3 changes: 3 additions & 0 deletions .drone/before-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash


3 changes: 3 additions & 0 deletions .drone/before-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash


43 changes: 43 additions & 0 deletions .drone/boost.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

set -ex
export TRAVIS_BUILD_DIR=$(pwd)
export TRAVIS_BRANCH=$DRONE_BRANCH
export TRAVIS_OS_NAME=${DRONE_JOB_OS_NAME:-linux}
export VCS_COMMIT_ID=$DRONE_COMMIT
export GIT_COMMIT=$DRONE_COMMIT
export DRONE_CURRENT_BUILD_DIR=$(pwd)
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/boost_install
git submodule update --init libs/headers
git submodule update --init tools/build
git submodule update --init libs/config
git submodule update --init tools/boostdep
cp -r $TRAVIS_BUILD_DIR/* libs/heap
python tools/boostdep/depinst/depinst.py heap
./bootstrap.sh
./b2 headers

echo '==================================> BEFORE_SCRIPT'

. $DRONE_CURRENT_BUILD_DIR/.drone/before-script.sh

echo '==================================> SCRIPT'

echo "using $TOOLSET : : $TRAVIS_COMPILER ;" > ~/user-config.jam
./b2 -j3 libs/heap/test toolset=$TOOLSET cxxstd=$CXXSTD

echo '==================================> AFTER_SUCCESS'

. $DRONE_CURRENT_BUILD_DIR/.drone/after-success.sh

0 comments on commit 136f4c9

Please sign in to comment.