jobs:
- # sanitizer
- debug-sanitizer:
- name: debug sanitizer
- runs-on: ubuntu-22.04 #
- strategy:
- matrix:
- sanitizer: ['address;undefined', 'thread']
- env:
- CMAKE_BUILD_TYPE: "Debug"
- BUILD_TESTING: "ON"
- VERBOSE: "ON"
- ENABLE_SANITIZERS: ${{ matrix.sanitizer }}
- steps:
- - uses: actions/checkout@v3
- - name: Prepare environment (for cur gnu on ubuntu-22.04)
- if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur')
- run: |
- echo CC="gcc-11" >> ${GITHUB_ENV}
- echo CXX="g++-11" >> ${GITHUB_ENV}
- - name: Install dependencies (Linux)
- if: runner.os == '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
- - 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
- - 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
- - 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
- - 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
- - name: Notify Gitter
- env:
- GITTER: ${{ secrets.GITTER }}
- if: (success() || failure()) && env.GITTER != ''
- run: bash .github/notify-gitter.sh ${{ job.status }}
-
# memcached
debug-memcached:
name: debug memcached
continue-on-error: true
strategy:
matrix:
- memcached: ['master', '1.6.17', '1.6.9', '1.5.22', '1.5.6']
+ memcached: ['master', '1.6.18', '1.6.17', '1.6.16']
env:
CMAKE_BUILD_TYPE: "Debug"
BUILD_TESTING: "ON"
GITTER: ${{ secrets.GITTER }}
if: (success() || failure()) && env.GITTER != ''
run: bash .github/notify-gitter.sh ${{ job.status }}
-
-# coverage linux
- debug-coverage-linux:
- name: debug coverage (ubuntu-22.04, gnu)
- runs-on: ubuntu-22.04 #
- env:
- CMAKE_BUILD_TYPE: "Debug"
- BUILD_TESTING: "ON"
- VERBOSE: "ON"
- CFLAGS: "-O0 --coverage"
- CXXFLAGS: "-O0 --coverage"
- INSTALL_MEMCACHED: ""
- MEMCACHED_PREFIX: "/tmp"
- ENABLE_SASL: "ON"
- steps:
- - uses: actions/checkout@v3
- - uses: actions/checkout@v3
- with:
- repository: memcached/memcached
- path: memcached
- ref: 1.6.7
- - name: Prepare environment (for cur gnu on ubuntu-22.04)
- if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur')
- run: |
- echo CC="gcc-11" >> ${GITHUB_ENV}
- echo CXX="g++-11" >> ${GITHUB_ENV}
- - name: Install dependencies (Linux)
- if: runner.os == '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
- - 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
- - 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
- - 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
- - 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
- - 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
-
-
- # coverage mac
- debug-coverage-mac:
- name: debug coverage (macos-12, clang)
- runs-on: macos-12 #
- env:
- CMAKE_BUILD_TYPE: "Debug"
- BUILD_TESTING: "ON"
- VERBOSE: "ON"
- CFLAGS: "-O0 --coverage"
- CXXFLAGS: "-O0 --coverage"
- OS_VND: macOS #
- OS_VER: macos-12 #
- 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 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 -j2
- 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 }} -j2
- - 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
- - 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
- - 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-12, macos-11, macos-10.15]
- runs-on: ${{ matrix.os_ver }}
- env:
- CMAKE_BUILD_TYPE: "Release"
- BUILD_DOCS_MANGZ: "ON"
- OS_VND: macOS #
- OS_VER: macos-12 #
- 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 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 -j2
- 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 }} -j2
- - 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
- - 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
- - name: Notify Gitter
- env:
- GITTER: ${{ secrets.GITTER }}
- if: (success() || failure()) && env.GITTER != ''
- run: bash .github/notify-gitter.sh ${{ job.status }}
-
- # windows release builds
- windows:
- name: release
- strategy:
- fail-fast: false
- matrix:
- os_ver: [windows-2022, windows-2019]
- cc_vnd: [msvc, mingw]
- cc_ver: [cur]
- runs-on: ${{ matrix.os_ver }}
- continue-on-error: true
- env:
- CMAKE_BUILD_TYPE: "Release"
- OS_VND: Windows
- OS_VER: ${{ matrix.os_ver }}
- CC_VND: ${{ matrix.cc_vnd }}
- CC_VER: ${{ matrix.cc_ver }}
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: Prepare environment (Windows)
- run: |
- echo "c:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- echo "c:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- - name: Prepare environment (for cur msvc on windows-2022)
- if: (env.OS_VER=='windows-2022') && (env.CC_VND=='msvc') && (env.CC_VER=='cur')
- run: |
- echo 'CMAKE_GENERATOR=Visual Studio 17 2022' | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- - name: Prepare environment (for cur mingw on windows-2022)
- if: (env.OS_VER=='windows-2022') && (env.CC_VND=='mingw') && (env.CC_VER=='cur')
- run: |
- echo 'CMAKE_GENERATOR=MinGW Makefiles' | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- - name: Prepare environment (for cur msvc on windows-2019)
- if: (env.OS_VER=='windows-2019') && (env.CC_VND=='msvc') && (env.CC_VER=='cur')
- run: |
- echo 'CMAKE_GENERATOR=Visual Studio 16 2019' | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- - name: Prepare environment (for cur mingw on windows-2019)
- if: (env.OS_VER=='windows-2019') && (env.CC_VND=='mingw') && (env.CC_VER=='cur')
- run: |
- echo 'CMAKE_GENERATOR=MinGW Makefiles' | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- - name: Install dependencies (Windows)
- if: runner.os == 'Windows'
- uses: msys2/setup-msys2@v2
- with:
- release: false
- path-type: inherit
- install: >-
- bison
- flex
- rsync
- openssh
- - 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
- - 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
- - 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
- - name: Notify Gitter
- env:
- GITTER: ${{ secrets.GITTER }}
- if: (success() || failure()) && env.GITTER != ''
- run: bash .github/notify-gitter.sh ${{ job.status }}
-
- # linux release builds
- release:
- strategy:
- fail-fast: false
- matrix:
- os_ver: [ubuntu-22.04, ubuntu-20.04]
- cc_vnd: [gnu, clang]
- cc_ver: [new, cur, old]
- 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 }}
- CC_VER: ${{ matrix.cc_ver }}
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: Prepare environment (for new gnu on ubuntu-22.04)
- if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='gnu') && (env.CC_VER=='new')
- run: |
- echo CC="gcc-12" >> ${GITHUB_ENV}
- echo CXX="g++-12" >> ${GITHUB_ENV}
- - name: Prepare environment (for cur gnu on ubuntu-22.04)
- if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='gnu') && (env.CC_VER=='cur')
- run: |
- echo CC="gcc-11" >> ${GITHUB_ENV}
- echo CXX="g++-11" >> ${GITHUB_ENV}
- - name: Prepare environment (for old gnu on ubuntu-22.04)
- if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='gnu') && (env.CC_VER=='old')
- run: |
- echo CC="gcc-10" >> ${GITHUB_ENV}
- echo CXX="g++-10" >> ${GITHUB_ENV}
- - name: Prepare environment (for new clang on ubuntu-22.04)
- if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='clang') && (env.CC_VER=='new')
- run: |
- echo CC="clang-14" >> ${GITHUB_ENV}
- echo CXX="clang++-14" >> ${GITHUB_ENV}
- echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
- echo INSTALL_CXX="libc++-14-dev libc++abi-14-dev" >> ${GITHUB_ENV}
- - name: Prepare environment (for cur clang on ubuntu-22.04)
- if: (env.OS_VER=='ubuntu-22.04') && (env.CC_VND=='clang') && (env.CC_VER=='cur')
- run: |
- echo CC="clang-13" >> ${GITHUB_ENV}
- echo CXX="clang++-13" >> ${GITHUB_ENV}
- echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
- echo INSTALL_CXX="libc++-13-dev libc++abi-13-dev" >> ${GITHUB_ENV}
- - name: Prepare environment (for new gnu on ubuntu-20.04)
- if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='gnu') && (env.CC_VER=='new')
- run: |
- echo CC="gcc-10" >> ${GITHUB_ENV}
- echo CXX="g++-10" >> ${GITHUB_ENV}
- - 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: |
- echo CC="gcc-9" >> ${GITHUB_ENV}
- echo CXX="g++-9" >> ${GITHUB_ENV}
- - name: Prepare environment (for new clang on ubuntu-20.04)
- if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='clang') && (env.CC_VER=='new')
- run: |
- echo CC="clang-12" >> ${GITHUB_ENV}
- echo CXX="clang++-12" >> ${GITHUB_ENV}
- echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
- echo INSTALL_CXX="libc++-12-dev libc++abi-12-dev" >> ${GITHUB_ENV}
- - name: Prepare environment (for cur clang on ubuntu-20.04)
- if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='clang') && (env.CC_VER=='cur')
- run: |
- echo CC="clang-11" >> ${GITHUB_ENV}
- echo CXX="clang++-11" >> ${GITHUB_ENV}
- echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
- echo INSTALL_CXX="libc++-11-dev libc++abi-11-dev" >> ${GITHUB_ENV}
- - name: Prepare environment (for old clang on ubuntu-20.04)
- if: (env.OS_VER=='ubuntu-20.04') && (env.CC_VND=='clang') && (env.CC_VER=='old')
- run: |
- echo CC="clang-10" >> ${GITHUB_ENV}
- echo CXX="clang++-10" >> ${GITHUB_ENV}
- echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
- echo INSTALL_CXX="libc++-10-dev libc++abi-10-dev" >> ${GITHUB_ENV}
- - name: Install dependencies (Linux)
- if: runner.os == '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
- - 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
- - 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
- - 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
- - 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
- - name: Notify Gitter
- env:
- GITTER: ${{ secrets.GITTER }}
- if: (success() || failure()) && env.GITTER != ''
- run: bash .github/notify-gitter.sh ${{ job.status }}