Skip to content
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
24 changes: 19 additions & 5 deletions .github/workflows/ci-meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,32 @@ jobs:
- name: Install GCC 14 if Ubuntu
if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC')
run: |
sudo apt-get update
# The runner image ships third-party apt lists -- chrome, microsoft --
# that nothing here installs from, and whose indexes intermittently fail
# their hash check and take the job down with them. Drop those lists and
# retry once; the install below is the real gate, and still fails loudly
# if the index is genuinely unusable.
sudo rm -f /etc/apt/sources.list.d/google-chrome.list \
/etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update || sudo apt-get update || true
sudo apt-get install -y gcc-14 g++-14
echo "CC=gcc-14" >> "$GITHUB_ENV"
echo "CXX=g++-14" >> "$GITHUB_ENV"

# clang-tools-18 надає clang-scan-deps - Meson шукає бінарник тієї ж
# версії, що й сам компілятор, щоб просканувати modules/miniocpp.cc на
# залежності для Ninja dyndep.
# clang-tools-18 provides clang-scan-deps - Meson looks for the binary
# matching the same version as the compiler itself, to scan
# modules/minio.cc for dependencies for Ninja dyndep.
- name: Install Clang 18 if Ubuntu Clang
if: matrix.config.name == 'Ubuntu_Latest_Clang_Meson'
run: |
sudo apt-get update
# The runner image ships third-party apt lists -- chrome, microsoft --
# that nothing here installs from, and whose indexes intermittently fail
# their hash check and take the job down with them. Drop those lists and
# retry once; the install below is the real gate, and still fails loudly
# if the index is genuinely unusable.
sudo rm -f /etc/apt/sources.list.d/google-chrome.list \
/etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update || sudo apt-get update || true
sudo apt-get install -y clang-18 clang-tools-18
echo "CC=clang-18" >> "$GITHUB_ENV"
echo "CXX=clang++-18" >> "$GITHUB_ENV"
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/ci-rdma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,13 @@ jobs:
- name: Install recent CMake and Ninja
uses: lukka/get-cmake@fffaaafeea488556c2c12dad60690008bc1caacb # v4.4.2

- name: Install dependencies
run: |
sudo apt-get -qy update
cmake --version
# No apt package is installed in this job -- vcpkg brings the dependencies
# and the RDMA headers -- so there is nothing here to refresh an index for.
# It used to run `apt-get update` anyway, which fails the whole job when the
# runner image's third-party lists serve a bad index: a green build lost to
# a chrome-repo hash mismatch.
- name: Show CMake version
run: cmake --version

- name: Configure and Build
shell: bash
Expand Down
23 changes: 16 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ endif()
# Minio C++ Project
# -----------------

set(MINIO_CPP_MAJOR_VERSION "0")
set(MINIO_CPP_MINOR_VERSION "6")
set(MINIO_CPP_MAJOR_VERSION "1")
set(MINIO_CPP_MINOR_VERSION "0")
set(MINIO_CPP_PATCH_VERSION "0")
set(MINIO_CPP_VERSION_STRING "${MINIO_CPP_MAJOR_VERSION}.${MINIO_CPP_MINOR_VERSION}.${MINIO_CPP_PATCH_VERSION}")

Expand Down Expand Up @@ -184,12 +184,12 @@ target_include_directories(miniocpp PUBLIC
)
target_link_libraries(miniocpp PUBLIC ${MINIO_CPP_LIBS})

# Optional C++20 module interface for the public API (modules/miniocpp.cc).
# Optional C++20 module interface for the public API (modules/minio.cc).
# FILE_SET CXX_MODULES (CMake 3.28+) attaches it as a real part of the miniocpp
# target's build - the compiler gets whatever flags it needs for a module
# interface unit (e.g. /interface for MSVC) based on this declaration, not on
# the file's extension, so any CMake/MSBuild/Meson (via cmake.subproject())
# consumer of this target picks up `import miniocpp;` automatically. Requires
# consumer of this target picks up `import minio;` automatically. Requires
# C++20 (MINIO_CPP_STD=20); silently skipped otherwise for older setups.
#
# CMake's module dependency scanning is only implemented for the Ninja,
Expand Down Expand Up @@ -250,7 +250,7 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.28" AND MINIO_CPP_STD STREQUAL "20")
PUBLIC
FILE_SET CXX_MODULES
BASE_DIRS modules
FILES modules/miniocpp.cc
FILES modules/minio.cc
)
endif()
endif()
Expand All @@ -261,7 +261,16 @@ target_compile_definitions(miniocpp PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
if (MINIO_CPP_ENABLE_RDMA)
target_compile_definitions(miniocpp PUBLIC MINIO_CPP_RDMA)
endif()
# The artifact is libminio, matching the `minio` C++20 module. The CMake
# package, the exported target and the header directory stay `miniocpp`, so
# existing find_package() and #include lines keep working.
set_target_properties(miniocpp PROPERTIES OUTPUT_NAME minio)
set_target_properties(miniocpp PROPERTIES VERSION "${MINIO_CPP_VERSION_STRING}")
# SOVERSION carries the major alone, so the soname is libminio.so.1 and stays
# put across the whole 1.x line. Without it CMake writes the full version into
# the soname -- as libminiocpp.so.0.4.0 shows -- and every release, patches
# included, orphans every binary already linked against its predecessor.
set_target_properties(miniocpp PROPERTIES SOVERSION "${MINIO_CPP_MAJOR_VERSION}")
set_target_properties(miniocpp PROPERTIES POSITION_INDEPENDENT_CODE ON)

# Add a cmake alias - this is how users should use minio-cpp in their cmake projects.
Expand Down Expand Up @@ -381,7 +390,7 @@ configure_package_config_file(

if (MINIO_CPP_ENABLE_RDMA)
# Ship the vendored transport alongside the library and resolve it relative
# to whatever installed thing loads it, so an installed libminiocpp does not
# to whatever installed thing loads it, so an installed libminio does not
# depend on this source tree still being present. Both names go in: the
# soname is what the loader asks for, the link name is what -ls3rdma finds.
install(FILES
Expand Down Expand Up @@ -424,7 +433,7 @@ endif()
# installed package (via find_package(miniocpp) + CMake, as opposed to
# consuming subprojects/miniocpp source directly, or via pkg-config/vcpkg)
# is missing the generated module metadata CMake needs to let a downstream
# CMake consumer `import miniocpp;` - see
# CMake consumer `import minio;` - see
# https://cmake.org/cmake/help/latest/command/install.html#exporting-c-modules.
# Separately, installing module interfaces is not supported at all with
# the Visual Studio generator (independent of the MINIO_CPP_HAS_CXX_MODULE
Expand Down
4 changes: 2 additions & 2 deletions include/miniocpp/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#define MINIO_CPP_STRINGIFY(x) #x
#define MINIO_CPP_TO_STRING(x) MINIO_CPP_STRINGIFY(x)

#define MINIO_CPP_MAJOR_VERSION 0
#define MINIO_CPP_MINOR_VERSION 6
#define MINIO_CPP_MAJOR_VERSION 1
#define MINIO_CPP_MINOR_VERSION 0
#define MINIO_CPP_PATCH_VERSION 0

#define MINIO_CPP_VERSION \
Expand Down
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ miniocpp_sources = files(

# The real library - all .cc files from this repo, not the official minio-cpp
# vcpkg package.
miniocpp_lib = static_library('miniocpp', miniocpp_sources,
miniocpp_lib = static_library('minio', miniocpp_sources,
include_directories : miniocpp_include,
dependencies : all_deps,
)
Expand All @@ -61,7 +61,7 @@ if build_module
else
module_cpp_args = []
endif
miniocpp_module_lib = static_library('miniocpp_module', 'modules/miniocpp.cc',
miniocpp_module_lib = static_library('miniocpp_module', 'modules/minio.cc',
include_directories : miniocpp_include,
dependencies : all_deps,
cpp_args : module_cpp_args,
Expand Down
2 changes: 1 addition & 1 deletion miniocpp.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Description: @PROJECT_DESCRIPTION@
Version: @PROJECT_VERSION@

Requires: libcrypto libssl pugixml zlib
Libs: -L${libdir} -lminiocpp@MINIO_CPP_PC_EXTRA_LIBS@
Libs: -L${libdir} -lminio@MINIO_CPP_PC_EXTRA_LIBS@
Cflags: -I${includedir}
2 changes: 1 addition & 1 deletion modules/miniocpp.cc → modules/minio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module;

#include <miniocpp/client.h>

export module miniocpp;
export module minio;

// Re-exporting the public API through the module requires an EXPLICIT using-
// declaration per symbol (using ns::Symbol;) - not a using-directive (using
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minio-cpp",
"version": "0.6.0",
"version": "1.0.0",
"description": "The MinIO C++ Client SDK provides simple APIs to access any Amazon S3 compatible object storage",
"homepage": "https://github.com/minio/minio-cpp",
"license": "Apache-2.0",
Expand Down
Loading