Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fixed VCPKG commit on Windows #245

Merged
merged 5 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/build-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ jobs:
if: runner.os == 'Windows'
shell: pwsh
run: |
$CMAKE_TOOLCHAIN_FILE = "${env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
$VCPKG_INSTALLATION_ROOT="${{ github.workspace }}/vcpkg"
echo "VCPKG_INSTALLATION_ROOT=${VCPKG_INSTALLATION_ROOT}" >> "${env:GITHUB_ENV}"
$CMAKE_TOOLCHAIN_FILE = "${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
echo "CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" >> "${env:GITHUB_ENV}"
$VCPKG_TARGET_TRIPLET = "x64-windows"
echo "VCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}" >> "${env:GITHUB_ENV}"
Expand All @@ -78,6 +80,8 @@ jobs:
$CONFIG_SETTINGS = "cmake.define.CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
$CONFIG_SETTINGS = "${CONFIG_SETTINGS} cmake.define.VCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}"
echo "CIBW_CONFIG_SETTINGS_WINDOWS=${CONFIG_SETTINGS}" >> "${env:GITHUB_ENV}"
$CIBW_REPAIR_WHEEL_COMMAND = "delvewheel repair -v --add-path ${VCPKG_INSTALLATION_ROOT}/installed/${VCPKG_TARGET_TRIPLET}/bin -w {dest_dir} {wheel}"
echo "CIBW_REPAIR_WHEEL_COMMAND_WINDOWS=${CIBW_REPAIR_WHEEL_COMMAND}" >> "${env:GITHUB_ENV}"

# vcpkg binary caching
$VCPKG_CACHE_DIR = "${env:COMPILER_CACHE_DIR}/vcpkg"
Expand Down
8 changes: 7 additions & 1 deletion package/install-colmap-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ If (!(Test-Path -path "${COMPILER_TOOLS_DIR}/ccache.exe" -PathType Leaf)) {
Remove-Item -Recurse ${folder_path}
}

cd ${CURRDIR}
git clone https://github.com/microsoft/vcpkg ${env:VCPKG_INSTALLATION_ROOT}
cd ${env:VCPKG_INSTALLATION_ROOT}
git checkout "${env:VCPKG_COMMIT_ID}"
./bootstrap-vcpkg.bat

cd ${CURRDIR}
git clone https://github.com/colmap/colmap.git
cd colmap
Expand All @@ -50,7 +56,7 @@ cmake .. `
-DCGAL_ENABLED="OFF" `
-DGUI_ENABLED="OFF" `
-DCMAKE_TOOLCHAIN_FILE="${env:CMAKE_TOOLCHAIN_FILE}" `
-DVCPKG_TARGET_TRIPLET="x64-windows"
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_TARGET_TRIPLET}"
& ${NINJA_PATH} install

ccache --show-stats --verbose
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test-command = "python -c \"import pycolmap; print(pycolmap.__version__)\""

[tool.cibuildwheel.environment]
COLMAP_COMMIT_ID = "3.9.1"
VCPKG_COMMIT_ID = "a45fe2ce6039339ee7a076ebd3dcee0fa6cc1287"
VCPKG_COMMIT_ID = "fa6e6a6ec3224f1d3697d544edef6272a59cd834"

[tool.cibuildwheel.linux]
before-all = "{project}/package/install-colmap-centos.sh"
Expand All @@ -45,5 +45,3 @@ before-all = "{project}/package/install-colmap-macos.sh"
[tool.cibuildwheel.windows]
before-all = "powershell -File {project}/package/install-colmap-windows.ps1"
before-build = "pip install delvewheel"
# Env variable are not interpolated in the repair command, unsure why.
repair-wheel-command = "delvewheel repair -v --add-path C:/vcpkg/installed/x64-windows/bin -w {dest_dir} {wheel}"
Loading