From b88d8059e543e53163cbc190ccd7a49e9325460b Mon Sep 17 00:00:00 2001 From: lancerts Date: Tue, 23 Jan 2024 20:22:58 -0800 Subject: [PATCH] Add a CI job for cpp/dcgan (#1221) --- run_cpp_examples.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/run_cpp_examples.sh b/run_cpp_examples.sh index 8447295937..5dfb07343a 100644 --- a/run_cpp_examples.sh +++ b/run_cpp_examples.sh @@ -94,6 +94,21 @@ function custom-dataset() { exit 1 fi } +function dcgan() { + start + mkdir build + cd build + cmake -DCMAKE_PREFIX_PATH=$LIBTORCH_PATH .. + make + if [ $? -eq 0 ]; then + echo "Successfully built $EXAMPLE" + ./$EXAMPLE # Run the executable + check_run_success $EXAMPLE + else + error "Failed to build $EXAMPLE" + exit 1 + fi +} function mnist() { start @@ -141,6 +156,7 @@ function clean() { function run_all() { autograd custom-dataset + dcgan mnist regression }