Skip to content

Commit

Permalink
[test] disable sudo in tmate.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ailing Zhang committed Sep 23, 2021
1 parent ce87580 commit 7fe0ef9
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 4 deletions.
55 changes: 52 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ jobs:
export LLVM_DIR=$LLVM_LIB_ROOT_DIR/lib/cmake/llvm
export CXX=clang++-8
python3 -m pip uninstall taichi -y
python3 -m pip install --user -r requirements_dev.txt
python3 -m pip install --user twine
python3 -m pip uninstall taichi-nightly -y
python3 -m pip install -r requirements_dev.txt
python3 -m pip install twine
cd python
git fetch origin master
export TAICHI_CMAKE_ARGS=$CI_SETUP_CMAKE_ARGS
Expand Down Expand Up @@ -83,7 +84,12 @@ jobs:
glewinfo
ti diagnose
ti changelog
ti test -vr2 -t2
nvidia-smi
ti test mpm_particle_list -vr2 -t2 -s -a cuda
ti test random -vr2 -t2 -s -a cuda
nvidia-smi
ti test -vr2 -t2 -k "not ndarray"
ti test -vr2 -t1 -k "ndarray"
env:
PYTHON: ${{ matrix.python }}

Expand All @@ -105,6 +111,49 @@ jobs:
if [ $PROJECT_NAME == "taichi-nightly" ]; then export PYPI_PWD="$NIGHT_PWD" && python3 build.py upload --skip_build --testpypi --project_name $PROJECT_NAME
elif [ $PROJECT_NAME == "taichi" ]; then export PYPI_PWD="$PROD_PWD" && python3 build.py upload --skip_build; fi
build_and_test_gpu_linux:
name: Build and Test (GPU)
runs-on: [self-hosted, cuda, vulkan, cn]
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Build
run: |
git --version
export PATH=$LLVM_LIB_ROOT_DIR/bin:/usr/local/cuda/bin:$PATH
export LLVM_DIR=$LLVM_LIB_ROOT_DIR/lib/cmake/llvm
export CXX=clang++-8
export PYTHON=/usr/bin/python3
$PYTHON -m pip uninstall taichi -y
$PYTHON -m pip install -r requirements_dev.txt
cd python
git fetch origin master
TAICHI_CMAKE_ARGS=$CI_SETUP_CMAKE_ARGS $PYTHON build.py build
cd ..
export NUM_WHL=`ls dist/*.whl | wc -l`
if [ $NUM_WHL -ne 1 ]; then echo 'ERROR: created more than 1 whl.' && exit 1; fi
$PYTHON -m pip install dist/*.whl
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
BUILD_NUM_THREADS: 8

- name: Test
run: |
export PYTHON=/usr/bin/python3
export PATH=$PATH:$HOME/.local/bin
export DISPLAY=:1
hash -r
glewinfo
$PYTHON examples/algorithm/laplace.py
ti diagnose
ti changelog
ti test -vr2 -t2 -k "not ndarray"
ti test -vr2 -t1 -k "ndarray"
build_and_upload_mac:
name: Build and Upload (macOS only)
needs: matrix_prep
Expand Down
2 changes: 1 addition & 1 deletion python/taichi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def _test_python(args):
threads = 2

if not os.environ.get('TI_DEVICE_MEMORY_GB'):
os.environ['TI_DEVICE_MEMORY_GB'] = '0.5' # Discussion: #769
os.environ['TI_DEVICE_MEMORY_GB'] = '0.3' # Discussion: #769

env_threads = os.environ.get('TI_TEST_THREADS', '')
threads = args.threads or env_threads or threads
Expand Down

0 comments on commit 7fe0ef9

Please sign in to comment.