diff --git a/.github/workflows/hosted-ninja-vcpkg_submod.yml b/.github/workflows/hosted-ninja-vcpkg_submod.yml index 953661a..f5f2696 100644 --- a/.github/workflows/hosted-ninja-vcpkg_submod.yml +++ b/.github/workflows/hosted-ninja-vcpkg_submod.yml @@ -31,14 +31,16 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-13,macos-14, windows-latest] include: - os: windows-latest triplet: x64-windows - os: ubuntu-latest triplet: x64-linux - - os: macos-latest + - os: macos-13 triplet: x64-osx + - os: macos-14 + triplet: arm64-osx env: # # [OPTIONAL] Define the vcpkg's triplet diff --git a/.github/workflows/hosted-pure-workflow.yml b/.github/workflows/hosted-pure-workflow.yml index da44144..fe71329 100644 --- a/.github/workflows/hosted-pure-workflow.yml +++ b/.github/workflows/hosted-pure-workflow.yml @@ -27,14 +27,16 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-13, macos-14, windows-latest] include: - os: windows-latest triplet: x64-windows - os: ubuntu-latest triplet: x64-linux - - os: macos-latest + - os: macos-13 triplet: x64-osx + - os: macos-14 + triplet: arm64-osx env: # Indicates the location of the vcpkg as a Git submodule of the project repository. # Not using "VCPKG_ROOT" because a variable with the same name is defined in the VS's diff --git a/CMakeLists.txt b/CMakeLists.txt index d0e93ba..82326ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,18 +14,22 @@ set (CMAKE_CXX_STANDARD 17) project(khiops-gcs LANGUAGES CXX) -# Find dependencies provided by vcpkg (via vcpkg.cmake) +# Find dependencies find_package(fmt CONFIG REQUIRED) find_package(google_cloud_cpp_storage CONFIG REQUIRED) find_package(spdlog CONFIG REQUIRED) +# Hide symbols in the shared libraries +set(CMAKE_CXX_VISIBILITY_PRESET hidden) +set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) + add_library(khiopsdriver_file_gcs MODULE src/gcsplugin.h src/gcsplugin.cpp) -set_target_properties(khiopsdriver_file_gcs PROPERTIES LINK_FLAGS_RELEASE -s) +target_link_options(khiopsdriver_file_gcs PRIVATE $<$:-s>) # stripping target_link_libraries(khiopsdriver_file_gcs PRIVATE google-cloud-cpp::storage spdlog::spdlog) add_executable(KhiopsPluginTest src/khiopsplugintest.cpp) target_link_libraries(KhiopsPluginTest PRIVATE fmt::fmt) add_executable(drivertest src/drivertest.cpp) -target_link_libraries(drivertest) +target_link_libraries(drivertest ${CMAKE_DL_LIBS}) # Link to dl diff --git a/CMakePresets.json b/CMakePresets.json index 575bee9..9ceb982 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -8,11 +8,18 @@ "configurePresets": [ { "name": "ninja-multi-vcpkg", - "displayName": "Ninja Multi-Config", + "displayName": "Ninja Multi-Config with vcpkg", "description": "Configure with vcpkg toolchain and generate Ninja project files for all configurations", "binaryDir": "${sourceDir}/builds/${presetName}", "generator": "Ninja Multi-Config", "toolchainFile": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake" + }, + { + "name": "ninja-multi", + "displayName": "Ninja without vcpkg", + "description": "Configure Ninja project files for all configurations", + "binaryDir": "${sourceDir}/builds/${presetName}", + "generator": "Ninja Multi-Config" } ], "buildPresets": [ @@ -31,10 +38,18 @@ "configuration": "Release" }, { - "name": "ninja-vcpkg", - "configurePreset": "ninja-multi-vcpkg", - "displayName": "Build", - "description": "Build with Ninja/vcpkg" + "name": "ninja-debug", + "configurePreset": "ninja-multi", + "displayName": "Build (Debug)", + "description": "Build with Ninja", + "configuration": "Debug" + }, + { + "name": "ninja-release", + "configurePreset": "ninja-multi", + "displayName": "Build (release)", + "description": "Build with Ninja", + "configuration": "Release" } ], "testPresets": [ @@ -62,5 +77,4 @@ ] } ] -} - +} \ No newline at end of file diff --git a/conda/build.sh b/conda/build.sh new file mode 100644 index 0000000..29f30d2 --- /dev/null +++ b/conda/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Set-up the shell to behave more like a general-purpose programming language +set -euo pipefail + +# Configure project +cmake --fresh --preset ninja-multi + +# Build +cmake --build --preset ninja-release --target khiopsdriver_file_gcs + +# Copy binary to conda package +mkdir -p $PREFIX/bin +cp ./builds/ninja-multi/Release/libkhiopsdriver_file_gcs.so "$PREFIX/bin/" + + + diff --git a/conda/meta.yaml b/conda/meta.yaml new file mode 100644 index 0000000..19676e0 --- /dev/null +++ b/conda/meta.yaml @@ -0,0 +1,34 @@ +package: + name: khiops-driver-gcs + version: 0.0.1 + +source: + path: ../ + +build: + number: 0 +requirements: + build: + - cmake + - ninja + - {{ compiler('cxx') }} + host: + - google-cloud-cpp + - spdlog + run: + - google-cloud-cpp + - spdlog + +outputs: + - name: khiops-driver-gcs + # test: + # commands: + # - MODL -v + # - MODL_Coclustering -v + +about: + home: https://khiops.org + license: BSD+3-clause + summary: Khiops driver to access files on Google Cloud Storage + doc_url: https://khiops.org + dev_url: https://github.com/khiopsml/khiops