Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Add more release tests #5839

Merged
merged 1 commit into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/scripts/unix_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ setup_python
python3 -m pip install dist/*.whl
if [ -z "$GPU_TEST" ]; then
python3 -m pip install -r requirements_test.txt
python3 -m pip install "torch; python_version < '3.10'"
python3 -m pip install "torch>1.12.0; python_version < '3.10'"
# Paddle's develop package doesn't support CI's MACOS machine at present
if [[ $OSTYPE == "linux-"* ]]; then
python3 -m pip install "paddlepaddle==2.3.0; python_version < '3.10'"
Expand Down Expand Up @@ -47,17 +47,32 @@ echo "wanted archs: $TI_WANTED_ARCHS"
if [ "$TI_RUN_RELEASE_TESTS" == "1" -a -z "$TI_LITE_TEST" ]; then
python3 -m pip install PyYAML
git clone https://github.com/taichi-dev/taichi-release-tests
pushd taichi-release-tests
git checkout v1.1.0
mkdir -p repos/taichi/python/taichi
EXAMPLES=$(cat <<EOF | python3 | tail -n 1
import taichi.examples
print(taichi.examples.__path__[0])
EOF
)
ln -sf $EXAMPLES repos/taichi/python/taichi/examples
ln -sf taichi-release-tests/truths truths
python3 taichi-release-tests/run.py --log=DEBUG --runners 1 taichi-release-tests/timelines
fi
pushd repos
git clone --depth=1 https://github.com/taichi-dev/quantaichi
git clone --depth=1 https://github.com/taichi-dev/difftaichi
popd

pushd repos/difftaichi
if [ "$(uname -s):$(uname -m)" == "Darwin:arm64" ]; then
# No FORTRAN compiler is currently working reliably on M1 Macs
# We can't just pip install scipy, using conda instead
conda install -y scipy
fi
pip install -r requirements.txt
popd

python3 run.py --log=DEBUG --runners 1 timelines
popd
fi

if [ -z "$TI_SKIP_CPP_TESTS" ]; then
python3 tests/run_tests.py --cpp
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/scripts/win_test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,21 @@ if ("$env:TI_WANTED_ARCHS".Contains("vulkan")) {
Invoke python tests/run_tests.py -vr2 -t1 -k "torch" -a "$env:TI_WANTED_ARCHS"

if ("$env:TI_RUN_RELEASE_TESTS" -eq "1" -and -not "$env:TI_LITE_TEST") {
echo "Running release tests"
Info "Running release tests"
# release tests
Invoke pip install PyYAML
Invoke git clone https://github.com/taichi-dev/taichi-release-tests
Push-Location taichi-release-tests
Invoke git checkout v1.1.0
mkdir -p repos/taichi/python/taichi
$EXAMPLES = & python -c 'import taichi.examples as e; print(e.__path__._path[0])' | Select-Object -Last 1
New-Item -Target $EXAMPLES -Path repos/taichi/python/taichi/examples -ItemType Junction
New-Item -Target taichi-release-tests/truths -Path truths -ItemType Junction
Invoke python taichi-release-tests/run.py --log=DEBUG --runners 1 taichi-release-tests/timelines
Push-Location repos
Invoke git clone --depth=1 https://github.com/taichi-dev/quantaichi
Invoke git clone --depth=1 https://github.com/taichi-dev/difftaichi
Pop-Location
Push-Location repos/difftaichi
Invoke pip install -r requirements.txt
Pop-Location
Invoke python run.py --log=DEBUG --runners 1 timelines
Pop-Location
}
20 changes: 18 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ jobs:
env:
PY: py38
TI_WANTED_ARCHS: 'cuda,vulkan,opengl'
TI_DEVICE_MEMORY_GB: '0.7'
TI_DEVICE_MEMORY_GB: '1'
TI_RUN_RELEASE_TESTS: '1'

- name: Save wheel if test failed
Expand All @@ -405,6 +405,14 @@ jobs:
path: dist/*
retention-days: 7

- name: Save Bad Captures
if: failure() && steps.test.conclusion == 'failure'
uses: actions/upload-artifact@v3
with:
name: bad-captures
path: taichi-release-tests/bad-compare/*
retention-days: 7

build_and_test_windows:
name: Build and Test Windows
needs: check_files
Expand Down Expand Up @@ -456,7 +464,7 @@ jobs:
PY: "3.7"
TI_WANTED_ARCHS: ${{ matrix.archs }}
TI_SKIP_VERSION_CHECK: ON
TI_DEVICE_MEMORY_GB: '0.7'
TI_DEVICE_MEMORY_GB: '1'
TI_RUN_RELEASE_TESTS: '1'

- name: Save wheel if test failed
Expand Down Expand Up @@ -524,6 +532,14 @@ jobs:
path: dist/*
retention-days: 7

- name: Save Bad Captures
if: failure() && steps.test.conclusion == 'failure'
uses: actions/upload-artifact@v3
with:
name: bad-captures
path: taichi-release-tests/bad-compare/*
retention-days: 7

build_android_demos:
name: Build Android Demos
# Skip this job when testing the offline cache
Expand Down