Introduce CI infra x64 build and test scripts (#4592)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Wed, 6 Mar 2019 05:36:36 +0000 (14:36 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 6 Mar 2019 05:36:36 +0000 (14:36 +0900)
Introduce x64 build and test scripts

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
scripts/standalone/docker_build_test_x64.sh [new file with mode: 0755]

diff --git a/scripts/standalone/docker_build_test_x64.sh b/scripts/standalone/docker_build_test_x64.sh
new file mode 100755 (executable)
index 0000000..b354aab
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+ROOT_PATH="$CURRENT_PATH/../../"
+
+# docker image name
+if [[ -z $DOCKER_IMAGE_NAME ]]; then
+  echo "It will use default docker image name"
+else
+  export DOCKER_IMAGE_NAME
+fi
+
+# Mirror server setting
+if [[ -z $EXTERNAL_DOWNLOAD_SERVER ]]; then
+  echo "It will not use mirror server"
+else
+  DOCKER_ENV_VARS=" -e EXTERNAL_DOWNLOAD_SERVER=$EXTERNAL_DOWNLOAD_SERVER"
+fi
+export DOCKER_ENV_VARS
+
+pushd $ROOT_PATH > /dev/null
+
+CMD="export OPTIONS+='-DBUILD_NEURUN=ON -DBUILD_PURE_ARM_COMPUTE=OFF' && \
+     make && \
+     make install"
+
+source nnfw docker-run-user bash -c "$CMD"
+
+# Model download server setting
+if [[ -z $MODELFILE_SERVER ]]; then
+  echo "Need model file server setting"
+  exit 1
+fi
+DOCKER_ENV_VARS=" -e MODELFILE_SERVER=$MODELFILE_SERVER"
+DOCKER_ENV_VARS+=" -e BACKENDS=cpu"
+DOCKER_ENV_VARS+=" -e OP_BACKEND_ALLOPS=cpu"
+
+source nnfw docker-run-user ./tests/scripts/test_driver.sh \
+  --ldlibrarypath=$ROOT_PATH/Product/out/lib/neurun \
+  --frameworktest_list_file=./tests/scripts/neurun_frameworktest_list.x86-64.cpu.txt \
+  --reportdir=$ROOT_PATH/report/ .
+
+popd > /dev/null