Skip to content

Instantly share code, notes, and snippets.

@dreiss
Created October 31, 2019 19:34
Show Gist options
  • Save dreiss/7c30ea0fc836d607ff899d9e3927466e to your computer and use it in GitHub Desktop.
Save dreiss/7c30ea0fc836d607ff899d9e3927466e to your computer and use it in GitHub Desktop.
#!/bin/sh
set -x
set -e
PT_JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.fc30.x86_64
PT_LIBTORCH_HOME=$HOME/opt/libtorch
NUM_COMPILE_THREADS=8
cd android/pytorch_android/host
cmake -S .. -B build-cmake -DJAVA_HOME=$PT_JAVA_HOME -DLIBTORCH_HOME=$PT_LIBTORCH_HOME
cmake --build build-cmake -j $NUM_COMPILE_THREADS
TEST_LD_LIBRARY_PATH=$PWD/build-cmake:$PWD/build-cmake/fbjni/host
env LD_LIBRARY_PATH=$TEST_LD_LIBRARY_PATH gradle -PbuildDir=build-gradle test
gradle -PbuildDir=build-gradle assemble
for report_file in build-gradle/reports/tests/test/index.html build-gradle/reports/tests/test/classes/* ; do
elinks -dump "$report_file"
echo
echo
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment