diff --git a/ci_scripts/all-vars.sh b/ci_scripts/all-vars.sh index 93db8c6b..8657b9dc 100755 --- a/ci_scripts/all-vars.sh +++ b/ci_scripts/all-vars.sh @@ -4,7 +4,7 @@ set -xe export OS=$(uname) if [ "${OS}" = "Linux" ]; then - export DS_ROOT_TASK=${HOME} + export DS_ROOT_TASK=${CI_TASK_DIR} export PYENV_ROOT="${DS_ROOT_TASK}/pyenv-root" export DS_CPU_COUNT=$(nproc) fi; diff --git a/ci_scripts/electronjs-tests-prod.sh b/ci_scripts/electronjs-tests-prod.sh index 1067d7f5..43c789a3 100755 --- a/ci_scripts/electronjs-tests-prod.sh +++ b/ci_scripts/electronjs-tests-prod.sh @@ -28,6 +28,12 @@ export_node_bin_path which electron which node +if [ "${OS}" = "Linux" ]; then + export DISPLAY=':99.0' + sudo Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + xvfb_process=$! +fi + node --version stt --version @@ -35,3 +41,8 @@ stt --version check_runtime_electronjs run_electronjs_prod_inference_tests "${bitrate}" + +if [ "${OS}" = "Linux" ]; then + sleep 1 + sudo kill -9 ${xvfb_process} || true +fi diff --git a/ci_scripts/electronjs-tests.sh b/ci_scripts/electronjs-tests.sh index 061f5720..368d4483 100755 --- a/ci_scripts/electronjs-tests.sh +++ b/ci_scripts/electronjs-tests.sh @@ -21,6 +21,12 @@ export_node_bin_path which electron which node +if [ "${OS}" = "Linux" ]; then + export DISPLAY=':99.0' + sudo Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + xvfb_process=$! +fi + node --version stt --version @@ -28,3 +34,8 @@ stt --version check_runtime_electronjs run_electronjs_inference_tests + +if [ "${OS}" = "Linux" ]; then + sleep 1 + sudo kill -9 ${xvfb_process} || true +fi diff --git a/ci_scripts/electronjs_tflite-tests-prod.sh b/ci_scripts/electronjs_tflite-tests-prod.sh index 63ff8be1..6d1a0b55 100755 --- a/ci_scripts/electronjs_tflite-tests-prod.sh +++ b/ci_scripts/electronjs_tflite-tests-prod.sh @@ -28,6 +28,12 @@ export_node_bin_path which electron which node +if [ "${OS}" = "Linux" ]; then + export DISPLAY=':99.0' + sudo Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + xvfb_process=$! +fi + node --version stt --version @@ -35,3 +41,8 @@ stt --version check_runtime_electronjs run_electronjs_prodtflite_inference_tests "${bitrate}" + +if [ "${OS}" = "Linux" ]; then + sleep 1 + sudo kill -9 ${xvfb_process} || true +fi diff --git a/ci_scripts/electronjs_tflite-tests.sh b/ci_scripts/electronjs_tflite-tests.sh index cd5f015b..ed5c3376 100755 --- a/ci_scripts/electronjs_tflite-tests.sh +++ b/ci_scripts/electronjs_tflite-tests.sh @@ -25,6 +25,12 @@ export_node_bin_path which electron which node +if [ "${OS}" = "Linux" ]; then + export DISPLAY=':99.0' + sudo Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + xvfb_process=$! +fi + node --version stt --version @@ -32,3 +38,8 @@ stt --version check_runtime_electronjs run_electronjs_inference_tests + +if [ "${OS}" = "Linux" ]; then + sleep 1 + sudo kill -9 ${xvfb_process} || true +fi diff --git a/ci_scripts/tf-vars.sh b/ci_scripts/tf-vars.sh index 81dd0189..97da9fbc 100755 --- a/ci_scripts/tf-vars.sh +++ b/ci_scripts/tf-vars.sh @@ -4,7 +4,7 @@ set -ex export OS=$(uname) if [ "${OS}" = "Linux" ]; then - export DS_ROOT_TASK=$(/usr/bin/realpath "${HOME}") + export DS_ROOT_TASK=${CI_TASK_DIR} BAZEL_URL=https://github.com/bazelbuild/bazel/releases/download/3.1.0/bazel-3.1.0-installer-linux-x86_64.sh BAZEL_SHA256=7ba815cbac712d061fe728fef958651512ff394b2708e89f79586ec93d1185ed