reorder jobs
[awesomized/libmemcached] / .github / workflows / cmake-build-ci.gen
index 93e06dd22da6c1ab3b528497bae2f837a97eeec2..feaa0f6ef34f92e8ea123ee7a1718f13f040a583 100755 (executable)
@@ -29,6 +29,14 @@ const APT = [
         "CXX" => "g++-10",
       ]
     ]
+  ],
+  "ubuntu-18.04" => [
+    "clang" => [
+      "old" => [
+        "CC" => "clang-7",
+        "CXX" => "clang-7"
+      ]
+    ]
   ]
 ];
 const MAP = [
@@ -64,7 +72,7 @@ const MAP = [
           'env.CC_VER' => [
             "new"  => "-9",
             "cur"  => "-8",
-            "old"  => "-6.0"
+            "old"  => "-7"
           ]
         ]
       ]
@@ -129,7 +137,7 @@ function steps_build() {
 <?=PRE?>   run: make -C build -j2 install DESTDIR=.
 <?=PRE?> - name: Failed tests log
 <?=PRE?>   if: ${{ failure() }}
-<?=PRE?>   run: cat build/Testing/Temporary/LastTest.log
+<?=PRE?>   run: cat build/Testing/Temporary/LastTest.log || true
 <?php
 }
 
@@ -141,15 +149,15 @@ function steps($splat_map = null) {
 
 ?>
 name: cmake-build-ci
-on: 
+on:
   push:
-    paths-ignore: 
+    paths-ignore:
       - "docs/**"
-    branches-ignore: 
+    branches-ignore:
       - gh-pages
       - v1.x
   pull_request:
-    branches: 
+    branches:
       - master
       - v1.x
 env:
@@ -167,60 +175,16 @@ env:
   CC_VER:   <?=DEF[DEF[DEF[DEF["os"]]]]["ver"]?> #
 
 jobs:
-  # release builds
-  ci-rel:
-    strategy:
-      fail-fast: false
-      matrix:
-        os_ver: [ubuntu-20.04, ubuntu-18.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
-      OS_VND: Linux
-      OS_VER: ${{ matrix.os_ver }}
-      CC_VND: ${{ matrix.cc_vnd }}
-      CC_VER: ${{ matrix.cc_ver }}
-    steps:
-      - uses: actions/checkout@v2
-<?php steps(true); ?>
 
-  # sanitizer build
-  ci-san:
-    runs-on: <?=DEF[DEF["os"]]?> #
-    env:
-      ENABLE_SANITIZERS: "address;undefined"
-    steps: 
-      - uses: actions/checkout@v2
-<?php steps(); ?>
-
-  # coverage build
-  ci-cov:
-    runs-on: <?=DEF[DEF["os"]]?> #
-    env:
-      CFLAGS: --coverage
-      CXXFLAGS: --coverage
-    steps: 
-      - uses: actions/checkout@v2
-<?php steps(); ?>
-      - uses: codecov/codecov-action@v1.0.13
-        with:
-          directory: build/src
-
-  # memcached new
+  # new memcached
   ci-new:
+    name: ci-dbg (<?=DEF[DEF["os"]]?> ${{ env.CC_VND }} ${{ env.CC_VER }} memcached-1.6)
     runs-on: <?=DEF[DEF["os"]]?> #
     env:
       INSTALL_MEMCACHED:
       MEMCACHED_PREFIX: /tmp
       MEMCACHED_BINARY: /tmp/bin/memcached
-      enable_sasl: yes
-      enable_sasl_pwdb: yes
-      enable_docs: no
-      enable_coverage: no
-      enable_dependency_tracking: no
+      ENABLE_SASL:      "ON"
     steps:
       - uses: actions/checkout@v2
       - uses: actions/checkout@v2
@@ -234,9 +198,56 @@ jobs:
         run: |
           cd memcached
           ./autogen.sh
-          ./configure CFLAGS="-O2 -pipe" --prefix=${MEMCACHED_PREFIX}
+          ./configure CFLAGS="-O2 -pipe" \
+            --prefix=${MEMCACHED_PREFIX} \
+            --enable-sasl \
+            --enable-sasl-pwdb \
+            --disable-docs \
+            --disable-coverage \
+            --disable-dependency-tracking
           make -j2
           make install
           cd ..
 <?php steps_build(); ?>
 
+  # sanitizer build
+  ci-san:
+    name: ci-dbg (<?=DEF[DEF["os"]]?> ${{ env.CC_VND }} ${{ env.CC_VER }} sanitizers)
+    runs-on: <?=DEF[DEF["os"]]?> #
+    env:
+      ENABLE_SANITIZERS: "address;undefined"
+    steps:
+      - uses: actions/checkout@v2
+<?php steps(); ?>
+
+  # coverage build
+  ci-cov:
+    name: ci-dbg (<?=DEF[DEF["os"]]?> ${{ env.CC_VND }} ${{ env.CC_VER }} coverage)
+    runs-on: <?=DEF[DEF["os"]]?> #
+    env:
+      CFLAGS: -O0 --coverage
+      CXXFLAGS: -O0 --coverage
+    steps:
+      - uses: actions/checkout@v2
+<?php steps(); ?>
+      - uses: codecov/codecov-action@v1.0.13
+
+  # release builds
+  ci-rel:
+    strategy:
+      fail-fast: false
+      matrix:
+        os_ver: [ubuntu-20.04, ubuntu-18.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
+      OS_VND: Linux
+      OS_VER: ${{ matrix.os_ver }}
+      CC_VND: ${{ matrix.cc_vnd }}
+      CC_VER: ${{ matrix.cc_ver }}
+    steps:
+      - uses: actions/checkout@v2
+<?php steps(true); ?>