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

Update submodules and test job #303

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
28 changes: 1 addition & 27 deletions .github/workflows/test_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
pull_request_target:
pull_request:
branches:
- main

Expand Down Expand Up @@ -59,29 +59,3 @@ jobs:
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} -L acquire-driver-egrabber --output-on-failure

merge:
name: Automerge
runs-on: "ubuntu-latest"
needs: test
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Checkout PR
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.PAT }}

# Don't auto-merge major version updates
- name: Merge PR
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.PAT }}
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "acquire-common"]
path = acquire-common
url = ../acquire-common.git
[submodule "tests/acquire-driver-zarr"]
path = tests/acquire-driver-zarr
url = ../acquire-driver-zarr.git
branch = main
2 changes: 1 addition & 1 deletion acquire-common
Submodule acquire-common updated 26 files
+6 −0 CHANGELOG.md
+1 −1 README.md
+6 −0 acquire-core-libs/src/acquire-device-properties/device/props/components.c
+1 −0 acquire-core-libs/src/acquire-device-properties/device/props/components.h
+91 −27 acquire-core-libs/src/acquire-device-properties/device/props/storage.c
+38 −15 acquire-core-libs/src/acquire-device-properties/device/props/storage.h
+2 −0 acquire-core-libs/tests/unit-tests.cpp
+85 −36 acquire-driver-common/src/simcams/simulated.camera.c
+16 −5 acquire-driver-common/src/storage/raw.c
+26 −6 acquire-driver-common/src/storage/side-by-side-tiff.cpp
+11 −5 acquire-driver-common/src/storage/tiff.cpp
+1 −0 acquire-driver-common/tests/devkit/storage-get-meta.cpp
+2 −0 acquire-driver-common/tests/integration/CMakeLists.txt
+1 −0 acquire-driver-common/tests/integration/abort-while-waiting-for-trigger.cpp
+233 −0 acquire-driver-common/tests/integration/can-set-with-file-uri.cpp
+202 −0 acquire-driver-common/tests/integration/simcam-will-not-stall.cpp
+7 −7 acquire-driver-common/tests/integration/switch-storage-identifier.cpp
+3 −2 acquire-driver-common/tests/integration/write-side-by-side-tiff.cpp
+3 −3 acquire-video-runtime/src/acquire.c
+4 −7 acquire-video-runtime/src/runtime/filter.c
+4 −8 acquire-video-runtime/src/runtime/source.c
+2 −0 acquire-video-runtime/tests/CMakeLists.txt
+190 −0 acquire-video-runtime/tests/aligned-videoframe-pointers.cpp
+1 −1 acquire-video-runtime/tests/change-file-name.cpp
+43 −11 acquire-video-runtime/tests/one-video-stream.cpp
+115 −0 acquire-video-runtime/tests/repeat-start-no-monitor.cpp
35 changes: 33 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ else()
set(NOTEST "TRUE")
add_subdirectory(../acquire-common/acquire-driver-common ${CMAKE_CURRENT_BINARY_DIR}/acquire-driver-common)
add_subdirectory(../acquire-common/acquire-video-runtime ${CMAKE_CURRENT_BINARY_DIR}/acquire-video-runtime)
aq_require(acquire-driver-zarr)
set(NOTEST "FALSE")

#
Expand Down Expand Up @@ -50,7 +49,6 @@ else()
foreach(driver
acquire-driver-common
acquire-driver-egrabber
acquire-driver-zarr
)
add_custom_target(${project}-copy-${driver}-for-tests
COMMAND ${CMAKE_COMMAND} -E copy
Expand All @@ -64,4 +62,37 @@ else()
add_dependencies(${tgt} ${project}-copy-${driver}-for-tests)
endforeach()
endforeach()

# download the acquire-driver-zarr shared library to the tests directory
include(FetchContent)

set(ZARR_RELEASE_URL "https://github.com/acquire-project/acquire-driver-zarr/releases/download")
set(ZARR_VERSION "0.1.12")

if (WIN32)
set(ZARR_DRIVER_SUFFIX "win64")
elseif (APPLE)
set(ZARR_DRIVER_SUFFIX "Darwin")
elseif (UNIX)
set(ZARR_DRIVER_SUFFIX "Linux")
endif ()

FetchContent_Declare(
acquire_driver_zarr
URL "${ZARR_RELEASE_URL}/v${ZARR_VERSION}/acquire-driver-zarr-v${ZARR_VERSION}-${ZARR_DRIVER_SUFFIX}.zip"
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)

FetchContent_MakeAvailable(acquire_driver_zarr)
set(ZARR_DRIVER_PATH ${acquire_driver_zarr_SOURCE_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}acquire-driver-zarr${CMAKE_SHARED_LIBRARY_SUFFIX})

add_custom_target(copy_zarr_driver
COMMAND ${CMAKE_COMMAND} -E copy
${ZARR_DRIVER_PATH}
$<TARGET_FILE_DIR:${project}-${onename}>
DEPENDS ${ZARR_DRIVER_PATH}
COMMENT "Copying acquire-driver-zarr to $<TARGET_FILE_DIR:${project}-${onename}>"
)

add_dependencies(${tgt} copy_zarr_driver)
endif()
Comment on lines +65 to 98
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm of two minds here. We have tests that use the Zarr driver, and we can keep doing that, or we can just use trash storage instead. What do you think @nclack?

1 change: 0 additions & 1 deletion tests/acquire-driver-zarr
Submodule acquire-driver-zarr deleted from e6abd8
Loading