From cb1fe4d875a2d10fc244f0b38adbe0db3d7e1274 Mon Sep 17 00:00:00 2001 From: marcojob <44396071+marcojob@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:43:03 +0100 Subject: [PATCH] ci: Fix onnx location --- .github/workflows/ci.yml | 5 +---- test/test_depth_anything_v2.cpp | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d328c769..e33f4433 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,14 +23,11 @@ jobs: env: ONNX_FILE_URL: ${{ secrets.DEPTH_ANYTHING_V2_VITS_LINK }} run: | - # Create directory if it doesn't exist - mkdir -p tests/resources - # Extract Google Drive file ID from URL FILE_ID=$(echo "$ONNX_FILE_URL" | sed -E 's|.*?/d/([^/]+).*|\1|') # Download the file using Google Drive link and file ID - curl -L -o tests/resources/model.onnx "https://drive.google.com/uc?export=download&id=${FILE_ID}" + curl -L -o $GITHUB_WORKSPACE/test/resources/depth_anything_v2_vits.onnx "https://drive.google.com/uc?export=download&id=${FILE_ID}" - name: Run ${{ matrix.ci_script }} run: | diff --git a/test/test_depth_anything_v2.cpp b/test/test_depth_anything_v2.cpp index b0a48ac0..d2a0fdda 100644 --- a/test/test_depth_anything_v2.cpp +++ b/test/test_depth_anything_v2.cpp @@ -16,8 +16,8 @@ class DepthAnythingV2Test : public DepthAnythingV2 { class TestDepthAnythingV2 : public ::testing::Test { protected: - const std::string model_path = "/workspaces/v4l2_camera/test/resources/depth_anything_v2_vits.onnx"; - const std::string test_image_path = "/workspaces/v4l2_camera/test/resources/maschinenhalle_example_frame.jpg"; + const std::string model_path = "../test/resources/depth_anything_v2_vits.onnx"; + const std::string test_image_path = "../test/resources/maschinenhalle_example_frame.jpg"; cv_bridge::CvImage cv_image; cv::Mat img;