ci_bm1682.sh 965 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/bash
# The git version of CI is 2.7.4. This script is not compatible with git version 1.7.1.
set -ex

# Build the code with test=off. This is executed in the CI system.
function bm1682_buid {
    cd /paddlelite
    lite/tools/build_bm.sh --target_name=BM1682 --test=OFF
}

# Build and run bm1682 tests. This is executed in the CI system.
function bm1682_test {
W
Wangzheee 已提交
13
    cd /paddlelite/build.lite.bm/inference_lite_lib/demo/cxx/bm_demo
14 15
    wget http://paddle-inference-dist.bj.bcebos.com/mobilenet_v1.tar.gz
    tar -xvf mobilenet_v1.tar.gz
W
Wangzheee 已提交
16
    bash build.sh
17
    ./mobilenet_full_api ./mobilenet_v1 224 224
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
}

function main {
    # Parse command line.
    for i in "$@"; do
        case $i in
            ci_bm1682)
                bm1682_buid
                bm1682_test
                shift
                ;;
            *)
                # unknown option
                print_usage
                exit 1
                ;;
        esac
    done
}

main $@