Skip to content

Commit 427c8fa

Browse files
authored
Merge pull request #13 from sdarwin/drone
Drone config; I have no idea if this is right or not; Let's give it a try.
2 parents 92f66a9 + f0e79b8 commit 427c8fa

File tree

6 files changed

+124
-0
lines changed

6 files changed

+124
-0
lines changed

.drone.star

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Use, modification, and distribution are
2+
# subject to the Boost Software License, Version 1.0. (See accompanying
3+
# file LICENSE.txt)
4+
#
5+
# Copyright Rene Rivera 2020.
6+
7+
# For Drone CI we use the Starlark scripting language to reduce duplication.
8+
# As the yaml syntax for Drone CI is rather limited.
9+
#
10+
#
11+
globalenv={}
12+
linuxglobalimage="cppalliance/droneubuntu1604:1"
13+
windowsglobalimage="cppalliance/dronevs2019"
14+
15+
def main(ctx):
16+
return [
17+
linux_cxx("TEST_CMAKE=TRUE Job 0", "g++", packages="", buildtype="96ad197d74-2319b6d45f", image=linuxglobalimage, environment={'TEST_CMAKE': 'TRUE', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
18+
linux_cxx("TOOLSET=gcc COMPILER=g++ CXXSTD=03,11 Job 1", "g++", packages="", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv),
19+
linux_cxx("TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 Job 2", "g++-4.7", packages="g++-4.7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.7', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
20+
linux_cxx("TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11 Job 3", "g++-4.8", packages="g++-4.8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.8', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv),
21+
linux_cxx("TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11 Job 4", "g++-4.9", packages="g++-4.9", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.9', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
22+
linux_cxx("TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z Job 5", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv),
23+
linux_cxx("TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z Job 6", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv),
24+
linux_cxx("TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 Job 7", "g++-7", packages="g++-7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03,11,14,17', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv),
25+
linux_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=03,11 Job 8", "clang++", packages="", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': 'fe5dbbcea5'}, globalenv=globalenv),
26+
linux_cxx("TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03, Job 9", "clang++", packages="clang-3.5 libstdc++-4.9-dev", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '0ade7c2cf9'}, globalenv=globalenv),
27+
linux_cxx("TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03, Job 10", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'b1d5781111'}, globalenv=globalenv),
28+
linux_cxx("TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03, Job 11", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv),
29+
linux_cxx("TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03, Job 12", "clang++-3.8", packages="clang-3.8 libstdc++-4.9-dev", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv),
30+
linux_cxx("TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03, Job 13", "clang++-3.9", packages="clang-3.9 libstdc++-4.9-dev", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv),
31+
linux_cxx("TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03, Job 14", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'fa35e19212'}, globalenv=globalenv),
32+
linux_cxx("TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03, Job 15", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'f1abd67035'}, globalenv=globalenv),
33+
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,1 Job 16", "clang++", packages="", buildtype="boost", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '1574bddb75'}, globalenv=globalenv),
34+
]
35+
36+
# from https://github.com/boostorg/boost-ci
37+
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")

.drone/96ad197d74-2319b6d45f.sh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
export TRAVIS_BUILD_DIR=$(pwd)
5+
export DRONE_BUILD_DIR=$(pwd)
6+
export TRAVIS_BRANCH=$DRONE_BRANCH
7+
export VCS_COMMIT_ID=$DRONE_COMMIT
8+
export GIT_COMMIT=$DRONE_COMMIT
9+
export REPO_NAME=$DRONE_REPO
10+
export PATH=~/.local/bin:/usr/local/bin:$PATH
11+
12+
echo '==================================> BEFORE_INSTALL'
13+
14+
. .drone/before-install.sh
15+
16+
echo '==================================> INSTALL'
17+
18+
BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
19+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/assert.git ../assert
20+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/config.git ../config
21+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/core.git ../core
22+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/static_assert.git ../static_assert
23+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/throw_exception.git ../throw_exception
24+
25+
echo '==================================> BEFORE_SCRIPT'
26+
27+
. $DRONE_BUILD_DIR/.drone/before-script.sh
28+
29+
echo '==================================> SCRIPT'
30+
31+
mkdir __build__ && cd __build__
32+
cmake ../test/test_cmake
33+
cmake --build .
34+
35+
echo '==================================> AFTER_SUCCESS'
36+
37+
. $DRONE_BUILD_DIR/.drone/after-success.sh

.drone/after-success.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+

.drone/before-install.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+

.drone/before-script.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+

.drone/boost.sh

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
export TRAVIS_BUILD_DIR=$(pwd)
5+
export DRONE_BUILD_DIR=$(pwd)
6+
export TRAVIS_BRANCH=$DRONE_BRANCH
7+
export VCS_COMMIT_ID=$DRONE_COMMIT
8+
export GIT_COMMIT=$DRONE_COMMIT
9+
export REPO_NAME=$DRONE_REPO
10+
export PATH=~/.local/bin:/usr/local/bin:$PATH
11+
12+
echo '==================================> BEFORE_INSTALL'
13+
14+
. .drone/before-install.sh
15+
16+
echo '==================================> INSTALL'
17+
18+
BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
19+
cd ..
20+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
21+
cd boost-root
22+
git submodule update --init tools/build
23+
git submodule update --init libs/config
24+
git submodule update --init tools/boostdep
25+
cp -r $TRAVIS_BUILD_DIR/* libs/array
26+
python tools/boostdep/depinst/depinst.py array
27+
./bootstrap.sh
28+
./b2 headers
29+
30+
echo '==================================> BEFORE_SCRIPT'
31+
32+
. $DRONE_BUILD_DIR/.drone/before-script.sh
33+
34+
echo '==================================> SCRIPT'
35+
36+
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
37+
./b2 -j 3 libs/array/test toolset=$TOOLSET cxxstd=$CXXSTD
38+
39+
echo '==================================> AFTER_SUCCESS'
40+
41+
. $DRONE_BUILD_DIR/.drone/after-success.sh

0 commit comments

Comments
 (0)