From 47cf3fe994562254d5811f6eae09f00fa04a6c71 Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Thu, 14 Sep 2023 15:53:35 +0300 Subject: [PATCH 1/6] Stop passing `TILEDB_FORCE_BUILD_DEPS` during release. Combining this option with enabling vcpkg causes the dependencies to build with both vcpkg and ExternalProjects. Disabling it causes only vcpkg to be used, which builds everything either way. --- azure-pipelines.yml | 1 - scripts/azure-windows-release.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a3dfff4b34c..8f9d6a271f8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -52,7 +52,6 @@ stages: TILEDB_HDFS: ON TILEDB_STATIC: OFF TILEDB_SERIALIZATION: ON - TILEDB_FORCE_BUILD_DEPS: ON MACOSX_DEPLOYMENT_TARGET: 10.14 SUDO: 'sudo' jobs: diff --git a/scripts/azure-windows-release.yml b/scripts/azure-windows-release.yml index c9f31995b67..98bae098257 100644 --- a/scripts/azure-windows-release.yml +++ b/scripts/azure-windows-release.yml @@ -24,7 +24,7 @@ steps: $host.SetShouldExit(3) } - $bootstrapOptions = "-EnableVerbose -EnableStaticTileDB -EnableBuildDeps" + $bootstrapOptions = "-EnableVerbose -EnableStaticTileDB" if ($env:TILEDB_S3 -eq "ON") { $bootstrapOptions = "-EnableS3 " + $bootstrapOptions } From f598f547cdb44babf48f800afc479bb1030bdd6b Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Tue, 19 Sep 2023 18:32:44 +0300 Subject: [PATCH 2/6] Disable `TILEDB_FORCE_ALL_DEPS` if `TILEDB_VCPKG` is enabled. --- cmake/Options/BuildOptions.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/Options/BuildOptions.cmake b/cmake/Options/BuildOptions.cmake index c14874b3f01..6a0538d1792 100644 --- a/cmake/Options/BuildOptions.cmake +++ b/cmake/Options/BuildOptions.cmake @@ -5,9 +5,11 @@ # Note: when adding options, make sure to forward them via INHERITED_CMAKE_ARGS # in TileDB-Superbuild.cmake. +include(CMakeDependentOption) + option(TILEDB_SUPERBUILD "If true, perform a superbuild (builds all missing dependencies)." ON) option(TILEDB_VCPKG "If true, use vcpkg to download and build dependencies." ON) -option(TILEDB_FORCE_ALL_DEPS "If true, force superbuild to download and build all dependencies, even those installed on the system." OFF) +cmake_dependent_option(TILEDB_FORCE_ALL_DEPS "If true, force superbuild to download and build all dependencies, even those installed on the system." OFF "NOT TILEDB_VCPKG" OFF) option(TILEDB_REMOVE_DEPRECATIONS "If true, do not build deprecated APIs." OFF) option(TILEDB_VERBOSE "Prints TileDB errors with verbosity" OFF) option(TILEDB_S3 "Enables S3/minio support using aws-cpp-sdk" OFF) From 69eb92fb544bca601b9ab579bf564d2f33613804 Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Tue, 19 Sep 2023 20:05:07 +0300 Subject: [PATCH 3/6] Set the correct triplet on Apple Silicon. Apparently vcpkg has trouble detecting it by itself. --- cmake/Options/TileDBToolchain.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/Options/TileDBToolchain.cmake b/cmake/Options/TileDBToolchain.cmake index a3383b11dd6..0d459672b5f 100644 --- a/cmake/Options/TileDBToolchain.cmake +++ b/cmake/Options/TileDBToolchain.cmake @@ -22,6 +22,14 @@ else() CACHE STRING "Vcpkg toolchain file") endif() +if(APPLE) + if (CMAKE_OSX_ARCHITECTURES STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(AMD64|amd64)|(^i.86$)") + set(VCPKG_TARGET_TRIPLET "x64-macos") + elseif (CMAKE_OSX_ARCHITECTURES STREQUAL arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") + set(VCPKG_TARGET_TRIPLET "arm64-macos") + endif() +endif() + set(VCPKG_INSTALL_OPTIONS "--no-print-usage") macro(tiledb_vcpkg_enable_if tiledb_feature vcpkg_feature) From 4c41688f20a79301c651c348bbaee44f20784d96 Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Tue, 19 Sep 2023 21:25:54 +0300 Subject: [PATCH 4/6] Fix indent. --- azure-pipelines.yml | 126 ++++++++++++++++++++++---------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8f9d6a271f8..2a2e3d406a8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -55,69 +55,69 @@ stages: MACOSX_DEPLOYMENT_TARGET: 10.14 SUDO: 'sudo' jobs: - - job: - timeoutInMinutes: 90 - strategy: - matrix: - macOS: - imageName: 'macos-11' - CXX: clang++ - ARTIFACT_OS: 'macos' - ARTIFACT_ARCH: 'x86_64' - CMAKE_OSX_ARCHITECTURES: "x86_64" - macOS_arm64: - imageName: 'macos-11' - CXX: clang++ - ARTIFACT_OS: 'macos' - ARTIFACT_ARCH: 'arm64' - TILEDB_GCS: OFF - TILEDB_WERROR: OFF - CMAKE_OSX_ARCHITECTURES: "arm64" - BUILD_MAGIC_MACOS_UNIVERSAL: "ON" - MACOSX_DEPLOYMENT_TARGET: 11 - pool: - vmImage: $(imageName) - steps: - - template: scripts/azure-linux_mac-release.yml - - job: linux_manylinux - timeoutInMinutes: 90 - pool: { vmImage: 'ubuntu-20.04' } - container: ${{ variables.MANYLINUX_IMAGE }} - strategy: - matrix: - standard: - CXX: g++ - CFLAGS: "-lrt" - CXXFLAGS: "-lrt" - ARTIFACT_OS: 'linux' - ARTIFACT_ARCH: "x86_64" - TILEDB_AVX2: ON - SUDO: '' - noavx2: - CXX: g++ - CFLAGS: "-lrt" - CXXFLAGS: "-lrt" - ARTIFACT_OS: 'linux' - ARTIFACT_ARCH: "x86_64-noavx2" - TILEDB_AVX2: OFF - SUDO: '' - steps: - - template: scripts/azure-linux_mac-release.yml - - job: Windows - timeoutInMinutes: 90 - strategy: - matrix: - VS2019: - imageName: 'windows-2019' - # Only S3 variable is currently supported in boostrap powershell - TILEDB_GCS: OFF - TILEDB_HDFS: OFF - ARTIFACT_OS: 'windows' - ARTIFACT_ARCH: 'x86_64' - pool: - vmImage: $(imageName) - steps: - - template: scripts/azure-windows-release.yml + - job: + timeoutInMinutes: 90 + strategy: + matrix: + macOS: + imageName: 'macos-11' + CXX: clang++ + ARTIFACT_OS: 'macos' + ARTIFACT_ARCH: 'x86_64' + CMAKE_OSX_ARCHITECTURES: "x86_64" + macOS_arm64: + imageName: 'macos-11' + CXX: clang++ + ARTIFACT_OS: 'macos' + ARTIFACT_ARCH: 'arm64' + TILEDB_GCS: OFF + TILEDB_WERROR: OFF + CMAKE_OSX_ARCHITECTURES: "arm64" + BUILD_MAGIC_MACOS_UNIVERSAL: "ON" + MACOSX_DEPLOYMENT_TARGET: 11 + pool: + vmImage: $(imageName) + steps: + - template: scripts/azure-linux_mac-release.yml + - job: linux_manylinux + timeoutInMinutes: 90 + pool: { vmImage: 'ubuntu-20.04' } + container: ${{ variables.MANYLINUX_IMAGE }} + strategy: + matrix: + standard: + CXX: g++ + CFLAGS: "-lrt" + CXXFLAGS: "-lrt" + ARTIFACT_OS: 'linux' + ARTIFACT_ARCH: "x86_64" + TILEDB_AVX2: ON + SUDO: '' + noavx2: + CXX: g++ + CFLAGS: "-lrt" + CXXFLAGS: "-lrt" + ARTIFACT_OS: 'linux' + ARTIFACT_ARCH: "x86_64-noavx2" + TILEDB_AVX2: OFF + SUDO: '' + steps: + - template: scripts/azure-linux_mac-release.yml + - job: Windows + timeoutInMinutes: 90 + strategy: + matrix: + VS2019: + imageName: 'windows-2019' + # Only S3 variable is currently supported in boostrap powershell + TILEDB_GCS: OFF + TILEDB_HDFS: OFF + ARTIFACT_OS: 'windows' + ARTIFACT_ARCH: 'x86_64' + pool: + vmImage: $(imageName) + steps: + - template: scripts/azure-windows-release.yml # NOTE: this section cannot be conditional because `Build.Repository.Name` is an agent-scoped variable. - stage: Github_Release From fd8f59ab18890c9ce6193e2d576650374d7ab2a7 Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Tue, 19 Sep 2023 21:31:52 +0300 Subject: [PATCH 5/6] Do not set the triplet if it is already set. --- cmake/Options/TileDBToolchain.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Options/TileDBToolchain.cmake b/cmake/Options/TileDBToolchain.cmake index 0d459672b5f..c2a3bff5225 100644 --- a/cmake/Options/TileDBToolchain.cmake +++ b/cmake/Options/TileDBToolchain.cmake @@ -22,7 +22,7 @@ else() CACHE STRING "Vcpkg toolchain file") endif() -if(APPLE) +if(APPLE AND NOT DEFINED VCPKG_TARGET_TRIPLET) if (CMAKE_OSX_ARCHITECTURES STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(AMD64|amd64)|(^i.86$)") set(VCPKG_TARGET_TRIPLET "x64-macos") elseif (CMAKE_OSX_ARCHITECTURES STREQUAL arm64 OR CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") From 1080f1c7cd15adaf09c42ba39064af749a2dcea0 Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Wed, 20 Sep 2023 17:39:02 +0300 Subject: [PATCH 6/6] Update azure-pipelines.yml Co-authored-by: Isaiah Norton --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2a2e3d406a8..5e80c2e8c35 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -109,7 +109,7 @@ stages: matrix: VS2019: imageName: 'windows-2019' - # Only S3 variable is currently supported in boostrap powershell + # Only S3 variable is currently supported in bootstrap powershell TILEDB_GCS: OFF TILEDB_HDFS: OFF ARTIFACT_OS: 'windows'