Skip to content

build: vendor libs3rdma 0.3.2 #517

build: vendor libs3rdma 0.3.2

build: vendor libs3rdma 0.3.2 #517

Workflow file for this run

name: MinIO C++ Cmake
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# This ensures that previous jobs for the PR are canceled when the PR is
# updated.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu_Latest_GCC",
os: ubuntu-latest,
arch: "amd64",
build_type: "Release",
cc: "gcc",
cxx: "g++",
cpp_std: "17"
}
- {
name: "Ubuntu_Latest_GCC_CXX20",
os: ubuntu-latest,
arch: "amd64",
build_type: "Release",
cc: "gcc",
cxx: "g++",
cpp_std: "20"
}
- {
name: "Ubuntu_Latest_GCC_arm64",
os: ubuntu-24.04-arm,
arch: "arm64",
build_type: "Release",
cc: "gcc",
cxx: "g++",
cpp_std: "17"
}
- {
name: "Ubuntu_Latest_GCC_arm64_CXX20",
os: ubuntu-24.04-arm,
arch: "arm64",
build_type: "Release",
cc: "gcc",
cxx: "g++",
cpp_std: "20"
}
- {
name: "macOS Latest Clang",
os: macos-latest,
build_type: "Release",
cc: "clang",
cxx: "clang++",
cpp_std: "17"
}
- {
name: "macOS Latest Clang CXX20",
os: macos-latest,
build_type: "Release",
cc: "clang",
cxx: "clang++",
cpp_std: "20"
}
- {
name: "Windows Latest MSVC",
os: windows-latest,
build_type: "Release",
cc: "cl",
cxx: "cl",
cpp_std: "17"
}
- {
name: "Windows Latest MSVC CXX20",
os: windows-latest,
build_type: "Release",
cc: "cl",
cxx: "cl",
cpp_std: "20"
}
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
steps:
- name: Checkout minio-cpp
uses: actions/checkout@v4
with:
path: "minio-cpp"
- name: Checkout vcpkg
uses: actions/checkout@v4
with:
repository: microsoft/vcpkg
ref: "2026.07.29"
path: "vcpkg"
# arm64 Linux has no prebuilt vcpkg CMake, so vcpkg falls back to the system
# cmake; the apt version (3.28) is too old for vcpkg's SPDX generation
# (string(JSON ... STRING_ENCODE)). Provide a recent cmake on PATH.
- name: Install recent CMake and Ninja
uses: lukka/get-cmake@fffaaafeea488556c2c12dad60690008bc1caacb # v4.4.2
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Install dependencies if Ubuntu
if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC')
run: |
wget --quiet https://dl.min.io/aistor/minio/release/linux-${{ matrix.config.arch }}/minio
chmod +x minio
cmake --version
./minio --version
- name: Install dependencies if macOS
if: startsWith(matrix.config.os, 'macos')
run: |
brew install pkg-config cmake minio/stable/minio
cmake --version
minio --version
- name: Install dependencies if Windows
shell: bash
if: startsWith(matrix.config.os, 'windows')
run: |
choco install -y --no-progress cmake wget
wget --quiet https://dl.min.io/server/minio/release/windows-amd64/minio.exe
chmod +x minio.exe
cmake --version
- name: Configure and Build
shell: bash
run: |
./vcpkg/bootstrap-vcpkg.sh
cd minio-cpp
../vcpkg/vcpkg install
cmake . -B ./build -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DMINIO_CPP_TEST:BOOL=ON -DMINIO_CPP_STD=${{matrix.config.cpp_std}}
cmake --build ./build --config ${{matrix.config.build_type}} -j 4
- name: Start MinIO server if Ubuntu
if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC')
run: |
mkdir -p ~/.minio/certs
cp ./minio-cpp/tests/public.crt ./minio-cpp/tests/private.key ~/.minio/certs/
sudo cp ./minio-cpp/tests/public.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates
export MINIO_LICENSE=$(cat ./minio-cpp/.github/aistor-free-license.jwt)
MINIO_CI_CD=true ./minio server /tmp/test-xl/{1...4}/ &
sleep 10
- name: Start MinIO server if macOS
if: startsWith(matrix.config.name, 'macos')
run: |
MINIO_CI_CD=true minio server test-xl/{1...4}/ &
sleep 10
- name: Start MinIO server if Windows
if: startsWith(matrix.config.os, 'windows')
shell: bash
run: |
mkdir -p ~/.minio/certs
cp ./minio-cpp/tests/public.crt ./minio-cpp/tests/private.key ~/.minio/certs/
certutil -addstore -f "ROOT" ./minio-cpp/tests/public.crt
MINIO_CI_CD=true ./minio.exe server test-xl/{1...4}/ &
sleep 10
- name: Run tests if Ubuntu
if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC')
run: |
SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ENABLE_HTTPS=1 ./minio-cpp/build/tests
- name: Run tests if macOS
if: startsWith(matrix.config.name, 'macos')
run: |
SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ./minio-cpp/build/tests
- name: Run tests if Windows
shell: bash
if: startsWith(matrix.config.os, 'windows')
run: |
SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ENABLE_HTTPS=1 ./minio-cpp/build/Release/tests.exe
- name: Run CMake test
run: |
cd minio-cpp/build
ctest -C ${{ matrix.config.build_type }}
# Alpine/musl: vcpkg's default setup downloads glibc-linked tools, and
# Alpine lacks httplib / INIReader packages -- exercises the pkg-config +
# upstream source fallback path.
build-alpine:
name: Alpine_Latest_GCC
runs-on: ubuntu-latest
container: alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b
steps:
- name: Install dependencies
run: |
apk add --no-cache build-base cmake git ninja pkgconf \
inih-dev nlohmann-json openssl-dev pugixml-dev zlib-dev
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Configure and Build
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DMINIO_CPP_TEST=ON
cmake --build build
- name: Start MinIO server
run: |
MINIO_RELEASE=RELEASE.2025-09-07T16-13-09Z
wget --quiet https://dl.min.io/server/minio/release/linux-amd64/archive/minio.${MINIO_RELEASE}
wget --quiet https://dl.min.io/server/minio/release/linux-amd64/archive/minio.${MINIO_RELEASE}.sha256sum
sha256sum -c minio.${MINIO_RELEASE}.sha256sum
mv minio.${MINIO_RELEASE} minio
chmod +x minio
mkdir -p /data
MINIO_CI_CD=true ./minio server /data --address 127.0.0.1:9000 &
MINIO_PID=$!
for i in $(seq 1 30); do
if wget -q -O /dev/null http://127.0.0.1:9000/minio/health/live; then
exit 0
fi
kill -0 $MINIO_PID 2>/dev/null || { echo "MinIO server exited"; exit 1; }
sleep 1
done
echo "MinIO server did not become ready"
exit 1
- name: Run tests
run: |
SERVER_ENDPOINT=127.0.0.1:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin \
./build/tests