summaryrefslogtreecommitdiffstats
path: root/ci/install.sh
blob: dc065f0ab76c6e7fca65ca243d2b053247868fad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
set -exo pipefail

main() {
    rustup component add rust-src
    SYSROOT=$(rustc --print sysroot)
    if [[ ! "$SYSROOT" =~ "$TARGET" ]]; then
        rustup target add $TARGET
    else
        echo "Target $TARGET is already installed"
    fi
    if [ ! -z $COVERAGE ]; then
        if ! [ -x "$(command -v grcov)" ]; then
            cargo install grcov
        else
            echo "grcov is already installed"
        fi
    fi
}

main