+}
+
+function steps_getdeps($os_vnd) {
+?>
+ - name: Install dependencies (<?=$os_vnd?>)
+ if: runner.os == '<?=$os_vnd?>'
+<?php
+ if ($os_vnd === "Linux") :
+?>
+ run: |
+ sudo apt-get update -y
+ sudo apt-get install -my \
+ libevent-dev \
+ libsasl2-dev \
+ libtbb-dev \
+ python3-sphinx \
+ ${INSTALL_MEMCACHED} \
+ ${INSTALL_CC} ${INSTALL_CXX}
+ sudo systemctl stop memcached || true
+<?php
+ endif;
+ if ($os_vnd === "macOS") :
+?>
+ run: |
+ brew install bison flex libevent pkg-config sphinx-doc ${INSTALL_MEMCACHED}
+ brew services stop memcached || true
+ echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
+<?php
+ endif;
+ if ($os_vnd === "Windows") :
+?>
+ uses: msys2/setup-msys2@v2
+ with:
+ release: false
+ path-type: inherit
+ install: >-
+ bison
+ flex
+ rsync
+ openssh
+<?php
+ endif;
+ if ($os_vnd != "Windows") :
+?>
+ - 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 -j2
+ make install
+ cd ..
+ echo MEMCACHED_BINARY="${MEMCACHED_PREFIX}/bin/memcached" >> ${GITHUB_ENV}
+ fi
+<?php
+ endif;
+}
+
+function steps_build() {
+?>
+ - 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 }} -j2
+<?php
+}
+
+function steps_test() {
+?>
+ - name: Test
+ if: env.BUILD_TESTING == 'ON'
+ run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --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
+<?php
+}
+
+function steps_package() {
+?>
+ - 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 }} -j2 --target package
+ cmake -DCPACK_COMPONENT_INSTALL=ON build
+ cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target package
+ cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target push-artifacts
+<?php
+}
+
+function steps_notify($os_vnd) {