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 VCS_COMMIT_ID=$DRONE_COMMIT
12export GIT_COMMIT=$DRONE_COMMIT
13export REPO_NAME=$DRONE_REPO
14export PATH=~/.local/bin:/usr/local/bin:$PATH
15
16if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then
17
18echo '==================================> INSTALL'
19
20git clone https://github.com/jeking3/boost-ci.git boost-ci
21cp -pr boost-ci/ci boost-ci/.codecov.yml .
22
23if [ "$TRAVIS_OS_NAME" == "osx" ]; then
24    unset -f cd
25fi
26
27export SELF=`basename $REPO_NAME`
28export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
29export BOOST_CI_SRC_FOLDER=$(pwd)
30
31. ./ci/common_install.sh
32
33echo '==================================> SCRIPT'
34
35cd $BOOST_ROOT/libs/$SELF
36ci/travis/build.sh
37
38elif [ "$DRONE_JOB_BUILDTYPE" == "6d5a3a255d-bbb3de2b00" ]; then
39
40echo '==================================> INSTALL'
41
42git clone https://github.com/jeking3/boost-ci.git boost-ci
43cp -pr boost-ci/ci boost-ci/.codecov.yml .
44
45if [ "$TRAVIS_OS_NAME" == "osx" ]; then
46    unset -f cd
47fi
48
49export SELF=`basename $REPO_NAME`
50export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
51export BOOST_CI_SRC_FOLDER=$(pwd)
52
53. ./ci/common_install.sh
54
55echo '==================================> SCRIPT'
56
57pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && export PATH=/tmp/lcov/bin:$PATH && which lcov && lcov --version && popd
58cd $BOOST_ROOT/libs/$SELF
59ci/travis/codecov.sh
60
61elif [ "$DRONE_JOB_BUILDTYPE" == "6d5a3a255d-ed45733e6c" ]; then
62
63echo '==================================> INSTALL'
64
65git clone https://github.com/jeking3/boost-ci.git boost-ci
66cp -pr boost-ci/ci boost-ci/.codecov.yml .
67
68if [ "$TRAVIS_OS_NAME" == "osx" ]; then
69    unset -f cd
70fi
71
72export SELF=`basename $REPO_NAME`
73export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
74export BOOST_CI_SRC_FOLDER=$(pwd)
75
76. ./ci/common_install.sh
77
78echo '==================================> SCRIPT'
79
80cd $BOOST_ROOT/libs/$SELF
81ci/travis/cppcheck.sh
82
83elif [ "$DRONE_JOB_BUILDTYPE" == "6d5a3a255d-cce9827eb5" ]; then
84
85echo '==================================> INSTALL'
86
87git clone https://github.com/jeking3/boost-ci.git boost-ci
88cp -pr boost-ci/ci boost-ci/.codecov.yml .
89
90if [ "$TRAVIS_OS_NAME" == "osx" ]; then
91    unset -f cd
92fi
93
94export SELF=`basename $REPO_NAME`
95export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH"
96export BOOST_CI_SRC_FOLDER=$(pwd)
97
98. ./ci/common_install.sh
99
100echo '==================================> SCRIPT'
101
102if  [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" -a \( "$DRONE_BRANCH" = "develop" -o "$DRONE_BRANCH" = "master" \) -a "$DRONE_BUILD_EVENT" = "push" ] ; then
103cd $BOOST_ROOT/libs/$SELF
104ci/travis/coverity.sh
105fi
106
107fi
108