diff --git a/.github/workflows/ci-meson.yml b/.github/workflows/ci-meson.yml index da7fd3fa..c227c6df 100644 --- a/.github/workflows/ci-meson.yml +++ b/.github/workflows/ci-meson.yml @@ -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" diff --git a/.github/workflows/ci-rdma.yml b/.github/workflows/ci-rdma.yml index 54b000ab..9218901b 100644 --- a/.github/workflows/ci-rdma.yml +++ b/.github/workflows/ci-rdma.yml @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f588c86..7a7c131f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") @@ -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, @@ -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() @@ -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. @@ -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 @@ -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 diff --git a/include/miniocpp/config.h b/include/miniocpp/config.h index 0560529f..8c849ff6 100644 --- a/include/miniocpp/config.h +++ b/include/miniocpp/config.h @@ -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 \ diff --git a/meson.build b/meson.build index 5efb2d0a..18770726 100644 --- a/meson.build +++ b/meson.build @@ -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, ) @@ -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, diff --git a/miniocpp.pc.in b/miniocpp.pc.in index 4b6b7530..8d361657 100644 --- a/miniocpp.pc.in +++ b/miniocpp.pc.in @@ -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} \ No newline at end of file diff --git a/modules/miniocpp.cc b/modules/minio.cc similarity index 96% rename from modules/miniocpp.cc rename to modules/minio.cc index 95fbc250..de72c442 100644 --- a/modules/miniocpp.cc +++ b/modules/minio.cc @@ -2,7 +2,7 @@ module; #include -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 diff --git a/vcpkg.json b/vcpkg.json index b0c5f45e..fd9f5a7a 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -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",