summaryrefslogtreecommitdiff
path: root/platform/linux/scripts/coveralls.sh
blob: 57affe1e28f90e9cacd2b166b6b811d6be68a522 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash

set -e
set -o pipefail

command -v lcov 2> /dev/null || {
    echo "Aborting: lcov not found."
    exit 1
}

# Collect coverage data and save it into coverage.info
lcov \
    --quiet \
    --capture \
    --no-external \
    --gcov-tool "gcov-5" \
    --directory "src/mbgl" \
    --directory "platform" \
    --directory "include/mbgl" \
    --directory "build/linux-x86_64/${BUILDTYPE}" \
    --base-directory "build/linux-x86_64/${BUILDTYPE}" \
    --output-file "build/linux-x86_64/${BUILDTYPE}/coverage.info"

coveralls-lcov \
    --service-name="${COVERALLS_SERVICE_NAME}" \
    --repo-token="${COVERALLS_REPO_TOKEN}" \
    --service-job-id="${CIRCLE_BUILD_NUM}" \
    "build/linux-x86_64/${BUILDTYPE}/coverage.info"