Skip to content

Commit

Permalink
Enable vcpkg by default. (#4348)
Browse files Browse the repository at this point in the history
[SC-33867](https://app.shortcut.com/tiledb-inc/story/33867/enable-vcpkg-by-default)

Now that all of our dependencies can be imported with vcpkg, this PR changes the default value of the `TILEDB_VCPKG` option to `ON`, letting downstream consumers automatically take advantage of vcpkg's features like its dependency binary cachine.

The bootstrap scripts were modified to add an option to disable vcpkg. Also CI scripts were modified to remove explicit enablements of vcpkg.

---
TYPE: BUILD
DESC: Manage dependencies with vcpkg by default.
  • Loading branch information
teo-tsirpanis authored Sep 15, 2023
1 parent b5b45b3 commit 1dd7675
Show file tree
Hide file tree
Showing 41 changed files with 1,056 additions and 54 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build-rtools40.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,19 @@ jobs:
makepkg-mingw --noconfirm --syncdeps
env:
TILEDB_HOME: ${{ github.workspace }}
MINGW_INSTALLS: ${{ matrix.msystem }}
MINGW_ARCH: ${{ matrix.msystem }}
shell: c:\rtools40\usr\bin\bash.exe --login {0}
- name: "Upload binaries"
uses: actions/upload-artifact@v3
with:
name: mingw-w64-${{ matrix.msystem }}-tiledb
path: .github/workflows/mingw-w64-tiledb/*.pkg.tar.*
- name: "Print log files (failed build only)"
shell: bash
run: |
source $GITHUB_WORKSPACE/scripts/ci/print_logs.sh
echo "# ------------------------------------"
find $BUILD_BUILDDIRECTORY/dist
echo "# --------vcpkg----------------------------"
find $BUILD_BUILDDIRECTORY/vcpkg_installed
if: failure() # only run this job if the build step failed
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
TILEDB_SERIALIZATION: OFF
TILEDB_STATIC: OFF
TILEDB_TOOLS: ON
TILEDB_BASE_BOOTSTRAP_OPTIONS: '-EnableVcpkg -EnableVerbose -EnableStaticTileDB'
TILEDB_BASE_BOOTSTRAP_OPTIONS: '-EnableVerbose -EnableStaticTileDB'

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-linux_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ env:
TILEDB_CI_OS: runner.os
CXX: ${{ inputs.matrix_compiler_cxx }}
CC: ${{ inputs.matrix_compiler_cc }}
bootstrap_args: "--enable-vcpkg --enable-ccache ${{ inputs.bootstrap_args }} ${{ inputs.asan && '--enable-sanitizer=address' || '' }}"
bootstrap_args: "--enable-ccache ${{ inputs.bootstrap_args }} ${{ inputs.asan && '--enable-sanitizer=address' || '' }}"
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
SCCACHE_GHA_ENABLED: "true"

Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/mingw-w64-tiledb/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ license=("MIT")
depends=("${MINGW_PACKAGE_PREFIX}-lz4"
"${MINGW_PACKAGE_PREFIX}-aws-sdk-cpp"
"${MINGW_PACKAGE_PREFIX}-bzip2"
"${MINGW_PACKAGE_PREFIX}-curl"
"${MINGW_PACKAGE_PREFIX}-zlib"
"${MINGW_PACKAGE_PREFIX}-zstd"
)
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-curl")
"${MINGW_PACKAGE_PREFIX}-gcc")
options=("staticlibs" "strip")
source_dir="$TILEDB_HOME"

Expand All @@ -26,6 +26,9 @@ build() {
if [ "$CARCH" == "i686" ]; then
export CFLAGS="-mfpmath=sse -msse2"
export CXXFLAGS="-mfpmath=sse -msse2"
vcpkg_triplet="x86-mingw-static"
else
vcpkg_triplet="x64-mingw-static"
fi


Expand All @@ -40,6 +43,8 @@ build() {
-DCOMPILER_SUPPORTS_AVX2=OFF \
-DTILEDB_SKIP_S3AWSSDK_DIR_LENGTH_CHECK=ON \
-DTILEDB_WERROR=OFF \
-DVCPKG_OVERLAY_PORTS=../.github/workflows/mingw-w64-tiledb/system-ports \
-DVCPKG_TARGET_TRIPLET=${vcpkg_triplet} \
..
make
make -C tiledb
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
Loading

0 comments on commit 1dd7675

Please sign in to comment.