Exit Bash Script on Error (#381)

* Update p9.sh

* Update z13.sh

* Update p9.sh

* Update p9.sh

* enable LLVM
This commit is contained in:
Tian Jin 2019-11-25 21:21:27 -05:00 committed by Tian Jin
parent 53ab014a1d
commit 6580b47e25
2 changed files with 19 additions and 7 deletions

View File

@ -1,10 +1,14 @@
#!/bin/bash #!/bin/bash
# Exit on error:
set -e
# Check for required env variables ONNF_DEP_DIR, LLVM_PROJECT_ROOT # Check for required env variables ONNF_DEP_DIR, LLVM_PROJECT_ROOT
if [[ -z "${ONNF_DEP_DIR}" ]]; then if [[ -z "${ONNF_DEP_DIR}" ]]; then
echo "ONNF_DEP_DIR env var is missing." echo "ONNF_DEP_DIR env var is missing."
exit 1 exit 1
fi fi
if [[ -z "${LLVM_PROJECT_ROOT}" ]]; then if [[ -z "${LLVM_PROJECT_ROOT}" ]]; then
echo "LLVM_PROJECT_ROOT env var is missing." echo "LLVM_PROJECT_ROOT env var is missing."
exit 1 exit 1

View File

@ -1,11 +1,19 @@
#!/bin/bash #!/bin/bash
# Exit on error:
set -e
# Check for required env variables JAVA_HOME # Check for required env variables JAVA_HOME
if [[ -z "${JAVA_HOME}" ]]; then if [[ -z "${JAVA_HOME}" ]]; then
echo "JAVA_HOME env var is missing." echo "JAVA_HOME env var is missing."
exit 1 exit 1
fi fi
if [[ -z "${LLVM_PROJECT_ROOT}" ]]; then
echo "LLVM_PROJECT_ROOT env var is missing."
exit 1
fi
# Set up mock installation path: # Set up mock installation path:
export INSTALL_PATH=$WORKSPACE/INSTALL_PATH export INSTALL_PATH=$WORKSPACE/INSTALL_PATH
mkdir -p $INSTALL_PATH mkdir -p $INSTALL_PATH
@ -22,13 +30,13 @@ export BUILD_PATH=$(pwd)
export CPATH=$(pwd)/../runtime/ export CPATH=$(pwd)/../runtime/
mkdir build && cd build mkdir build && cd build
cmake -DCMAKE_C_COMPILER=$CC \ cmake -DCMAKE_C_COMPILER=$CC \
-DCMAKE_CXX_COMPILER=$CXX \ -DCMAKE_CXX_COMPILER=$CXX \
-DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PATH \ -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH \
-DONNF_ENABLE_NODE_TEST_JAVA=ON \ -DONNF_ENABLE_NODE_TEST_JAVA=ON \
-DONNF_ENABLE_NODE_TEST_JNI=ON \ -DONNF_ENABLE_NODE_TEST_JNI=ON \
-DONNF_ENABLE_NODE_TEST_CPP=OFF \ -DONNF_ENABLE_NODE_TEST_CPP=OFF \
-DONNF_TARGET_ARCH=z13 .. -DONNF_TARGET_ARCH=z13 ..
make -j "$(nproc)" install make -j "$(nproc)" install