split common files into their own depot

develop
Myk Taylor 2023-07-28 19:12:58 -07:00
parent c67e0da250
commit a27f42d67d
No known key found for this signature in database
2 changed files with 43 additions and 17 deletions

@ -69,7 +69,21 @@ jobs:
id: env_setup id: env_setup
run: | run: |
echo "CCACHE_DIR=${HOME}/.ccache" >> $GITHUB_ENV echo "CCACHE_DIR=${HOME}/.ccache" >> $GITHUB_ENV
- name: Configure DFHack - name: Configure DFHack (common files)
run: |
cmake \
-S . \
-B build \
-G Ninja \
-DDFHACK_BUILD_ARCH=64 \
-DBUILD_LIBRARY:BOOL=0 \
-DBUILD_BINARIES:BOOL=0 \
-DBUILD_DOCS:BOOL=1 \
-DCMAKE_INSTALL_PREFIX=build/common-output
- name: Build DFHack (common files)
run: |
ninja -C build install
- name: Configure DFHack (linux build)
env: env:
CC: gcc-10 CC: gcc-10
CXX: g++-10 CXX: g++-10
@ -83,9 +97,13 @@ jobs:
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DBUILD_DFLAUNCH:BOOL=1 \ -DBUILD_DFLAUNCH:BOOL=1 \
-DBUILD_DOCS:BOOL=1 \ -DBUILD_LIBRARY:BOOL=1 \
-DCMAKE_INSTALL_PREFIX=build/output -DBUILD_BINARIES:BOOL=1 \
- name: Build DFHack -DBUILD_DOCS:BOOL=0 \
-DINSTALL_SCRIPTS:BOOL=0 \
-DINSTALL_DATA_FILES:BOOL=0 \
-DCMAKE_INSTALL_PREFIX=build/linux-output
- name: Build DFHack (linux build)
run: | run: |
ninja -C build install ninja -C build install
ccache --max-size 50M ccache --max-size 50M
@ -93,7 +111,7 @@ jobs:
ccache --show-stats ccache --show-stats
- name: Cross-compile win64 artifacts - name: Cross-compile win64 artifacts
env: env:
CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1' CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1 -DBUILD_DOCS:BOOL=0 -DINSTALL_SCRIPTS:BOOL=0 -DINSTALL_DATA_FILES:BOOL=0'
steam_username: ${{ secrets.STEAM_SDK_USERNAME }} steam_username: ${{ secrets.STEAM_SDK_USERNAME }}
steam_password: ${{ secrets.STEAM_SDK_PASSWORD }} steam_password: ${{ secrets.STEAM_SDK_PASSWORD }}
run: | run: |
@ -115,6 +133,7 @@ jobs:
appId: 2346660 appId: 2346660
buildDescription: ${{ github.event.inputs.version }} buildDescription: ${{ github.event.inputs.version }}
rootPath: build rootPath: build
depot1Path: win64-cross/output depot1Path: common-output
depot2Path: output depot2Path: win64-cross/output
depot3Path: linux-output
releaseBranch: ${{ github.event.inputs.release_channel }} releaseBranch: ${{ github.event.inputs.release_channel }}

@ -210,17 +210,16 @@ set(DFHACK_BINARY_DESTINATION .)
set(DFHACK_PLUGIN_DESTINATION ${DFHACK_DATA_DESTINATION}/plugins) set(DFHACK_PLUGIN_DESTINATION ${DFHACK_DATA_DESTINATION}/plugins)
# dfhack lua files go here: # dfhack lua files go here:
set(DFHACK_LUA_DESTINATION ${DFHACK_DATA_DESTINATION}/lua) set(DFHACK_LUA_DESTINATION ${DFHACK_DATA_DESTINATION}/lua)
# the windows .lib file goes here:
set(DFHACK_DEVLIB_DESTINATION ${DFHACK_DATA_DESTINATION})
# user documentation goes here: # user documentation goes here:
set(DFHACK_USERDOC_DESTINATION ${DFHACK_DATA_DESTINATION}) set(DFHACK_USERDOC_DESTINATION ${DFHACK_DATA_DESTINATION})
# developer documentation goes here:
set(DFHACK_DEVDOC_DESTINATION ${DFHACK_DATA_DESTINATION})
# some options for the user/developer to play with # some options for the user/developer to play with
option(BUILD_LIBRARY "Build the DFHack library." ON) option(BUILD_LIBRARY "Build the DFHack library." ON)
option(BUILD_PLUGINS "Build the DFHack plugins." ON) option(BUILD_PLUGINS "Build the DFHack plugins." ON)
option(BUILD_BINARIES "Build the DFHack binary tools." ON)
option(INSTALL_SCRIPTS "Install DFHack scripts." ON)
option(INSTALL_DATA_FILES "Install DFHack common data files." ON)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
if(UNIX) if(UNIX)
@ -387,11 +386,14 @@ include_directories(depends/lodepng)
include_directories(depends/tthread) include_directories(depends/tthread)
include_directories(depends/clsocket/src) include_directories(depends/clsocket/src)
include_directories(depends/xlsxio/include) include_directories(depends/xlsxio/include)
add_subdirectory(depends)
if(BUILD_LIBRARY)
add_subdirectory(depends)
endif()
# Testing with CTest # Testing with CTest
macro(dfhack_test name files) macro(dfhack_test name files)
if(UNIX AND NOT APPLE) # remove this once our MSVC build env has been updated if(BUILD_LIBRARY AND UNIX AND NOT APPLE) # remove this once our MSVC build env has been updated
add_executable(${name} ${files}) add_executable(${name} ${files})
target_include_directories(${name} PUBLIC depends/googletest/googletest/include) target_include_directories(${name} PUBLIC depends/googletest/googletest/include)
target_link_libraries(${name} dfhack gtest) target_link_libraries(${name} dfhack gtest)
@ -416,12 +418,17 @@ file(WRITE "${CMAKE_BINARY_DIR}/dfhack_setarch.txt" ${DFHACK_SETARCH})
install(FILES "${CMAKE_BINARY_DIR}/dfhack_setarch.txt" DESTINATION "${DFHACK_DATA_DESTINATION}") install(FILES "${CMAKE_BINARY_DIR}/dfhack_setarch.txt" DESTINATION "${DFHACK_DATA_DESTINATION}")
# build the plugins # build the plugins
if(BUILD_PLUGINS) if(BUILD_LIBRARY AND BUILD_PLUGINS)
add_subdirectory(plugins) add_subdirectory(plugins)
endif() endif()
add_subdirectory(data) if(INSTALL_DATA_FILES)
add_subdirectory(scripts) add_subdirectory(data)
endif()
if(INSTALL_SCRIPTS)
add_subdirectory(scripts)
endif()
if(BUILD_DOCS) if(BUILD_DOCS)
find_package(Python3) find_package(Python3)
@ -582,7 +589,7 @@ endif()
set(DFHACK_BUILD_ARCH_PREV "${DFHACK_BUILD_ARCH}" CACHE STRING "Previous build architecture" FORCE) set(DFHACK_BUILD_ARCH_PREV "${DFHACK_BUILD_ARCH}" CACHE STRING "Previous build architecture" FORCE)
option(BUILD_SIZECHECK "Build the sizecheck library, for research" OFF) option(BUILD_SIZECHECK "Build the sizecheck library, for research" OFF)
if(BUILD_SIZECHECK) if(BUILD_LIBRARY AND BUILD_SIZECHECK)
add_subdirectory(depends/sizecheck) add_subdirectory(depends/sizecheck)
add_dependencies(dfhack sizecheck) add_dependencies(dfhack sizecheck)
endif() endif()