testing: tsan
[m6w6/libmemcached] / .github / workflows / cmake-build-ci.yml
index b45102c117484a7708abf3047406b641a80ad9e7..43e2fbe452a4e477df1184e27282b8cfb6eb0755 100644 (file)
@@ -2,10 +2,12 @@
 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
   pull_request:
@@ -36,6 +38,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
@@ -54,6 +58,7 @@ jobs:
           sudo apt-get install \
             libevent-dev \
             libsasl2-dev \
+            libtbb-dev \
             ${INSTALL_MEMCACHED} \
             ${INSTALL_CC} ${INSTALL_CXX}
           sudo systemctl stop memcached || true
@@ -91,10 +96,25 @@ jobs:
       - 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:
@@ -115,6 +135,7 @@ jobs:
           sudo apt-get install \
             libevent-dev \
             libsasl2-dev \
+            libtbb-dev \
             ${INSTALL_MEMCACHED} \
             ${INSTALL_CC} ${INSTALL_CXX}
           sudo systemctl stop memcached || true
@@ -152,18 +173,32 @@ jobs:
       - 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"
+      ENABLE_MEMASLAP:    "OFF"
     steps:
       - uses: actions/checkout@v2
       - name: Prepare environment (for cur gnu on ubuntu-20.04)
@@ -177,6 +212,7 @@ jobs:
           sudo apt-get install \
             libevent-dev \
             libsasl2-dev \
+            libtbb-dev \
             ${INSTALL_MEMCACHED} \
             ${INSTALL_CC} ${INSTALL_CXX}
           sudo systemctl stop memcached || true
@@ -214,16 +250,36 @@ jobs:
       - 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
+      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
@@ -233,6 +289,7 @@ jobs:
           sudo apt-get install \
             libevent-dev \
             libsasl2-dev \
+            libtbb-dev \
             ${INSTALL_MEMCACHED} \
             ${INSTALL_CC} ${INSTALL_CXX}
           sudo systemctl stop memcached || true
@@ -270,10 +327,25 @@ jobs:
       - 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
 
   # release builds
   release:
@@ -362,6 +434,7 @@ jobs:
           sudo apt-get install \
             libevent-dev \
             libsasl2-dev \
+            libtbb-dev \
             ${INSTALL_MEMCACHED} \
             ${INSTALL_CC} ${INSTALL_CXX}
           sudo systemctl stop memcached || true
@@ -399,7 +472,21 @@ jobs:
       - 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}})"