name: cmake-build-ci
on:
push:
- paths-ignore:
- - "docs/**"
- - ".travis.yml"
- - ".cirrus.yml"
- - ".github/workflows/docs*"
+ paths:
+ - "include/**"
+ - "src/**"
+ - "test/**"
+ - "CMake*"
+ - ".github/workflows/cmake-build-ci*"
branches-ignore:
- gh-pages
pull_request:
INSTALL_MEMCACHED:
MEMCACHED_PREFIX: /tmp
ENABLE_SASL: "ON"
+ CFLAGS: "-O0 --coverage"
+ CXXFLAGS: "-O0 --coverage"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
sudo apt-get install \
libevent-dev \
libsasl2-dev \
+ libtbb-dev \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Test
run: make -C build -j2 test
- name: Install
- run: make -C build -j2 install DESTDIR=.
+ run: make -C build -j2 install DESTDIR=/tmp
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
+ - 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}})"
+ - uses: codecov/codecov-action@v1.0.13
# sanitizer build
dbg-san:
sudo apt-get install \
libevent-dev \
libsasl2-dev \
+ libtbb-dev \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Test
run: make -C build -j2 test
- name: Install
- run: make -C build -j2 install DESTDIR=.
+ run: make -C build -j2 install DESTDIR=/tmp
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
+ - 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}})"
- # coverage build
- dbg-cov:
- name: dbg-cov (ubuntu-20.04, gnu, cur)
+ # thread sanitizer build
+ dbg-tsan:
+ name: dbg-tsan (ubuntu-20.04, gnu, cur)
runs-on: ubuntu-20.04 #
env:
- CFLAGS: -O0 --coverage
- CXXFLAGS: -O0 --coverage
+ ENABLE_SANITIZERS: "thread"
steps:
- uses: actions/checkout@v2
- name: Prepare environment (for cur gnu on ubuntu-20.04)
sudo apt-get install \
libevent-dev \
libsasl2-dev \
+ libtbb-dev \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Test
run: make -C build -j2 test
- name: Install
- run: make -C build -j2 install DESTDIR=.
+ run: make -C build -j2 install DESTDIR=/tmp
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
- - uses: codecov/codecov-action@v1.0.13
+ - 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}})"
# mac build
dbg-mac:
name: dbg-mac (macos-10.15, clang, apple)
runs-on: macos-10.15 #
env:
- CFLAGS: -O0 --coverage
+ CFLAGS: -O0 --coverage
CXXFLAGS: -O0 --coverage
+ OS_VND: macOS
+ OS_VER: macos-10.15 #
+ CC_VND: clang #
+ CC_VER: apple #
continue-on-error: true
steps:
- uses: actions/checkout@v2
sudo apt-get install \
libevent-dev \
libsasl2-dev \
+ libtbb-dev \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Test
run: make -C build -j2 test
- name: Install
- run: make -C build -j2 install DESTDIR=.
+ run: make -C build -j2 install DESTDIR=/tmp
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
+ - 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}})"
- uses: codecov/codecov-action@v1.0.13
+ # win build
+ win-msvc:
+ name: win-msvc (windows-2019, msvc, cur)
+ runs-on: windows-2019 #
+ env:
+ CMAKE_BUILD_TYPE: Release
+ BUILD_TESTING: "OFF"
+ BISON_ROOT: "C:/msys64/usr"
+ FLEX_ROOT: "C:/msys64/usr"
+ OS_VND: Windows
+ OS_VER: windows-2019 #
+ CC_VND: msvc #
+ CC_VER: cur #
+ continue-on-error: true
+ steps:
+ - uses: actions/checkout@v2
+ - 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 }}
+ run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }}
+ - name: Install
+ run: cmake --install build --prefix installed --config ${{ env.CMAKE_BUILD_TYPE }}
+
# release builds
release:
strategy:
echo CC="clang-6.0" >> ${GITHUB_ENV}
echo CXX="clang++-6.0" >> ${GITHUB_ENV}
echo CXXFLAGS="-stdlib=libc++" >> ${GITHUB_ENV}
+ - 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 CC="msvc2019" >> ${GITHUB_ENV}
+ echo CXX="msvc2019" >> ${GITHUB_ENV}
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get install \
libevent-dev \
libsasl2-dev \
+ libtbb-dev \
${INSTALL_MEMCACHED} \
${INSTALL_CC} ${INSTALL_CXX}
sudo systemctl stop memcached || true
- name: Test
run: make -C build -j2 test
- name: Install
- run: make -C build -j2 install DESTDIR=.
+ run: make -C build -j2 install DESTDIR=/tmp
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
+ - 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}})"