Skip to content

Commit

Permalink
[aot] Enable aot tutorial demo in CI (taichi-dev#6543)
Browse files Browse the repository at this point in the history
Issue: #

### Brief Summary

This PR aims to add tutorial demos in CI. Will refactor the testing
logic in a shell script in taichi-aot-demo and send a followup PR to
switch as suggested by @jim19930609
  • Loading branch information
ailzhang authored Nov 9, 2022
1 parent 908c053 commit 942a509
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/scripts/aot-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,34 @@ function build-and-test-headless-demo {
# clear temporary test folder
adb shell "rm -rf /data/local/tmp/*"

cd headless
pushd headless
BINARIES=$(ls E*)
for b in $BINARIES; do
adb push $b /data/local/tmp
done
popd # headless
adb push $TAICHI_C_API_INSTALL_DIR/lib/libtaichi_c_api.so /data/local/tmp

pushd 0_tutorial_cgraph
adb push E0_tutorial_cgraph /data/local/tmp
popd # 0_tutorial_cgraph

pushd 0_tutorial_kernel
adb push E0_tutorial_kernel /data/local/tmp
popd # 0_tutorial_kernel

popd # build

for dir in ?_*; do
adb push $dir /data/local/tmp
done

# Run 0_tutorial_cgraph
adb shell "cd /data/local/tmp && LD_LIBRARY_PATH=\$(pwd) ./E0_tutorial_cgraph"
# Run 0_tutorial_kernel
adb shell "cd /data/local/tmp && LD_LIBRARY_PATH=\$(pwd) ./E0_tutorial_kernel"

# Run demos with headless-truth
for b in $BINARIES; do
adb shell "cd /data/local/tmp && LD_LIBRARY_PATH=\$(pwd) ./$b"
adb pull /data/local/tmp/0001.bmp $b.bmp
Expand Down

0 comments on commit 942a509

Please sign in to comment.