Skip to content

Commit

Permalink
symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Aug 13, 2024
1 parent cb089b1 commit c85d57d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .docker/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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-* ]] && \
Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c85d57d

Please sign in to comment.