Skip to content

Commit

Permalink
Enable caching for CentOS
Browse files Browse the repository at this point in the history
  • Loading branch information
sarlinpe committed Jan 8, 2024
1 parent d8a65b1 commit bd20dbd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ jobs:
CONFIG_SETTINGS="${CONFIG_SETTINGS} cmake.define.VCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}"
echo "CIBW_CONFIG_SETTINGS_LINUX=${CONFIG_SETTINGS}" >> "$GITHUB_ENV"
CIBW_ENVIRONMENT_PASS_LINUX="VCPKG_TARGET_TRIPLET VCPKG_INSTALLATION_ROOT CMAKE_TOOLCHAIN_FILE"
# vcpkg binary caching
VCPKG_CACHE_DIR="${COMPILER_CACHE_DIR}/vcpkg"
VCPKG_BINARY_SOURCES="clear;files,${VCPKG_CACHE_DIR},readwrite"
echo "VCPKG_BINARY_SOURCES=${VCPKG_BINARY_SOURCES}" >> "$GITHUB_ENV"
CIBW_ENVIRONMENT_PASS_LINUX="VCPKG_TARGET_TRIPLET VCPKG_INSTALLATION_ROOT CMAKE_TOOLCHAIN_FILE VCPKG_BINARY_SOURCES"
echo "CIBW_ENVIRONMENT_PASS_LINUX=${CIBW_ENVIRONMENT_PASS_LINUX}" >> "$GITHUB_ENV"
- name: Build wheels
uses: pypa/[email protected]
Expand Down
6 changes: 5 additions & 1 deletion package/install-colmap-centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e -x
uname -a
CURRDIR=$(pwd)

yum install -y gcc gcc-c++ ninja-build curl zip unzip tar
yum install -y gcc gcc-c++ ninja-build curl zip unzip tar ccache

git clone --branch sarlinpe/libraw-jaspter-nodefaults https://github.com/sarlinpe/vcpkg ${VCPKG_INSTALLATION_ROOT}
cd ${VCPKG_INSTALLATION_ROOT}
Expand Down Expand Up @@ -45,3 +45,7 @@ CXXFLAGS="-fPIC" CFLAGS="-fPIC" cmake .. -GNinja \
-DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-ldl"
ninja install

ccache --show-stats --verbose
ccache --evict-older-than 1d
ccache --show-stats --verbose

0 comments on commit bd20dbd

Please sign in to comment.