• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3# Copyright 2020 Rene Rivera, Sam Darwin
4# Distributed under the Boost Software License, Version 1.0.
5# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt)
6
7set -e
8export TRAVIS_BUILD_DIR=$(pwd)
9export DRONE_BUILD_DIR=$(pwd)
10export TRAVIS_BRANCH=$DRONE_BRANCH
11export TRAVIS_EVENT_TYPE=$DRONE_BUILD_EVENT
12export VCS_COMMIT_ID=$DRONE_COMMIT
13export GIT_COMMIT=$DRONE_COMMIT
14export REPO_NAME=$DRONE_REPO
15export USER=$(whoami)
16export CC=${CC:-gcc}
17export PATH=~/.local/bin:/usr/local/bin:$PATH
18
19if [[ ${TRAVIS_OS_NAME} =~ [Ll]inux ]]; then
20  echo Installing locales for ${TRAVIS_OS_NAME} ...
21  sudo /usr/sbin/locale-gen fr_FR
22  sudo /usr/sbin/locale-gen en_GB
23  sudo locale -a
24  echo ...done with locales
25fi
26
27if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then
28
29echo '==================================> INSTALL'
30
31git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned
32cp -prf boost-ci-cloned/ci .
33rm -rf boost-ci-cloned
34
35if [ "$TRAVIS_OS_NAME" == "osx" ]; then
36    unset -f cd
37fi
38
39export SELF=`basename $REPO_NAME`
40export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
41export BOOST_CI_SRC_FOLDER=$(pwd)
42
43. ./ci/common_install.sh
44
45echo '==================================> SCRIPT'
46
47$BOOST_ROOT/libs/$SELF/ci/travis/build.sh
48
49elif [ "$DRONE_JOB_BUILDTYPE" == "fc4716b68c-0fcaf592f9" ]; then
50
51echo '==================================> INSTALL'
52
53git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned
54cp -prf boost-ci-cloned/ci .
55rm -rf boost-ci-cloned
56
57if [ "$TRAVIS_OS_NAME" == "osx" ]; then
58    unset -f cd
59fi
60
61export SELF=`basename $REPO_NAME`
62export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
63export BOOST_CI_SRC_FOLDER=$(pwd)
64
65. ./ci/common_install.sh
66
67echo '==================================> SCRIPT'
68
69cd $BOOST_ROOT/libs/$SELF
70ci/travis/codecov.sh
71
72elif [ "$DRONE_JOB_BUILDTYPE" == "fc4716b68c-db180b7bd2" ]; then
73
74echo '==================================> INSTALL'
75
76git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned
77cp -prf boost-ci-cloned/ci .
78rm -rf boost-ci-cloned
79
80if [ "$TRAVIS_OS_NAME" == "osx" ]; then
81    unset -f cd
82fi
83
84export SELF=`basename $REPO_NAME`
85export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
86export BOOST_CI_SRC_FOLDER=$(pwd)
87
88. ./ci/common_install.sh
89
90echo '==================================> SCRIPT'
91
92cd $BOOST_ROOT/libs/$SELF
93ci/travis/valgrind.sh
94
95elif [ "$DRONE_JOB_BUILDTYPE" == "fc4716b68c-cce9827eb5" ]; then
96
97echo '==================================> INSTALL'
98
99git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned
100cp -prf boost-ci-cloned/ci .
101rm -rf boost-ci-cloned
102
103if [ "$TRAVIS_OS_NAME" == "osx" ]; then
104    unset -f cd
105fi
106
107export SELF=`basename $REPO_NAME`
108export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
109export BOOST_CI_SRC_FOLDER=$(pwd)
110
111. ./ci/common_install.sh
112
113echo '==================================> SCRIPT'
114
115if  [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" -a \( "$TRAVIS_BRANCH" = "develop" -o "$TRAVIS_BRANCH" = "master" \) -a \( "$DRONE_BUILD_EVENT" = "push" -o "$DRONE_BUILD_EVENT" = "cron" \) ] ; then
116    cd $BOOST_ROOT/libs/$SELF
117    ci/travis/coverity.sh
118fi
119
120fi
121