summaryrefslogtreecommitdiffstats
path: root/ci/script.sh
blob: e9f9bcb36f3453879cbf4a714da69344bfc82581 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# build, test and generate docs in this phase

set -ex

. "$(dirname $0)/utils.sh"

main() {
    # disable_cross_doctests
    cargo build --target "${TARGET}" --verbose --all
    if [ "$(architecture)" = "amd64" ] || [ "$(architecture)" = "i386" ]; then
        cargo test --target "${TARGET}" --verbose --all
        "$( dirname "${0}" )/test_complete.sh"
    fi
    # sanity check the file type
    file target/$TARGET/debug/rg
}

main