more cleanup
[m6w6/libmemcached] / .github / workflows / cmake-build-ci.gen
index c6bd81fb3b90af74847c4660719b91900dcfa2f7..d7f7679edcd6e405a73bccaf56ab066683a988c7 100755 (executable)
@@ -123,6 +123,7 @@ function steps_getdeps() {
           sudo apt-get install \
             libevent-dev \
             libsasl2-dev \
+            libtbb-dev \
             ${INSTALL_MEMCACHED} \
             ${INSTALL_CC} ${INSTALL_CXX}
           sudo systemctl stop memcached || true
@@ -165,17 +166,37 @@ function steps_build() {
       - 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
 <?php
 }
 
+function steps_notify() {
+?>
+      - 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}})"
+<?php
+}
+
 function steps($splat_map = null) {
   steps_setenv($splat_map);
   steps_getdeps();
   steps_build();
+  steps_notify();
 }
 
 function defaults() {
@@ -188,14 +209,14 @@ function defaults() {
 name: cmake-build-ci
 on:
   push:
-    paths-ignore:
-      - "docs/**"
-      - ".travis.yml"
-      - ".cirrus.yml"
+    paths:
+      - "include/**"
+      - "src/**"
+      - "test/**"
+      - "CMake*"
+      - ".github/workflows/cmake-build-ci*"
     branches-ignore:
       - gh-pages
-      - catch
-      - v1.x
   pull_request:
     branches:
       - master
@@ -224,6 +245,8 @@ jobs:
       INSTALL_MEMCACHED:
       MEMCACHED_PREFIX: /tmp
       ENABLE_SASL:      "ON"
+      CFLAGS:           "-O0 --coverage"
+      CXXFLAGS:         "-O0 --coverage"
     steps:
       - uses: actions/checkout@v2
       - uses: actions/checkout@v2
@@ -232,6 +255,7 @@ jobs:
           path: memcached
           ref: 1.6.7
 <?php steps(); ?>
+      - uses: codecov/codecov-action@v1.0.13
 
   # sanitizer build
   dbg-san:
@@ -243,26 +267,32 @@ jobs:
       - uses: actions/checkout@v2
 <?php steps(); ?>
 
-  # coverage build
-  dbg-cov:
-    name: dbg-cov (<?=defaults()?>)
+  # thread sanitizer build
+  dbg-tsan:
+    name: dbg-tsan (<?=defaults()?>)
     runs-on: <?=DEF[DEF["os"]]?> #
     env:
-      CFLAGS: -O0 --coverage
-      CXXFLAGS: -O0 --coverage
+      ENABLE_SANITIZERS:  "thread"
     steps:
       - uses: actions/checkout@v2
 <?php steps(); ?>
-      - uses: codecov/codecov-action@v1.0.13
 
   # mac build
   dbg-mac:
     name: dbg-mac (<?=DEF["macOS"]?>, <?=DEF[DEF["macOS"]]?>, <?=DEF[DEF[DEF["macOS"]]]["ver"]?>)
     runs-on: <?=DEF["macOS"]?> #
+    env:
+      CFLAGS:   -O0 --coverage
+      CXXFLAGS: -O0 --coverage
+      OS_VND:   macOS
+      OS_VER:   <?=DEF["macOS"]?> #
+      CC_VND:   <?=DEF[DEF["macOS"]]?> #
+      CC_VER:   <?=DEF[DEF[DEF["macOS"]]]["ver"]?> #
     continue-on-error: true
     steps:
       - uses: actions/checkout@v2
 <?php steps(false); ?>
+      - uses: codecov/codecov-action@v1.0.13
 
   # release builds
   release: