-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Linux CD containerization (#107)
- Loading branch information
Showing
4 changed files
with
96 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
# Parse ARGs | ||
PY=$1 | ||
GPU_BUILD=$2 | ||
PROJECT_NAME=$3 | ||
CI_SETUP_CMAKE_ARGS=$4 | ||
|
||
source /home/dev/miniconda/etc/profile.d/conda.sh | ||
conda activate $PY | ||
|
||
python3 -m pip uninstall taichi taichi-nightly -y | ||
|
||
cd taichi | ||
|
||
if [[ $GPU_BUILD == "OFF" ]] | ||
then | ||
python3 -m pip install -r requirements_dev.txt | ||
fi | ||
|
||
cd python | ||
# This is for changelog | ||
git fetch origin master | ||
TAICHI_CMAKE_ARGS=$CI_SETUP_CMAKE_ARGS python3 build.py build --project_name $PEOJECT_NAME | ||
# Run basic cpp tests | ||
cd .. | ||
CUR_DIR=`pwd` | ||
TI_LIB_DIR=$CUR_DIR/python/taichi/lib ./build/taichi_cpp_tests | ||
|
||
cp dist/*.whl /wheel/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
# Parse ARGs | ||
PY=$1 | ||
GPU_TEST=$2 | ||
|
||
source /home/dev/miniconda/etc/profile.d/conda.sh | ||
conda activate $PY | ||
|
||
python3 -m pip install ./*.whl | ||
|
||
if [[ $GPU_TEST == "OFF" ]] | ||
then | ||
python3 -m pip install -r requirements_test.txt | ||
fi | ||
|
||
export TI_IN_DOCKER=true | ||
ti diagnose | ||
ti changelog | ||
|
||
if [[ $GPU_TEST == "OFF" ]] | ||
then | ||
ti test -vr2 -t2 | ||
else | ||
ti test -vr2 -t2 -k "not ndarray and not torch" | ||
ti test -vr2 -t1 -k "ndarray or torch" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters