'env.CC_VER' => [
"new" => "-9",
"cur" => "-8",
- // old => "-6.0" ### skip
+ "old" => "-6.0"
]
]
]
/**
* @var bool $splat_map false = no splat map, null = default splat map, true = full splat map
*/
-function steps($splat_map = null) {
+function steps_setenv($splat_map = null) {
if ($splat_map !== false) {
foreach (MAP as $os_is => $os_vers) {
foreach ($os_vers as $os_ver => $cc_vnds_) {
}
}
}
+}
+
+function steps_getdeps() {
?>
<?=PRE?> - name: Install dependencies
<?=PRE?> if: runner.os == 'Linux'
<?=PRE?> run: sudo apt-get install libevent-dev libsasl2-dev ${INSTALL_MEMCACHED} ${INSTALL_CC} ${INSTALL_CXX}
-<?=PRE?> - name: Generate build tree (${CMAKE_CONFIG_TYPE})
+<?php
+}
+
+function steps_build() {
+?>
+<?=PRE?> - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }})
<?=PRE?> run: cmake -S . -B build
-<?=PRE?> - name: Build all with ${CXX} ${CXXFLAGS}
+<?=PRE?> - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
<?=PRE?> run: make -C build -j2 all
<?=PRE?> - name: Test
<?=PRE?> run: make -C build -j2 test
<?php
}
+function steps($splat_map = null) {
+ steps_setenv($splat_map);
+ steps_getdeps();
+ steps_build();
+}
+
?>
name: cmake-build-ci
on:
INSTALL_MEMCACHED: memcached
CMAKE_CONFIG_TYPE: Debug
BUILD_TESTING: "ON"
- ENABLE_SASL: "ON"
+ ENABLE_SASL: "OFF"
ENABLE_HASH_HSIEH: "ON"
- ENABLE_DTRACE: "ON"
+ ENABLE_DTRACE: "OFF"
VERBOSE: "ON"
OS_VND: <?=DEF["os"]?> #
OS_VER: <?=DEF[DEF["os"]]?> #
# release builds
ci-rel:
strategy:
+ fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-18.04]
compiler_vendor: [gnu, clang]
repository: memcached/memcached
path: memcached
ref: 1.6.7
+<?php steps_setenv(); ?>
+<?php steps_getdeps(); ?>
- name: Build memcached
run: |
cd memcached
make -j2
make install
cd ..
-<?php steps(); ?>
+<?php steps_build(); ?>
INSTALL_MEMCACHED: memcached
CMAKE_CONFIG_TYPE: Debug
BUILD_TESTING: "ON"
- ENABLE_SASL: "ON"
+ ENABLE_SASL: "OFF"
ENABLE_HASH_HSIEH: "ON"
- ENABLE_DTRACE: "ON"
+ ENABLE_DTRACE: "OFF"
VERBOSE: "ON"
OS_VND: Linux #
OS_VER: ubuntu-20.04 #
# release builds
ci-rel:
strategy:
+ fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-18.04]
compiler_vendor: [gnu, clang]
run: |
echo CC=clang-8 >> ${GITHUB_ENV}
echo CXX=clang++-8 >> ${GITHUB_ENV}
+ - name: Prepare environment (for old clang on ubuntu-18.04)
+ if: (env.OS_VER=='ubuntu-18.04') && (env.CC_VND=='clang') && (env.CC_VER=='old')
+ run: |
+ echo CC=clang-6.0 >> ${GITHUB_ENV}
+ echo CXX=clang++-6.0 >> ${GITHUB_ENV}
- name: Install dependencies
if: runner.os == 'Linux'
run: sudo apt-get install libevent-dev libsasl2-dev ${INSTALL_MEMCACHED} ${INSTALL_CC} ${INSTALL_CXX}
- - name: Generate build tree (${CMAKE_CONFIG_TYPE})
+ - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }})
run: cmake -S . -B build
- - name: Build all with ${CXX} ${CXXFLAGS}
+ - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
run: make -C build -j2 all
- name: Test
run: make -C build -j2 test
- name: Install dependencies
if: runner.os == 'Linux'
run: sudo apt-get install libevent-dev libsasl2-dev ${INSTALL_MEMCACHED} ${INSTALL_CC} ${INSTALL_CXX}
- - name: Generate build tree (${CMAKE_CONFIG_TYPE})
+ - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }})
run: cmake -S . -B build
- - name: Build all with ${CXX} ${CXXFLAGS}
+ - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
run: make -C build -j2 all
- name: Test
run: make -C build -j2 test
- name: Install dependencies
if: runner.os == 'Linux'
run: sudo apt-get install libevent-dev libsasl2-dev ${INSTALL_MEMCACHED} ${INSTALL_CC} ${INSTALL_CXX}
- - name: Generate build tree (${CMAKE_CONFIG_TYPE})
+ - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }})
run: cmake -S . -B build
- - name: Build all with ${CXX} ${CXXFLAGS}
+ - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
run: make -C build -j2 all
- name: Test
run: make -C build -j2 test
repository: memcached/memcached
path: memcached
ref: 1.6.7
- - name: Build memcached
- run: |
- cd memcached
- ./autogen.sh
- ./configure CFLAGS="-O2 -pipe" --prefix=${MEMCACHED_PREFIX}
- make -j2
- make install
- cd ..
- name: Prepare environment (for cur gnu on ubuntu-20.04)
if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur')
run: |
- name: Install dependencies
if: runner.os == 'Linux'
run: sudo apt-get install libevent-dev libsasl2-dev ${INSTALL_MEMCACHED} ${INSTALL_CC} ${INSTALL_CXX}
- - name: Generate build tree (${CMAKE_CONFIG_TYPE})
+ - name: Build memcached
+ run: |
+ cd memcached
+ ./autogen.sh
+ ./configure CFLAGS="-O2 -pipe" --prefix=${MEMCACHED_PREFIX}
+ make -j2
+ make install
+ cd ..
+ - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }})
run: cmake -S . -B build
- - name: Build all with ${CXX} ${CXXFLAGS}
+ - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
run: make -C build -j2 all
- name: Test
run: make -C build -j2 test