Skip to content

Commit

Permalink
[ci] Fix ci shell scripts do not return error code (#3189)
Browse files Browse the repository at this point in the history
* [ci] Fix shell do not return error code
  • Loading branch information
Leonz5288 authored Oct 15, 2021
1 parent 6624e80 commit fb8e582
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ jobs:

- name: Test
run: .github/workflows/scripts/unix_test.sh
env:
RUN_CPP_TESTS: ON

build_and_test_cpu:
name: Build and Test (CPU)
Expand Down Expand Up @@ -180,7 +182,7 @@ jobs:
.github/workflows/scripts/unix_build.sh
env:
LLVM_LIB_ROOT_DIR: /opt/taichi-llvm-10.0.0
CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=ON -DTI_WITH_CC:BOOL=OFF -DTI_WITH_VULKAN:BOOL=ON
CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=ON -DTI_WITH_CC:BOOL=OFF -DTI_WITH_VULKAN:BOOL=ON -DTI_BUILD_TESTS:BOOL=ON
BUILD_NUM_THREADS: 8
LLVM_PATH: /opt/taichi-llvm-10.0.0/bin
LLVM_DIR: /opt/taichi-llvm-10.0.0/lib/cmake/llvm
Expand All @@ -191,6 +193,7 @@ jobs:
env:
DISPLAY: :1
GPU_TEST: ON
RUN_CPP_TESTS: ON

build_and_test_windows:
name: Build and Test (Windows)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/scripts/unix_build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
set -ex
export PATH=`pwd`/taichi-llvm/bin/:$LLVM_PATH:$PATH
python3 -m pip uninstall taichi taichi-nightly -y
python3 -m pip install -r requirements_dev.txt
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/scripts/unix_test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set -ex
TAICHI_REPO_DIR=`pwd`
TI_LIB_DIR=`python3 -c "import taichi;print(taichi.__path__[0])" | tail -1`
TI_LIB_DIR="$TI_LIB_DIR/lib" ./build/taichi_cpp_tests
[[ $RUN_CPP_TESTS == "ON" ]] && TI_LIB_DIR="$TI_LIB_DIR/lib" ./build/taichi_cpp_tests
export PATH=$TAICHI_REPO_DIR/taichi-llvm/bin/:$PATH
## Only GPU machine uses system python.
[ -z $GPU_TEST ] || export PATH=$PATH:$HOME/.local/bin
Expand Down

0 comments on commit fb8e582

Please sign in to comment.