5151 export LLVM_DIR=$LLVM_LIB_ROOT_DIR/lib/cmake/llvm
5252 export CXX=clang++-8
5353 python3 -m pip uninstall taichi -y
54- python3 -m pip install --user -r requirements_dev.txt
55- python3 -m pip install --user twine
54+ python3 -m pip uninstall taichi-nightly -y
55+ python3 -m pip install -r requirements_dev.txt
56+ python3 -m pip install twine
5657 cd python
5758 git fetch origin master
5859 export TAICHI_CMAKE_ARGS=$CI_SETUP_CMAKE_ARGS
8384 glewinfo
8485 ti diagnose
8586 ti changelog
86- ti test -vr2 -t2
87+ nvidia-smi
88+ ti test mpm_particle_list -vr2 -t2 -s -a cuda
89+ ti test random -vr2 -t2 -s -a cuda
90+ nvidia-smi
91+ ti test -vr2 -t2 -k "not ndarray"
92+ ti test -vr2 -t1 -k "ndarray"
8793 env :
8894 PYTHON : ${{ matrix.python }}
8995
@@ -105,6 +111,49 @@ jobs:
105111 if [ $PROJECT_NAME == "taichi-nightly" ]; then export PYPI_PWD="$NIGHT_PWD" && python3 build.py upload --skip_build --testpypi --project_name $PROJECT_NAME
106112 elif [ $PROJECT_NAME == "taichi" ]; then export PYPI_PWD="$PROD_PWD" && python3 build.py upload --skip_build; fi
107113
114+ build_and_test_gpu_linux :
115+ name : Build and Test (GPU)
116+ runs-on : [self-hosted, cuda, vulkan, cn]
117+ timeout-minutes : 60
118+ steps :
119+ - uses : actions/checkout@v2
120+ with :
121+ submodules : ' recursive'
122+
123+ - name : Build
124+ run : |
125+ git --version
126+ export PATH=$LLVM_LIB_ROOT_DIR/bin:/usr/local/cuda/bin:$PATH
127+ export LLVM_DIR=$LLVM_LIB_ROOT_DIR/lib/cmake/llvm
128+ export CXX=clang++-8
129+ export PYTHON=/usr/bin/python3
130+ $PYTHON -m pip uninstall taichi -y
131+ $PYTHON -m pip install -r requirements_dev.txt
132+ cd python
133+ git fetch origin master
134+ TAICHI_CMAKE_ARGS=$CI_SETUP_CMAKE_ARGS $PYTHON build.py build
135+ cd ..
136+ export NUM_WHL=`ls dist/*.whl | wc -l`
137+ if [ $NUM_WHL -ne 1 ]; then echo 'ERROR: created more than 1 whl.' && exit 1; fi
138+ $PYTHON -m pip install dist/*.whl
139+ env :
140+ LLVM_LIB_ROOT_DIR : /opt/taichi-llvm-10.0.0
141+ CI_SETUP_CMAKE_ARGS : -DTI_WITH_OPENGL:BOOL=ON -DTI_WITH_CC:BOOL=OFF -DTI_WITH_VULKAN:BOOL=ON
142+ BUILD_NUM_THREADS : 8
143+
144+ - name : Test
145+ run : |
146+ export PYTHON=/usr/bin/python3
147+ export PATH=$PATH:$HOME/.local/bin
148+ export DISPLAY=:1
149+ hash -r
150+ glewinfo
151+ $PYTHON examples/algorithm/laplace.py
152+ ti diagnose
153+ ti changelog
154+ ti test -vr2 -t2 -k "not ndarray"
155+ ti test -vr2 -t1 -k "ndarray"
156+
108157 build_and_upload_mac :
109158 name : Build and Upload (macOS only)
110159 needs : matrix_prep
0 commit comments