From c85d57d81f30a584ef7477670050ccda928c2132 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Tue, 13 Aug 2024 14:22:34 +0200 Subject: [PATCH] symlink --- .docker/build-linux.sh | 2 -- CMakeLists.txt | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.docker/build-linux.sh b/.docker/build-linux.sh index d37b57f19..3e879c7de 100755 --- a/.docker/build-linux.sh +++ b/.docker/build-linux.sh @@ -304,8 +304,6 @@ else elif [[ "-$BUILD_TYPE-" == *-source-* ]]; then $BUILD_TOOL package_source $BUILD_TOOL copy_source_artifacts - mkdir -p /artifacts/cache - cp dwarfs-*.tar.zst /artifacts/cache/dwarfs-source-${GITHUB_RUN_NUMBER}.tar.zst fi if [[ "-$BUILD_TYPE-" != *-[at]san-* ]] && \ diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c8c79216..f88bf3e53 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -855,9 +855,14 @@ if(DEFINED ENV{GITHUB_REF_TYPE}) set(PACKAGE_EXT ".tar.zst") endif() + set(SOURCE_TARBALL "${CMAKE_PROJECT_NAME}-${PRJ_VERSION_FULL}${PACKAGE_EXT}") + add_custom_target(copy_source_artifacts COMMAND ${CMAKE_COMMAND} -E make_directory ${ARTIFACTS_FULL_PATH} - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${PRJ_VERSION_FULL}${PACKAGE_EXT} ${ARTIFACTS_FULL_PATH} + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_TARBALL} ${ARTIFACTS_FULL_PATH} + COMMAND ${CMAKE_COMMAND} -E make_directory ${DWARFS_ARTIFACTS_DIR}/cache + COMMAND ${CMAKE_COMMAND} -E create_symlink ../${ARTIFACTS_SUBDIR}/${SOURCE_TARBALL} + ${DWARFS_ARTIFACTS_DIR}/cache/dwarfs-source-$ENV{GITHUB_RUN_NUMBER}${PACKAGE_EXT} ) if(STATIC_BUILD_DO_NOT_USE OR WIN32)