- flex
- libevent
- pkgconf
+ - py37-sphinx
+ - py37-m2r
+ - rsync
- tbb
sources:
- https://github.com/m6w6/libmemcached
+secrets:
+ - 46f739e5-4538-45dd-a79f-bf173b7a2ed9
environment:
- CMAKE_BUILD_TYPE: Debug
- BUILD_TESTING: "ON"
ENABLE_HASH_HSIEH: "ON"
ENABLE_MEMASLAP: "ON"
ENABLE_SASL: "ON"
OPTIONS_SET="SASL SASLPWDB" \
OPTIONS_DEFINE="SASL SASLPWDB"
- configure: |
- cmake -S libmemcached -B build
+ cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -S libmemcached -B debug
- build: |
- make -C build -j2 all
+ cmake --build debug -j2
- test: |
- make -C build -j2 test/fast
+ cmake --build debug -j2 --target test
- install: |
- make -C build install DESTDIR=/tmp
+ cmake --build debug -j2 --target install -- DESTDIR=/tmp
+ - package: |
+ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCS_MANGZ=ON -S libmemcached -B release
+ cmake --build release -j2 --target package -- VERBOSE=
+ cmake --build release -j2 --target push-artifact -- VERBOSE=
- libevent
- memcached--
- pkgconf
+ - py3-sphinx
+ - py3-m2r
+ - rsync
- sudo--
- tbb
sources:
- https://github.com/m6w6/libmemcached
environment:
- CMAKE_BUILD_TYPE: Debug
- BUILD_TESTING: "ON"
ENABLE_HASH_HSIEH: "ON"
ENABLE_MEMASLAP: "OFF"
VERBOSE: "ON"
MEMCACHED_BINARY: "memcached"
tasks:
- configure: |
- cmake -S libmemcached -B build
+ cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -S libmemcached -B debug
- build: |
- make -C build -j2 all
+ cmake --build debug -j2
- test: |
- make -C build -j2 test/fast
+ cmake --build debug -j2 --target test
- install: |
- make -C build install DESTDIR=/tmp
+ cmake --build debug -j2 --target install -- DESTDIR=/tmp
+ - package: |
+ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCS_MANGZ=ON -S libmemcached -B release
+ cmake --build release -j2 --target package -- VERBOSE=
+ cmake --build release -j2 --target push-artifact -- VERBOSE=
"CXX" => "g++",
],
"clang" => [
- "ver" => "apple",
+ "ver" => "cur",
"CC" => "clang",
"CXX" => "clang++",
],
libevent-dev \
libsasl2-dev \
libtbb-dev \
+ python3-m2r \
+ python3-sphinx \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Install dependencies (Mac)
if: runner.os == 'macOS'
run: |
- brew install bison flex ${INSTALL_MEMCACHED}
+ brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
brew services stop memcached || true
echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
- name: Build memcached
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
- run: make -C build -j2 all
+ run: cmake --build build -j2
- name: Test
- run: make -C build -j2 test
+ run: cmake --build build -j2 --target test
- name: Install
- run: make -C build -j2 install DESTDIR=/tmp
- - name: Package
- if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
- run: make -C build package
+ run: cmake --build build -j2 --target install -- DESTDIR=/tmp
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
<?php
}
+function steps_package() {
+?>
+ - name: Package
+ env:
+ PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+ if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+ run: |
+ cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake -DCPACK_COMPONENT_INSTALL=ON build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake --build build -j2 --target push-artifacts -- VERBOSE=
+<?php
+}
+
function steps_notify() {
?>
- name: Notify Gitter (success)
steps_setenv($splat_map);
steps_getdeps();
steps_build();
+ steps_package();
steps_notify();
}
-function defaults() {
- $os_ver = DEF[DEF["os"]];
+function defaults($os_vnd = DEF["os"]) {
+ $os_ver = DEF[$os_vnd];
$cc_vnd = DEF[$os_ver];
$cc_ver = DEF[$cc_vnd]["ver"];
return "$os_ver, $cc_vnd, $cc_ver";
}
+
+function env_override($os_vnd) {
+?>
+ OS_VND: <?=$os_vnd?> #
+ OS_VER: <?=DEF[$os_vnd]?> #
+ CC_VND: <?=DEF[DEF[$os_vnd]]?> #
+ CC_VER: <?=DEF[DEF[DEF[$os_vnd]]]["ver"]?> #
+<?php
+}
+
?>
name: cmake-build-ci
on:
env:
# defaults
INSTALL_MEMCACHED: memcached
- CMAKE_BUILD_TYPE: Debug
- BUILD_TESTING: "ON"
- ENABLE_SASL: "OFF"
+ ENABLE_SASL: "ON"
ENABLE_HASH_HSIEH: "ON"
ENABLE_DTRACE: "OFF"
- VERBOSE: "ON"
OS_VND: <?=DEF["os"]?> #
OS_VER: <?=DEF[DEF["os"]]?> #
CC_VND: <?=DEF[DEF[DEF["os"]]]?> #
name: dbg-new (<?=defaults()?>)
runs-on: <?=DEF[DEF["os"]]?> #
env:
- INSTALL_MEMCACHED:
- MEMCACHED_PREFIX: /tmp
- ENABLE_SASL: "ON"
- CFLAGS: "-O0 --coverage"
- CXXFLAGS: "-O0 --coverage"
+ CMAKE_BUILD_TYPE: "Debug"
+ BUILD_TESTING: "ON"
+ VERBOSE: "ON"
+ CFLAGS: "-O0 --coverage"
+ CXXFLAGS: "-O0 --coverage"
+ INSTALL_MEMCACHED: ""
+ MEMCACHED_PREFIX: "/tmp"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
name: dbg-san (<?=defaults()?>)
runs-on: <?=DEF[DEF["os"]]?> #
env:
- ENABLE_SANITIZERS: "address;undefined"
+ CMAKE_BUILD_TYPE: "Debug"
+ BUILD_TESTING: "ON"
+ VERBOSE: "ON"
+ ENABLE_SANITIZERS: "address;undefined"
steps:
- uses: actions/checkout@v2
<?php steps(); ?>
name: dbg-tsan (<?=defaults()?>)
runs-on: <?=DEF[DEF["os"]]?> #
env:
+ CMAKE_BUILD_TYPE: "Debug"
+ BUILD_TESTING: "ON"
+ VERBOSE: "ON"
ENABLE_SANITIZERS: "thread"
steps:
- uses: actions/checkout@v2
<?php steps(); ?>
- # mac build
+ # mac debug
dbg-mac:
name: dbg-mac (<?=DEF["macOS"]?>, <?=DEF[DEF["macOS"]]?>, <?=DEF[DEF[DEF["macOS"]]]["ver"]?>)
runs-on: <?=DEF["macOS"]?> #
env:
- CFLAGS: -O0 --coverage
- CXXFLAGS: -O0 --coverage
- OS_VND: macOS
- OS_VER: <?=DEF["macOS"]?> #
- CC_VND: <?=DEF[DEF["macOS"]]?> #
- CC_VER: <?=DEF[DEF[DEF["macOS"]]]["ver"]?> #
+ CMAKE_BUILD_TYPE: "Debug"
+ ENABLE_SASL: "OFF"
+ BUILD_TESTING: "ON"
+ VERBOSE: "ON"
+ CFLAGS: "-O0 --coverage"
+ CXXFLAGS: "-O0 --coverage"
+<?php env_override("macOS")?> #
continue-on-error: true
steps:
- uses: actions/checkout@v2
<?php steps(false); ?>
- uses: codecov/codecov-action@v1.0.13
+ # mac release
+ rel-mac:
+ name: rel-mac (<?=DEF["macOS"]?>, <?=DEF[DEF["macOS"]]?>, <?=DEF[DEF[DEF["macOS"]]]["ver"]?>)
+ runs-on: <?=DEF["macOS"]?> #
+ env:
+ ENABLE_SASL: "OFF"
+ BUILD_DOCS_MANGZ: "ON"
+<?php env_override("macOS")?>
+ continue-on-error: true
+ steps:
+ - uses: actions/checkout@v2
+<?php steps(false); ?>
+
# win build
win-msvc:
name: win-msvc (<?=DEF["Windows"]?>, <?=DEF[DEF["Windows"]]?>, <?=DEF[DEF[DEF["Windows"]]]["ver"]?>)
runs-on: <?=DEF["Windows"]?> #
env:
- CMAKE_BUILD_TYPE: Release
- BUILD_TESTING: "OFF"
+ ENABLE_SASL: "OFF"
BISON_ROOT: "C:/msys64/usr"
FLEX_ROOT: "C:/msys64/usr"
- OS_VND: Windows
- OS_VER: <?=DEF["Windows"]?> #
- CC_VND: <?=DEF[DEF["Windows"]]?> #
- CC_VER: <?=DEF[DEF[DEF["Windows"]]]["ver"]?> #
+<?php env_override("Windows")?>
continue-on-error: true
+ defaults:
+ run:
+ shell: msys2 {0}
steps:
- uses: actions/checkout@v2
+ - uses: msys2/setup-msys2@v2
+ with:
+ release: false
+ path-type: inherit
+ install: >-
+ rsync
+ openssh
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake --config ${{ env.CMAKE_BUILD_TYPE }} -S . -B build
- name: Build all with ${{ env.CC_VND }}
- name: Install
run: cmake --install build --prefix installed --config ${{ env.CMAKE_BUILD_TYPE }}
- name: Package
- run: cmake -E chdir build cpack
+ env:
+ PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+ run: |
+ cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --target package
+ cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --target push-artifacts
# release builds
release:
runs-on: ${{ matrix.os_ver }}
continue-on-error: ${{ matrix.cc_vnd == 'clang' }}
env:
- CMAKE_BUILD_TYPE: Release
+ BUILD_DOCS_MANGZ: "ON"
OS_VND: Linux
OS_VER: ${{ matrix.os_ver }}
CC_VND: ${{ matrix.cc_vnd }}
env:
# defaults
INSTALL_MEMCACHED: memcached
- CMAKE_BUILD_TYPE: Debug
- BUILD_TESTING: "ON"
- ENABLE_SASL: "OFF"
+ ENABLE_SASL: "ON"
ENABLE_HASH_HSIEH: "ON"
ENABLE_DTRACE: "OFF"
- VERBOSE: "ON"
OS_VND: Linux #
OS_VER: ubuntu-20.04 #
CC_VND: gnu #
name: dbg-new (ubuntu-20.04, gnu, cur)
runs-on: ubuntu-20.04 #
env:
- INSTALL_MEMCACHED:
- MEMCACHED_PREFIX: /tmp
- ENABLE_SASL: "ON"
- CFLAGS: "-O0 --coverage"
- CXXFLAGS: "-O0 --coverage"
+ CMAKE_BUILD_TYPE: "Debug"
+ BUILD_TESTING: "ON"
+ VERBOSE: "ON"
+ CFLAGS: "-O0 --coverage"
+ CXXFLAGS: "-O0 --coverage"
+ INSTALL_MEMCACHED: ""
+ MEMCACHED_PREFIX: "/tmp"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
libevent-dev \
libsasl2-dev \
libtbb-dev \
+ python3-m2r \
+ python3-sphinx \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Install dependencies (Mac)
if: runner.os == 'macOS'
run: |
- brew install bison flex ${INSTALL_MEMCACHED}
+ brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
brew services stop memcached || true
echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
- name: Build memcached
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
- run: make -C build -j2 all
+ run: cmake --build build -j2
- name: Test
- run: make -C build -j2 test
+ run: cmake --build build -j2 --target test
- name: Install
- run: make -C build -j2 install DESTDIR=/tmp
- - name: Package
- if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
- run: make -C build package
+ run: cmake --build build -j2 --target install -- DESTDIR=/tmp
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
+ - name: Package
+ env:
+ PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+ if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+ run: |
+ cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake -DCPACK_COMPONENT_INSTALL=ON build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake --build build -j2 --target push-artifacts -- VERBOSE=
- name: Notify Gitter (success)
if: ${{ success() }}
run: |
name: dbg-san (ubuntu-20.04, gnu, cur)
runs-on: ubuntu-20.04 #
env:
- ENABLE_SANITIZERS: "address;undefined"
+ CMAKE_BUILD_TYPE: "Debug"
+ BUILD_TESTING: "ON"
+ VERBOSE: "ON"
+ ENABLE_SANITIZERS: "address;undefined"
steps:
- uses: actions/checkout@v2
- name: Prepare environment (for cur gnu on ubuntu-20.04)
libevent-dev \
libsasl2-dev \
libtbb-dev \
+ python3-m2r \
+ python3-sphinx \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Install dependencies (Mac)
if: runner.os == 'macOS'
run: |
- brew install bison flex ${INSTALL_MEMCACHED}
+ brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
brew services stop memcached || true
echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
- name: Build memcached
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
- run: make -C build -j2 all
+ run: cmake --build build -j2
- name: Test
- run: make -C build -j2 test
+ run: cmake --build build -j2 --target test
- name: Install
- run: make -C build -j2 install DESTDIR=/tmp
- - name: Package
- if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
- run: make -C build package
+ run: cmake --build build -j2 --target install -- DESTDIR=/tmp
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
+ - name: Package
+ env:
+ PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+ if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+ run: |
+ cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake -DCPACK_COMPONENT_INSTALL=ON build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake --build build -j2 --target push-artifacts -- VERBOSE=
- name: Notify Gitter (success)
if: ${{ success() }}
run: |
name: dbg-tsan (ubuntu-20.04, gnu, cur)
runs-on: ubuntu-20.04 #
env:
+ CMAKE_BUILD_TYPE: "Debug"
+ BUILD_TESTING: "ON"
+ VERBOSE: "ON"
ENABLE_SANITIZERS: "thread"
steps:
- uses: actions/checkout@v2
libevent-dev \
libsasl2-dev \
libtbb-dev \
+ python3-m2r \
+ python3-sphinx \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Install dependencies (Mac)
if: runner.os == 'macOS'
run: |
- brew install bison flex ${INSTALL_MEMCACHED}
+ brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
brew services stop memcached || true
echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
- name: Build memcached
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
- run: make -C build -j2 all
+ run: cmake --build build -j2
- name: Test
- run: make -C build -j2 test
+ run: cmake --build build -j2 --target test
- name: Install
- run: make -C build -j2 install DESTDIR=/tmp
- - name: Package
- if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
- run: make -C build package
+ run: cmake --build build -j2 --target install -- DESTDIR=/tmp
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
+ - name: Package
+ env:
+ PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+ if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+ run: |
+ cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake -DCPACK_COMPONENT_INSTALL=ON build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake --build build -j2 --target push-artifacts -- VERBOSE=
- name: Notify Gitter (success)
if: ${{ success() }}
run: |
--data-urlencode "level=error" \
--data-urlencode "message=Github [${GITHUB_REPOSITORY}](https://github.com/${GITHUB_REPOSITORY}/commits/${REF}) (${REF}) [failure](https://github.com/m6w6/libmemcached/actions/runs/${GITHUB_RUN_ID}) (${ImageOS}/${CC:-${CC_VND}-${CC_VER}})"
- # mac build
+ # mac debug
dbg-mac:
- name: dbg-mac (macos-10.15, clang, apple)
+ name: dbg-mac (macos-10.15, clang, cur)
runs-on: macos-10.15 #
env:
- CFLAGS: -O0 --coverage
- CXXFLAGS: -O0 --coverage
- OS_VND: macOS
- OS_VER: macos-10.15 #
- CC_VND: clang #
- CC_VER: apple #
+ CMAKE_BUILD_TYPE: "Debug"
+ ENABLE_SASL: "OFF"
+ BUILD_TESTING: "ON"
+ VERBOSE: "ON"
+ CFLAGS: "-O0 --coverage"
+ CXXFLAGS: "-O0 --coverage"
+ OS_VND: macOS #
+ OS_VER: macos-10.15 #
+ CC_VND: clang #
+ CC_VER: cur #
+ #
continue-on-error: true
steps:
- uses: actions/checkout@v2
libevent-dev \
libsasl2-dev \
libtbb-dev \
+ python3-m2r \
+ python3-sphinx \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Install dependencies (Mac)
if: runner.os == 'macOS'
run: |
- brew install bison flex ${INSTALL_MEMCACHED}
+ brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
brew services stop memcached || true
echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
- name: Build memcached
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
- run: make -C build -j2 all
+ run: cmake --build build -j2
- name: Test
- run: make -C build -j2 test
+ run: cmake --build build -j2 --target test
- name: Install
- run: make -C build -j2 install DESTDIR=/tmp
- - name: Package
- if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
- run: make -C build package
+ run: cmake --build build -j2 --target install -- DESTDIR=/tmp
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
+ - name: Package
+ env:
+ PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+ if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+ run: |
+ cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake -DCPACK_COMPONENT_INSTALL=ON build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake --build build -j2 --target push-artifacts -- VERBOSE=
- name: Notify Gitter (success)
if: ${{ success() }}
run: |
--data-urlencode "message=Github [${GITHUB_REPOSITORY}](https://github.com/${GITHUB_REPOSITORY}/commits/${REF}) (${REF}) [failure](https://github.com/m6w6/libmemcached/actions/runs/${GITHUB_RUN_ID}) (${ImageOS}/${CC:-${CC_VND}-${CC_VER}})"
- uses: codecov/codecov-action@v1.0.13
+ # mac release
+ rel-mac:
+ name: rel-mac (macos-10.15, clang, cur)
+ runs-on: macos-10.15 #
+ env:
+ ENABLE_SASL: "OFF"
+ BUILD_DOCS_MANGZ: "ON"
+ OS_VND: macOS #
+ OS_VER: macos-10.15 #
+ CC_VND: clang #
+ CC_VER: cur #
+ continue-on-error: true
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install dependencies (Linux)
+ if: runner.os == 'Linux'
+ run: |
+ sudo apt-get install \
+ libevent-dev \
+ libsasl2-dev \
+ libtbb-dev \
+ python3-m2r \
+ python3-sphinx \
+ ${INSTALL_MEMCACHED} \
+ ${INSTALL_CC} ${INSTALL_CXX}
+ sudo systemctl stop memcached || true
+ - name: Install dependencies (Mac)
+ if: runner.os == 'macOS'
+ run: |
+ brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
+ brew services stop memcached || true
+ echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
+ - name: Build memcached
+ run: |
+ if test -d memcached
+ then
+ cd memcached
+ ./autogen.sh
+ ./configure CFLAGS="-O2 -pipe" \
+ --prefix=${MEMCACHED_PREFIX} \
+ --enable-sasl \
+ --enable-sasl-pwdb \
+ --disable-coverage \
+ --disable-dependency-tracking \
+ --disable-docs \
+ --disable-extstore \
+ --disable-option-checking \
+ ;
+ make -j2
+ make install
+ cd ..
+ echo MEMCACHED_BINARY="${MEMCACHED_PREFIX}/bin/memcached" >> ${GITHUB_ENV}
+ fi
+ - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
+ run: cmake -S . -B build
+ - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
+ run: cmake --build build -j2
+ - name: Test
+ run: cmake --build build -j2 --target test
+ - name: Install
+ run: cmake --build build -j2 --target install -- DESTDIR=/tmp
+ - name: Failed tests log
+ if: ${{ failure() }}
+ run: cat build/Testing/Temporary/LastTest.log || true
+ - name: Package
+ env:
+ PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+ if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+ run: |
+ cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake -DCPACK_COMPONENT_INSTALL=ON build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake --build build -j2 --target push-artifacts -- VERBOSE=
+ - name: Notify Gitter (success)
+ if: ${{ success() }}
+ run: |
+ REF=$(basename ${GITHUB_REF})
+ curl -sS "${{ secrets.GITTER }}" \
+ --data-urlencode "level=info" \
+ --data-urlencode "message=Github [${GITHUB_REPOSITORY}](https://github.com/${GITHUB_REPOSITORY}/commits/${REF}) (${REF}) [success](https://github.com/m6w6/libmemcached/actions/runs/${GITHUB_RUN_ID}) (${ImageOS}/${CC:-${CC_VND}-${CC_VER}})"
+ - name: Notify Gitter (failure)
+ if: ${{ failure() }}
+ run: |
+ REF=$(basename ${GITHUB_REF})
+ curl -sS "${{ secrets.GITTER }}" \
+ --data-urlencode "level=error" \
+ --data-urlencode "message=Github [${GITHUB_REPOSITORY}](https://github.com/${GITHUB_REPOSITORY}/commits/${REF}) (${REF}) [failure](https://github.com/m6w6/libmemcached/actions/runs/${GITHUB_RUN_ID}) (${ImageOS}/${CC:-${CC_VND}-${CC_VER}})"
+
# win build
win-msvc:
name: win-msvc (windows-2019, msvc, cur)
runs-on: windows-2019 #
env:
- CMAKE_BUILD_TYPE: Release
- BUILD_TESTING: "OFF"
+ ENABLE_SASL: "OFF"
BISON_ROOT: "C:/msys64/usr"
FLEX_ROOT: "C:/msys64/usr"
- OS_VND: Windows
- OS_VER: windows-2019 #
- CC_VND: msvc #
- CC_VER: cur #
+ OS_VND: Windows #
+ OS_VER: windows-2019 #
+ CC_VND: msvc #
+ CC_VER: cur #
continue-on-error: true
+ defaults:
+ run:
+ shell: msys2 {0}
steps:
- uses: actions/checkout@v2
+ - uses: msys2/setup-msys2@v2
+ with:
+ release: false
+ path-type: inherit
+ install: >-
+ rsync
+ openssh
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake --config ${{ env.CMAKE_BUILD_TYPE }} -S . -B build
- name: Build all with ${{ env.CC_VND }}
- name: Install
run: cmake --install build --prefix installed --config ${{ env.CMAKE_BUILD_TYPE }}
- name: Package
- run: cmake -E chdir build cpack
+ env:
+ PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+ run: |
+ cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --target package
+ cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --target push-artifacts
# release builds
release:
runs-on: ${{ matrix.os_ver }}
continue-on-error: ${{ matrix.cc_vnd == 'clang' }}
env:
- CMAKE_BUILD_TYPE: Release
+ BUILD_DOCS_MANGZ: "ON"
OS_VND: Linux
OS_VER: ${{ matrix.os_ver }}
CC_VND: ${{ matrix.cc_vnd }}
libevent-dev \
libsasl2-dev \
libtbb-dev \
+ python3-m2r \
+ python3-sphinx \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Install dependencies (Mac)
if: runner.os == 'macOS'
run: |
- brew install bison flex ${INSTALL_MEMCACHED}
+ brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
brew services stop memcached || true
echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
- name: Build memcached
- name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
run: cmake -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
- run: make -C build -j2 all
+ run: cmake --build build -j2
- name: Test
- run: make -C build -j2 test
+ run: cmake --build build -j2 --target test
- name: Install
- run: make -C build -j2 install DESTDIR=/tmp
- - name: Package
- if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
- run: make -C build package
+ run: cmake --build build -j2 --target install -- DESTDIR=/tmp
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
+ - name: Package
+ env:
+ PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+ if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+ run: |
+ cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake -DCPACK_COMPONENT_INSTALL=ON build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake --build build -j2 --target push-artifacts -- VERBOSE=
- name: Notify Gitter (success)
if: ${{ success() }}
run: |
endif()
endif()
+if(BUILD_DOCS_MANGZ)
+ set(BUILD_DOCS_MAN ON)
+endif()
+if(BUILD_DOCS_MAN OR BUILD_DOCS_HTML)
+ set(BUILD_DOCS ON)
+endif()
if(BUILD_DOCS)
set(SPHINX_OPTIONS ""
CACHE STRING "additional sphinx-build command line options")
VERSION "${LIBMEMCACHED_VERSION}"
DESCRIPTION "libmemcached, a C/C++ memcached client library"
)
-set(CMAKE_PROJECT_HOMEPAGE_URL "https://github.com/m6w6/libmemcached")
+set(PROJECT_HOMEPAGE_URL "https://github.com/m6w6/libmemcached")
set(PROJECT_CONTACT "Michael Wallner <mike@php.net>")
set(CXX_STANDARD 11)
configure_file(${CONFIGURE_FILE_IN} ${CONFIGURE_FILE_OUT} @ONLY)
endif()
+list(APPEND PROJECT_CONFIG ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR})
+list(APPEND PROJECT_CONFIG ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION})
+list(APPEND PROJECT_CONFIG ${CMAKE_BUILD_TYPE})
+
include(CPack.txt)
install(FILES
# default options
+set(CPACK_ARCHIVE_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
+set(CPACK_SOURCE_IGNORE_FILES "/[.]git/;/[.](idea|settings|c?project);~$;[.]log$;[.]bak$")
+
macro(cpack_include_if GENERATOR)
message(STATUS "Checking ${GENERATOR} package configuration ...")
- if(EXISTS ${CMAKE_SOURCE_DIR}/CPack${GENERATOR}.txt)
- message(STATUS " Sourcing ${CMAKE_SOURCE_DIR}/CPack${GENERATOR}.txt")
- include(${CMAKE_SOURCE_DIR}/CPack${GENERATOR}.txt)
- elseif(EXISTS ${CMAKE_BINARY_DIR}/CPack${GENERATOR}.txt)
- message(STATUS " Sourcing ${CMAKE_BINARY_DIR}/CPack${GENERATOR}.txt")
- include(${CMAKE_BINARY_DIR}/CPack${GENERATOR}.txt)
+ if(EXISTS ${CMAKE_SOURCE_DIR}/CPack/${GENERATOR}.txt)
+ include(${CMAKE_SOURCE_DIR}/CPack/${GENERATOR}.txt)
endif()
endmacro()
memcached server (http://memcached.org/). It has been designed to be
light on memory usage, thread safe, and provide full access to server
side methods.")
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
-#set(CPACK_PACKAGE_CHECKSUM SHA1)
+list(JOIN PROJECT_CONFIG "-" CPACK_PACKAGE_DIRECTORY)
+set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}/${PROJECT_VERSION}")
+set(CPACK_PACKAGE_CHECKSUM SHA1)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_CHANGELOG_FILE "${CMAKE_SOURCE_DIR}/ChangeLog-1.1.md")
-set(CPACK_SOURCE_IGNORE_FILES "/[.]git/;/[.](idea|settings|c?project);~$;[.]log$;[.]bak$")
-set(CPACK_PACKAGE_FILE_NAME
- "${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
-
-set(CPACK_ARCHIVE_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
-set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME lib)
+execute_process(
+ COMMAND git describe --tags --match [0-9]*.*
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ OUTPUT_VARIABLE PROJECT_TAG
+ ERROR_VARIABLE IGNORED
+)
+string(STRIP "${PROJECT_TAG}" PROJECT_TAG)
+if(PROJECT_TAG)
+ set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_TAG})
+else()
+ set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION})
+endif()
# dependencies
if(HAVE_LIBSASL)
string(APPEND CPACK_PACKAGE_DEPENDS " libevent")
endif()
-
# DEBs
-if(EXISTS /usr/bin/dpkg)
+find_program(DPKG dpkg)
+if(DPKG)
cpack_include_if(DEB)
endif()
-if(APPLE)
-endif()
-
+# WIN
if(WIN32)
cpack_include_if(NSIS)
endif()
-# BSDs
-if(CMAKE_SYSTEM_NAME MATCHES BSD)
- cpack_include_if(BSD)
-endif()
-
# RPMs
-if(EXISTS /usr/bin/dnf OR EXISTS /usr/bin/yum OR EXISTS /usr/bin/rpmbuild)
+find_program(RPMBUILD rpmbuild)
+if(RPMBUILD)
cpack_include_if(RPM)
endif()
# keep last
include(CPack)
+
+add_custom_target(push-artifacts
+ COMMAND ${CMAKE_SOURCE_DIR}/scripts/push-artifacts.sh
+ ${CPACK_PACKAGE_DIRECTORY}/${PROJECT_NAME}-*
+ WORKING_DIRECTORY ${CPACK_BINARY_DIR}
+ )
+
--- /dev/null
+set(CPACK_BINARY_DEB ON)
+set(CPACK_DEB_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
+set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
+set(CPACK_COMPONENT_bin_DEPENDS lib)
+set(CPACK_COMPONENT_dev_DEPENDS lib)
--- /dev/null
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}\\\\${PROJECT_VERSION}")
+set(CPACK_NSIS_MODIFY_PATH ON)
+set(CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
+set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}")
+set(CPACK_NSIS_HELP_LINK "${PROJECT_HOMEPAGE_URL}")
--- /dev/null
+set(CPACK_BINARY_RPM ON)
+set(CPACK_RPM_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
+set(CPACK_RPM_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
+set(CPACK_RPM_PACKAGE_LICENSE "${CPACK_PACKAGE_LICENSE}")
+#set(CPACK_RPM_CHANGELOG_FILE "${CPACK_CHANGELOG_FILE}")
+set(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
+set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
+++ /dev/null
-set(CPACK_BINARY_DEB ON)
-set(CPACK_DEB_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
-set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
-set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
-set(CPACK_COMPONENT_bin_DEPENDS lib)
-set(CPACK_COMPONENT_dev_DEPENDS lib)
+++ /dev/null
-set(CPACK_BINARY_FREEBSD ON)
-set(CPACK_FREEBSD_PACKAGE_LICENSE "${CPACK_PACKAGE_LICENSE}")
+++ /dev/null
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}\\\\${CMAKE_PROJECT_VERSION}")
-set(CPACK_NSIS_MODIFY_PATH ON)
-set(CPACK_NSIS_DISPLAY_NAME "${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}")
-set(CPACK_NSIS_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
-set(CPACK_NSIS_HELP_LINK "${CMAKE_PROJECT_HOMEPAGE_URL}")
+++ /dev/null
-set(CPACK_BINARY_RPM ON)
-set(CPACK_RPM_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
-set(CPACK_RPM_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
-set(CPACK_RPM_PACKAGE_LICENSE "${CPACK_PACKAGE_LICENSE}")
-#set(CPACK_RPM_CHANGELOG_FILE "${CPACK_CHANGELOG_FILE}")
-set(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
-set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
--- /dev/null
+StrictHostKeyChecking no
+UserKnownHostsFile /dev/null
+User artifacts
+Port 2
+HostName artifacts.m6w6.name
+IdentityFile ~/.ssh/id_ed25519
+IdentityFile push-artifacts.id
+
--- /dev/null
+#!/bin/bash
+# push artifacts to https://artifacts.m6w6.name/libmemcached/
+
+if test -n "$PUSH_ARTIFACTS_ID"
+then
+ echo "$PUSH_ARTIFACTS_ID" > push-artifacts.id
+fi
+
+RSYNC_CONF=$(dirname $0)/push-artifacts.conf
+rsync -RPae "ssh -F $RSYNC_CONF" "$@" m6w6.name::artifacts/libmemcached/