Skip to content

Conversation

@ktsitsi
Copy link
Collaborator

@ktsitsi ktsitsi commented Nov 13, 2025

Issue and/or context:

  • Combining the vcpkg + scikit-core-build + cibuildwheel build system

Changes:

  • Build System Migration - pyproject.toml and CMakeLists.txt updates
  • vcpkg Integration
  • incorporate with cibuildwheel. Fixes to python-packaging.yml, python-remote-storage.yml, and ci-r-python-interop.yml
  • Version Management - Simplified setuptools_scm configuration

Notes for Reviewer:

@ktsitsi ktsitsi force-pushed the kt/scikit-core-build-vcpkg-integration branch 11 times, most recently from eb1a067 to 305d935 Compare November 13, 2025 21:11
@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.84%. Comparing base (dc42c79) to head (4c845ed).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4310      +/-   ##
==========================================
- Coverage   89.23%   86.84%   -2.39%     
==========================================
  Files          62      137      +75     
  Lines        7087    20706   +13619     
  Branches        0       15      +15     
==========================================
+ Hits         6324    17982   +11658     
- Misses        763     2724    +1961     
Flag Coverage Δ
python 89.20% <ø> (-0.03%) ⬇️
r 85.61% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
python_api 89.20% <ø> (-0.03%) ⬇️
libtiledbsoma 77.24% <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ktsitsi ktsitsi force-pushed the kt/scikit-core-build-vcpkg-integration branch 18 times, most recently from 375513b to ac8bca5 Compare November 18, 2025 05:59
@ktsitsi ktsitsi force-pushed the kt/scikit-core-build-vcpkg-integration branch from d973812 to 1d2e1f0 Compare November 18, 2025 19:10
Copy link
Collaborator

@jp-dark jp-dark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! I have a couple small initial comments while I continue to experiment locally and dig into all the changes

@ktsitsi ktsitsi force-pushed the kt/scikit-core-build-vcpkg-integration branch from b916f6d to f1370f3 Compare November 21, 2025 16:11
@ktsitsi ktsitsi force-pushed the kt/scikit-core-build-vcpkg-integration branch from f1370f3 to 4c845ed Compare November 21, 2025 16:18
Copy link
Member

@teo-tsirpanis teo-tsirpanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can simplify the vcpkg integration and tiledbsoma's build system by eliminating the superbuild and following the Core's approaches.

Comment on lines +43 to +50
# Bootstrap vcpkg if needed
if [ ! -f "${VCPKG_ROOT}/vcpkg" ] && [ ! -f "${VCPKG_ROOT}/vcpkg.exe" ]; then
echo "Bootstrapping vcpkg..."
"${VCPKG_ROOT}/bootstrap-vcpkg.sh" || {
echo "Error: Failed to bootstrap vcpkg"
exit 1
}
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vcpkg will do this by itself if needed.

Comment on lines +52 to +56
# Copy custom triplets if they exist in the Python package
if [ -d "${PYTHON_DIR}/vcpkg_triplets" ] && [ -d "${VCPKG_ROOT}/triplets" ]; then
echo "Installing custom vcpkg triplets..."
cp -f "${PYTHON_DIR}/vcpkg_triplets/"*-release.cmake "${VCPKG_ROOT}/triplets/" 2>/dev/null || true
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can set VCPKG_OVERLAY_TRIPLETS when configuring. Modifying the vcpkg directory is not a good idea in general.

@@ -0,0 +1,332 @@
cmake_minimum_required(VERSION 3.21)
cmake_policy(SET CMP0148 NEW)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the policy need to be set to NEW? It doesn't change anything if we don't use a deprecated find module, does it?

Comment on lines +4 to +14
# Set macOS architecture before project() to avoid vcpkg warnings
if(APPLE AND NOT DEFINED CMAKE_OSX_ARCHITECTURES)
# Detect system architecture
execute_process(
COMMAND uname -m
OUTPUT_VARIABLE DETECTED_ARCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(CMAKE_OSX_ARCHITECTURES "${DETECTED_ARCH}" CACHE STRING "macOS architecture")
message(STATUS "Auto-detected macOS architecture: ${CMAKE_OSX_ARCHITECTURES}")
endif()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be done automatically; what warnings does vcpkg emit?

Comment on lines +62 to +104
- name: Create custom vcpkg triplets for release builds
run: |
mkdir -p vcpkg_triplets
# x64-linux-release
cat > vcpkg_triplets/x64-linux-release.cmake << 'EOF'
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
EOF
# arm64-linux-release
cat > vcpkg_triplets/arm64-linux-release.cmake << 'EOF'
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
EOF
# x64-osx-release
cat > vcpkg_triplets/x64-osx-release.cmake << 'EOF'
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)
set(VCPKG_OSX_DEPLOYMENT_TARGET "13.0")
EOF
# arm64-osx-release
cat > vcpkg_triplets/arm64-osx-release.cmake << 'EOF'
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES arm64)
set(VCPKG_OSX_DEPLOYMENT_TARGET "13.0")
EOF
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it? We already have triplet files checked in, and they are better being placed there.

Comment on lines +63 to +67
- name: Checkout vcpkg
uses: actions/checkout@v4
with:
repository: microsoft/vcpkg
path: vcpkg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better let CMake clone vcpkg, per my other comments.

- name: Bootstrap vcpkg
run: |
if [ ! -d vcpkg ]; then
git clone --depth 1 https://github.com/microsoft/vcpkg.git vcpkg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better let CMake clone vcpkg, per my other comments.

Comment on lines +265 to +266
CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON

We already set the C++ version globally in lines 19-20.

Comment on lines +161 to +164
# Install system dependencies required by vcpkg (runs once per container)
before-all = [
"yum install -y zip unzip tar curl ninja-build perl-IPC-Cmd autoconf automake libtool pkg-config",
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something the user (or CI) should do explicitly. Besides the side-effects of a system-wide operation, it might require root.

@ktsitsi
Copy link
Collaborator Author

ktsitsi commented Nov 21, 2025

Thank you @teo-tsirpanis for your comments!

jp-dark added a commit that referenced this pull request Dec 1, 2025
Copying data from [PR #4310](#4310)

Co-Authored-By: Konstantinos Tsitsimpikos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants