- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
- sudo apt-get install \
+ sudo apt-get install -my \
libevent-dev \
libsasl2-dev \
libtbb-dev \
- python3-m2r \
python3-sphinx \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
run: cmake -S . -B build
- name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
run: cmake --build build -j2
+<?php
+}
+
+function steps_test() {
+?>
- name: Test
- run: cmake --build build -j2 --target test
- - name: Install
- run: cmake --build build -j2 --target install -- DESTDIR=/tmp
+ if: env.BUILD_TESTING == 'ON'
+ run: |
+ cmake --build build -j2 --target test
+ cmake --build build -j2 --target install -- DESTDIR=/tmp
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
steps_setenv($splat_map);
steps_getdeps();
steps_build();
+ steps_test();
steps_package();
steps_notify();
}
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"]?> #
+ OS_VND: <?=$os_vnd?> #
+ OS_VER: <?=DEF[$os_vnd]?> #
+ CC_VND: <?=DEF[DEF[$os_vnd]]?> #
+ CC_VER: <?=DEF[DEF[DEF[$os_vnd]]]["ver"]?> #
<?php
}
on:
push:
paths:
+ - "contrib/**"
- "include/**"
- "src/**"
- "test/**"
- "CMake*"
+ - "CPack*"
- ".github/workflows/cmake-build-ci*"
branches-ignore:
- gh-pages
env:
# defaults
INSTALL_MEMCACHED: memcached
- ENABLE_SASL: "ON"
+ ENABLE_SASL: "OFF" # ^ almost no memcached distribution package has built in sasl support
ENABLE_HASH_HSIEH: "ON"
ENABLE_DTRACE: "OFF"
OS_VND: <?=DEF["os"]?> #
CXXFLAGS: "-O0 --coverage"
INSTALL_MEMCACHED: ""
MEMCACHED_PREFIX: "/tmp"
+ ENABLE_SASL: "ON"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
runs-on: <?=DEF["macOS"]?> #
env:
CMAKE_BUILD_TYPE: "Debug"
- ENABLE_SASL: "OFF"
BUILD_TESTING: "ON"
VERBOSE: "ON"
CFLAGS: "-O0 --coverage"
name: rel-mac (<?=DEF["macOS"]?>, <?=DEF[DEF["macOS"]]?>, <?=DEF[DEF[DEF["macOS"]]]["ver"]?>)
runs-on: <?=DEF["macOS"]?> #
env:
- ENABLE_SASL: "OFF"
+ CMAKE_BUILD_TYPE: "Release"
BUILD_DOCS_MANGZ: "ON"
<?php env_override("macOS")?>
continue-on-error: true
steps:
- uses: actions/checkout@v2
+ with:
+ fetch-depth: 1000
<?php steps(false); ?>
# win build
name: win-msvc (<?=DEF["Windows"]?>, <?=DEF[DEF["Windows"]]?>, <?=DEF[DEF[DEF["Windows"]]]["ver"]?>)
runs-on: <?=DEF["Windows"]?> #
env:
- ENABLE_SASL: "OFF"
+ CMAKE_BUILD_TYPE: "Release"
BISON_ROOT: "C:/msys64/usr"
FLEX_ROOT: "C:/msys64/usr"
<?php env_override("Windows")?>
continue-on-error: true
- defaults:
- run:
- shell: msys2 {0}
steps:
- uses: actions/checkout@v2
+ with:
+ fetch-depth: 1000
- uses: msys2/setup-msys2@v2
with:
release: false
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_VER: ${{ matrix.cc_ver }}
steps:
- uses: actions/checkout@v2
+ with:
+ fetch-depth: 1000
<?php steps(true); ?>