Copy PolyVox libs to build directory; don't try to upload docker image

This commit is contained in:
Simon Walton 2019-11-22 15:17:23 -08:00
parent 9e5c0a7afc
commit 167dfab539
4 changed files with 28 additions and 17 deletions

View file

@ -259,7 +259,7 @@ jobs:
- name: Install python modules
run: pip install awscli boto3 PyGithub
- name: Install apt packages
# libglu1-mesa-dev needed for oven, npm for server-console
# libglu1-mesa-dev needed for oven
run: sudo apt install -y mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
@ -276,12 +276,9 @@ jobs:
shell: bash
working-directory: ${{runner.workspace}}/build
run: docker build -t $DOCKER_IMAGE_NAME -f $GITHUB_WORKSPACE/tools/ci-scripts/linux-gha/Dockerfile ./
- name: Upload Docker image
- name: Export Docker image
shell: bash
env:
# TODO: upload to correct location
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
run: |
docker save -o ${{runner.workspace}}/build/hifi_docker_image.tar $DOCKER_IMAGE_NAME
aws s3 cp ${{runner.workspace}}/build/hifi_docker_image.tar s3://hifi-public/simon/builds/hifi_docker_image.$GIT_PR_COMMIT_SHORT.tar
working-directory: ${{runner.workspace}}/build
run: docker save -o ${{runner.workspace}}/build/hifi_docker_image.tar $DOCKER_IMAGE_NAME

View file

@ -21,6 +21,24 @@ macro(TARGET_POLYVOX)
list(APPEND POLYVOX_LIBRARY_DEBUG ${POLYVOX_UTIL_LIBRARY_DEBUG})
select_library_configurations(POLYVOX)
list(APPEND POLYVOX_INCLUDE_DIRS ${VCPKG_INSTALL_ROOT}/include)
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(_LIB_GLOBS)
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set(_PV_LIBRARIES ${POLYVOX_LIBRARY_DEBUG})
else()
set(_PV_LIBRARIES ${POLYVOX_LIBRARY_RELEASE})
endif()
foreach(_lib ${_PV_LIBRARIES})
list(APPEND _LIB_GLOBS ${_lib}*)
endforeach()
message("_LIB_GLOBS=" ${_LIB_GLOBS})
add_custom_command(
TARGET ${TARGET_NAME}
POST_BUILD
COMMAND cp
ARGS -d ${_LIB_GLOBS} ${CMAKE_BINARY_DIR}
)
endif()
endif()
target_link_libraries(${TARGET_NAME} ${POLYVOX_LIBRARIES})
target_include_directories(${TARGET_NAME} PUBLIC ${POLYVOX_INCLUDE_DIRS})

View file

@ -10,12 +10,4 @@ macro(TARGET_QUAZIP)
find_library(QUAZIP_LIBRARY_DEBUG quazip5 PATHS ${VCPKG_INSTALL_ROOT}/debug/lib NO_DEFAULT_PATH)
select_library_configurations(QUAZIP)
target_link_libraries(${TARGET_NAME} ${QUAZIP_LIBRARIES})
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
add_custom_command(
TARGET ${TARGET_NAME}
POST_BUILD
COMMAND cp
ARGS -d ${QUAZIP_LIBRARIES}* ${CMAKE_BINARY_DIR}
)
endif()
endmacro()

View file

@ -26,6 +26,10 @@ if (WIN32)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/quazip5.dll ${CURRENT_PACKAGES_DIR}/bin/quazip5.dll)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/quazip5d.dll ${CURRENT_PACKAGES_DIR}/debug/bin/quazip5.dll)
elseif(DEFINED VCPKG_TARGET_IS_LINUX)
# We only want static libs.
file(GLOB QUAZIP5_DYNAMIC_LIBS ${CURRENT_PACKAGES_DIR}/lib/libquazip5.so* ${CURRENT_PACKAGES_DIR}/debug/lib/libquazip5d.so*)
file(REMOVE ${QUAZIP5_DYNAMIC_LIBS})
endif()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/quazip RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)