Skip to content

ci: github: use gnu rsync #311

ci: github: use gnu rsync

ci: github: use gnu rsync #311

# Generated file; do not edit!
name: cmake-build-ci
on:
workflow_dispatch:
release:
types: [published]
push:
paths:
- ".github/workflows/cmake-build-ci*"
- "CMake*"
- "CPack*"
- "contrib/**"
- "include/**"
- "src/**"
- "test/**"
branches-ignore:
- gh-pages
pull_request:
branches:
- master
- v1.x
env:
# defaults
INSTALL_MEMCACHED: memcached
ENABLE_SASL: "OFF" # ^ almost no memcached distribution package has built in sasl support
ENABLE_HASH_HSIEH: "ON"
ENABLE_DTRACE: "OFF"
OS_VND: Linux #
OS_VER: ubuntu-24.04 #
CC_VND: gnu #
CC_VER: cur
jobs:
# coverage mac
debug-coverage-mac:
name: debug coverage (macos-13, clang)
runs-on: macos-13 #
env:
CMAKE_BUILD_TYPE: "Debug"
BUILD_TESTING: "ON"
VERBOSE: "ON"
CFLAGS: "-O0 --coverage"
CXXFLAGS: "-O0 --coverage"
OS_VND: macOS #
OS_VER: macos-13 #
CC_VND: clang #
CC_VER: cur
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install bison flex libevent pkg-config rsync sphinx-doc ${INSTALL_MEMCACHED}
brew services stop memcached || true
echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
- name: Build memcached
if: runner.os != 'Windows'
run: |
if test -d memcached
then
cd memcached
./autogen.sh
cp configure{,.old} && sed -e 's/-Werror//g' <configure.old >configure
./configure CFLAGS="-O2 -pipe -fcommon" \
--prefix=${MEMCACHED_PREFIX} \
--enable-sasl \
--enable-sasl-pwdb \
--disable-coverage \
--disable-dependency-tracking \
--disable-docs \
--disable-extstore \
--disable-option-checking \
;
make -j4
make install
cd ..
echo MEMCACHED_BINARY="${MEMCACHED_PREFIX}/bin/memcached" >> ${GITHUB_ENV}
fi
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4
- name: Test
if: env.BUILD_TESTING == 'ON'
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target test
- name: Install
if: env.BUILD_TESTING == 'ON'
run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /tmp
- name: Failed tests log
if: ${{ env.BUILD_TESTING == 'ON' && failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
- name: Package
env:
PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
if: env.PUSH_ARTIFACTS_ID != '' && env.CMAKE_BUILD_TYPE == 'Release'
run: |
cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake -DCPACK_COMPONENT_INSTALL=ON build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target push-artifacts
- name: Notify Gitter
env:
GITTER: ${{ secrets.GITTER }}
if: (success() || failure()) && env.GITTER != ''
run: bash .github/notify-gitter.sh ${{ job.status }}
- uses: codecov/codecov-action@v3
# mac release builds
mac:
name: release
strategy:
fail-fast: false
matrix:
os_ver: [macos-13, macos-14, macos-15]
runs-on: ${{ matrix.os_ver }}
env:
CMAKE_BUILD_TYPE: "Release"
BUILD_DOCS_MANGZ: "ON"
OS_VND: macOS #
OS_VER: macos-13 #
CC_VND: clang #
CC_VER: cur
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install bison flex libevent pkg-config rsync sphinx-doc ${INSTALL_MEMCACHED}
brew services stop memcached || true
echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
- name: Build memcached
if: runner.os != 'Windows'
run: |
if test -d memcached
then
cd memcached
./autogen.sh
cp configure{,.old} && sed -e 's/-Werror//g' <configure.old >configure
./configure CFLAGS="-O2 -pipe -fcommon" \
--prefix=${MEMCACHED_PREFIX} \
--enable-sasl \
--enable-sasl-pwdb \
--disable-coverage \
--disable-dependency-tracking \
--disable-docs \
--disable-extstore \
--disable-option-checking \
;
make -j4
make install
cd ..
echo MEMCACHED_BINARY="${MEMCACHED_PREFIX}/bin/memcached" >> ${GITHUB_ENV}
fi
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4
- name: Test
if: env.BUILD_TESTING == 'ON'
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target test
- name: Install
if: env.BUILD_TESTING == 'ON'
run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /tmp
- name: Failed tests log
if: ${{ env.BUILD_TESTING == 'ON' && failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
- name: Package
env:
PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
if: env.PUSH_ARTIFACTS_ID != '' && env.CMAKE_BUILD_TYPE == 'Release'
run: |
cmake -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -S . -B build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake -DCPACK_COMPONENT_INSTALL=ON build
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target package
cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j4 --target push-artifacts
- name: Notify Gitter
env:
GITTER: ${{ secrets.GITTER }}
if: (success() || failure()) && env.GITTER != ''
run: bash .github/notify-gitter.sh ${{ job.status }}