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

Conversation

aliddell
Copy link
Member

@aliddell aliddell commented Aug 1, 2024

This PR removes the acquire-driver-zarr submodule, using FetchContent to download and extract driver instead. It also updates acquire-common to the latest main. Finally, it triggers tests on pull_request rather than pull_request_target and removes the automerge job.

@aliddell aliddell requested a review from nclack August 1, 2024 16:01
Comment on lines +65 to 98

# 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()
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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant