cpack: artifacts
authorMichael Wallner <mike@php.net>
Wed, 16 Dec 2020 12:48:31 +0000 (13:48 +0100)
committerMichael Wallner <mike@php.net>
Wed, 16 Dec 2020 12:48:31 +0000 (13:48 +0100)
16 files changed:
.builds/freebsd.yml
.builds/openbsd.yml
.github/workflows/cmake-build-ci.gen
.github/workflows/cmake-build-ci.yml
CMakeConfig.txt
CMakeLists.txt
CPack.txt
CPack/DEB.txt [new file with mode: 0644]
CPack/NSIS.txt [new file with mode: 0644]
CPack/RPM.txt [new file with mode: 0644]
CPackDEB.txt [deleted file]
CPackFreeBSD.txt [deleted file]
CPackNSIS.txt [deleted file]
CPackRPM.txt [deleted file]
scripts/push-artifacts.conf [new file with mode: 0644]
scripts/push-artifacts.sh [new file with mode: 0755]

index 673843b8f29c56cbe8b797972668041a1c8bef48..1cf06ee8dc1f55aab8bb3b89650774d85b50bbc6 100644 (file)
@@ -7,12 +7,15 @@ packages:
   - flex
   - libevent
   - pkgconf
+  - py37-sphinx
+  - py37-m2r
+  - rsync
   - tbb
 sources:
   - https://github.com/m6w6/libmemcached
+secrets:
+  - 46f739e5-4538-45dd-a79f-bf173b7a2ed9
 environment:
-  CMAKE_BUILD_TYPE:   Debug
-  BUILD_TESTING:      "ON"
   ENABLE_HASH_HSIEH:  "ON"
   ENABLE_MEMASLAP:    "ON"
   ENABLE_SASL:        "ON"
@@ -31,11 +34,15 @@ tasks:
         OPTIONS_SET="SASL SASLPWDB" \
         OPTIONS_DEFINE="SASL SASLPWDB"
   - configure: |
-      cmake -S libmemcached -B build
+      cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -S libmemcached -B debug
   - build: |
-      make -C build -j2 all
+      cmake --build debug -j2
   - test: |
-      make -C build -j2 test/fast
+      cmake --build debug -j2 --target test
   - install: |
-      make -C build install DESTDIR=/tmp
+      cmake --build debug -j2 --target install -- DESTDIR=/tmp
+  - package: |
+      cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCS_MANGZ=ON -S libmemcached -B release
+      cmake --build release -j2 --target package -- VERBOSE=
+      cmake --build release -j2 --target push-artifact -- VERBOSE=
 
index fe2ebca919e1d643f3c1694c054c8eccfa27b036..d80bb0ac13b7364ac3f907d52e96b49b1aace81b 100644 (file)
@@ -6,24 +6,29 @@ packages:
   - libevent
   - memcached--
   - pkgconf
+  - py3-sphinx
+  - py3-m2r
+  - rsync
   - sudo--
   - tbb
 sources:
   - https://github.com/m6w6/libmemcached
 environment:
-  CMAKE_BUILD_TYPE:   Debug
-  BUILD_TESTING:      "ON"
   ENABLE_HASH_HSIEH:  "ON"
   ENABLE_MEMASLAP:    "OFF"
   VERBOSE:            "ON"
   MEMCACHED_BINARY:   "memcached"
 tasks:
   - configure: |
-      cmake -S libmemcached -B build
+      cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -S libmemcached -B debug
   - build: |
-      make -C build -j2 all
+      cmake --build debug -j2
   - test: |
-      make -C build -j2 test/fast
+      cmake --build debug -j2 --target test
   - install: |
-      make -C build install DESTDIR=/tmp
+      cmake --build debug -j2 --target install -- DESTDIR=/tmp
+  - package: |
+      cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCS_MANGZ=ON -S libmemcached -B release
+      cmake --build release -j2 --target package -- VERBOSE=
+      cmake --build release -j2 --target push-artifact -- VERBOSE=
 
index 3101dc78c07ab6bdf961e8fb702284753924a758..cdffbb111fba5c7ad880daff4d7806451336125a 100755 (executable)
@@ -17,7 +17,7 @@ const DEF = [
     "CXX"  => "g++",
   ],
   "clang" => [
-    "ver" => "apple",
+    "ver" => "cur",
     "CC"  => "clang",
     "CXX"  => "clang++",
   ],
@@ -140,13 +140,15 @@ function steps_getdeps() {
             libevent-dev \
             libsasl2-dev \
             libtbb-dev \
+            python3-m2r \
+            python3-sphinx \
             ${INSTALL_MEMCACHED} \
             ${INSTALL_CC} ${INSTALL_CXX}
           sudo systemctl stop memcached || true
       - name: Install dependencies (Mac)
         if: runner.os == 'macOS'
         run: |
-          brew install bison flex ${INSTALL_MEMCACHED}
+          brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
           brew services stop memcached || true
           echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
       - name: Build memcached
@@ -178,20 +180,32 @@ function steps_build() {
       - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
         run: cmake -S . -B build
       - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
-        run: make -C build -j2 all
+        run: cmake --build build -j2
       - name: Test
-        run: make -C build -j2 test
+        run: cmake --build build -j2 --target test
       - name: Install
-        run: make -C build -j2 install DESTDIR=/tmp
-      - name: Package
-        if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
-        run: make -C build package
+        run: cmake --build build -j2 --target install -- DESTDIR=/tmp
       - name: Failed tests log
         if: ${{ failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
 <?php
 }
 
+function steps_package() {
+?>
+      - name: Package
+        env:
+          PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+        if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+        run: |
+          cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake -DCPACK_COMPONENT_INSTALL=ON build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake --build build -j2 --target push-artifacts -- VERBOSE=
+<?php
+}
+
 function steps_notify() {
 ?>
       - name: Notify Gitter (success)
@@ -215,15 +229,26 @@ function steps($splat_map = null) {
   steps_setenv($splat_map);
   steps_getdeps();
   steps_build();
+  steps_package();
   steps_notify();
 }
 
-function defaults() {
-  $os_ver = DEF[DEF["os"]];
+function defaults($os_vnd = DEF["os"]) {
+  $os_ver = DEF[$os_vnd];
   $cc_vnd = DEF[$os_ver];
   $cc_ver = DEF[$cc_vnd]["ver"];
   return "$os_ver, $cc_vnd, $cc_ver";
 }
+
+function env_override($os_vnd) {
+?>
+        OS_VND:   <?=$os_vnd?> #
+        OS_VER:   <?=DEF[$os_vnd]?> #
+        CC_VND:   <?=DEF[DEF[$os_vnd]]?> #
+        CC_VER:   <?=DEF[DEF[DEF[$os_vnd]]]["ver"]?> #
+<?php
+}
+
 ?>
 name: cmake-build-ci
 on:
@@ -243,12 +268,9 @@ on:
 env:
   # defaults
   INSTALL_MEMCACHED:  memcached
-  CMAKE_BUILD_TYPE:   Debug
-  BUILD_TESTING:      "ON"
-  ENABLE_SASL:        "OFF"
+  ENABLE_SASL:        "ON"
   ENABLE_HASH_HSIEH:  "ON"
   ENABLE_DTRACE:      "OFF"
-  VERBOSE:            "ON"
   OS_VND:   <?=DEF["os"]?> #
   OS_VER:   <?=DEF[DEF["os"]]?> #
   CC_VND:   <?=DEF[DEF[DEF["os"]]]?> #
@@ -261,11 +283,13 @@ jobs:
     name: dbg-new (<?=defaults()?>)
     runs-on: <?=DEF[DEF["os"]]?> #
     env:
-      INSTALL_MEMCACHED:
-      MEMCACHED_PREFIX: /tmp
-      ENABLE_SASL:      "ON"
-      CFLAGS:           "-O0 --coverage"
-      CXXFLAGS:         "-O0 --coverage"
+      CMAKE_BUILD_TYPE:   "Debug"
+      BUILD_TESTING:      "ON"
+      VERBOSE:            "ON"
+      CFLAGS:             "-O0 --coverage"
+      CXXFLAGS:           "-O0 --coverage"
+      INSTALL_MEMCACHED:  ""
+      MEMCACHED_PREFIX:   "/tmp"
     steps:
       - uses: actions/checkout@v2
       - uses: actions/checkout@v2
@@ -281,7 +305,10 @@ jobs:
     name: dbg-san (<?=defaults()?>)
     runs-on: <?=DEF[DEF["os"]]?> #
     env:
-      ENABLE_SANITIZERS: "address;undefined"
+      CMAKE_BUILD_TYPE:   "Debug"
+      BUILD_TESTING:      "ON"
+      VERBOSE:            "ON"
+      ENABLE_SANITIZERS:  "address;undefined"
     steps:
       - uses: actions/checkout@v2
 <?php steps(); ?>
@@ -291,44 +318,67 @@ jobs:
     name: dbg-tsan (<?=defaults()?>)
     runs-on: <?=DEF[DEF["os"]]?> #
     env:
+      CMAKE_BUILD_TYPE:   "Debug"
+      BUILD_TESTING:      "ON"
+      VERBOSE:            "ON"
       ENABLE_SANITIZERS:  "thread"
     steps:
       - uses: actions/checkout@v2
 <?php steps(); ?>
 
-  # mac build
+  # mac debug
   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"]?> #
+      CMAKE_BUILD_TYPE:   "Debug"
+      ENABLE_SASL:        "OFF"
+      BUILD_TESTING:      "ON"
+      VERBOSE:            "ON"
+      CFLAGS:             "-O0 --coverage"
+      CXXFLAGS:           "-O0 --coverage"
+<?php env_override("macOS")?> #
     continue-on-error: true
     steps:
       - uses: actions/checkout@v2
 <?php steps(false); ?>
       - uses: codecov/codecov-action@v1.0.13
 
+  # mac release
+  rel-mac:
+    name: rel-mac (<?=DEF["macOS"]?>, <?=DEF[DEF["macOS"]]?>, <?=DEF[DEF[DEF["macOS"]]]["ver"]?>)
+    runs-on: <?=DEF["macOS"]?> #
+    env:
+      ENABLE_SASL:        "OFF"
+      BUILD_DOCS_MANGZ:   "ON"
+<?php env_override("macOS")?>
+    continue-on-error: true
+    steps:
+      - uses: actions/checkout@v2
+<?php steps(false); ?>
+
   # win build
   win-msvc:
     name: win-msvc (<?=DEF["Windows"]?>, <?=DEF[DEF["Windows"]]?>, <?=DEF[DEF[DEF["Windows"]]]["ver"]?>)
     runs-on: <?=DEF["Windows"]?> #
     env:
-      CMAKE_BUILD_TYPE: Release
-      BUILD_TESTING:    "OFF"
+      ENABLE_SASL:      "OFF"
       BISON_ROOT:       "C:/msys64/usr"
       FLEX_ROOT:        "C:/msys64/usr"
-      OS_VND: Windows
-      OS_VER: <?=DEF["Windows"]?> #
-      CC_VND: <?=DEF[DEF["Windows"]]?> #
-      CC_VER: <?=DEF[DEF[DEF["Windows"]]]["ver"]?> #
+<?php env_override("Windows")?>
     continue-on-error: true
+    defaults:
+      run:
+        shell: msys2 {0}
     steps:
       - uses: actions/checkout@v2
+      - uses: msys2/setup-msys2@v2
+        with:
+          release: false
+          path-type: inherit
+          install: >-
+            rsync
+            openssh
       - 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 }}
@@ -336,7 +386,11 @@ jobs:
       - name: Install
         run: cmake --install build --prefix installed --config ${{ env.CMAKE_BUILD_TYPE }}
       - name: Package
-        run: cmake -E chdir build cpack
+        env:
+          PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+        run: |
+          cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --target package
+          cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --target push-artifacts
 
   # release builds
   release:
@@ -349,7 +403,7 @@ jobs:
     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 }}
index 2e4009d5806204dfb6decb15030a3b94009cb67c..17e62b3e0c57ad596b8114410fbec0c60b0aa49a 100644 (file)
@@ -17,12 +17,9 @@ on:
 env:
   # defaults
   INSTALL_MEMCACHED:  memcached
-  CMAKE_BUILD_TYPE:   Debug
-  BUILD_TESTING:      "ON"
-  ENABLE_SASL:        "OFF"
+  ENABLE_SASL:        "ON"
   ENABLE_HASH_HSIEH:  "ON"
   ENABLE_DTRACE:      "OFF"
-  VERBOSE:            "ON"
   OS_VND:   Linux #
   OS_VER:   ubuntu-20.04 #
   CC_VND:   gnu #
@@ -35,11 +32,13 @@ jobs:
     name: dbg-new (ubuntu-20.04, gnu, cur)
     runs-on: ubuntu-20.04 #
     env:
-      INSTALL_MEMCACHED:
-      MEMCACHED_PREFIX: /tmp
-      ENABLE_SASL:      "ON"
-      CFLAGS:           "-O0 --coverage"
-      CXXFLAGS:         "-O0 --coverage"
+      CMAKE_BUILD_TYPE:   "Debug"
+      BUILD_TESTING:      "ON"
+      VERBOSE:            "ON"
+      CFLAGS:             "-O0 --coverage"
+      CXXFLAGS:           "-O0 --coverage"
+      INSTALL_MEMCACHED:  ""
+      MEMCACHED_PREFIX:   "/tmp"
     steps:
       - uses: actions/checkout@v2
       - uses: actions/checkout@v2
@@ -59,13 +58,15 @@ jobs:
             libevent-dev \
             libsasl2-dev \
             libtbb-dev \
+            python3-m2r \
+            python3-sphinx \
             ${INSTALL_MEMCACHED} \
             ${INSTALL_CC} ${INSTALL_CXX}
           sudo systemctl stop memcached || true
       - name: Install dependencies (Mac)
         if: runner.os == 'macOS'
         run: |
-          brew install bison flex ${INSTALL_MEMCACHED}
+          brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
           brew services stop memcached || true
           echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
       - name: Build memcached
@@ -92,17 +93,24 @@ jobs:
       - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
         run: cmake -S . -B build
       - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
-        run: make -C build -j2 all
+        run: cmake --build build -j2
       - name: Test
-        run: make -C build -j2 test
+        run: cmake --build build -j2 --target test
       - name: Install
-        run: make -C build -j2 install DESTDIR=/tmp
-      - name: Package
-        if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
-        run: make -C build package
+        run: cmake --build build -j2 --target install -- DESTDIR=/tmp
       - name: Failed tests log
         if: ${{ failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
+      - name: Package
+        env:
+          PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+        if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+        run: |
+          cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake -DCPACK_COMPONENT_INSTALL=ON build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake --build build -j2 --target push-artifacts -- VERBOSE=
       - name: Notify Gitter (success)
         if: ${{ success() }}
         run: |
@@ -124,7 +132,10 @@ jobs:
     name: dbg-san (ubuntu-20.04, gnu, cur)
     runs-on: ubuntu-20.04 #
     env:
-      ENABLE_SANITIZERS: "address;undefined"
+      CMAKE_BUILD_TYPE:   "Debug"
+      BUILD_TESTING:      "ON"
+      VERBOSE:            "ON"
+      ENABLE_SANITIZERS:  "address;undefined"
     steps:
       - uses: actions/checkout@v2
       - name: Prepare environment (for cur gnu on ubuntu-20.04)
@@ -139,13 +150,15 @@ jobs:
             libevent-dev \
             libsasl2-dev \
             libtbb-dev \
+            python3-m2r \
+            python3-sphinx \
             ${INSTALL_MEMCACHED} \
             ${INSTALL_CC} ${INSTALL_CXX}
           sudo systemctl stop memcached || true
       - name: Install dependencies (Mac)
         if: runner.os == 'macOS'
         run: |
-          brew install bison flex ${INSTALL_MEMCACHED}
+          brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
           brew services stop memcached || true
           echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
       - name: Build memcached
@@ -172,17 +185,24 @@ jobs:
       - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
         run: cmake -S . -B build
       - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
-        run: make -C build -j2 all
+        run: cmake --build build -j2
       - name: Test
-        run: make -C build -j2 test
+        run: cmake --build build -j2 --target test
       - name: Install
-        run: make -C build -j2 install DESTDIR=/tmp
-      - name: Package
-        if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
-        run: make -C build package
+        run: cmake --build build -j2 --target install -- DESTDIR=/tmp
       - name: Failed tests log
         if: ${{ failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
+      - name: Package
+        env:
+          PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+        if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+        run: |
+          cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake -DCPACK_COMPONENT_INSTALL=ON build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake --build build -j2 --target push-artifacts -- VERBOSE=
       - name: Notify Gitter (success)
         if: ${{ success() }}
         run: |
@@ -203,6 +223,9 @@ jobs:
     name: dbg-tsan (ubuntu-20.04, gnu, cur)
     runs-on: ubuntu-20.04 #
     env:
+      CMAKE_BUILD_TYPE:   "Debug"
+      BUILD_TESTING:      "ON"
+      VERBOSE:            "ON"
       ENABLE_SANITIZERS:  "thread"
     steps:
       - uses: actions/checkout@v2
@@ -218,13 +241,15 @@ jobs:
             libevent-dev \
             libsasl2-dev \
             libtbb-dev \
+            python3-m2r \
+            python3-sphinx \
             ${INSTALL_MEMCACHED} \
             ${INSTALL_CC} ${INSTALL_CXX}
           sudo systemctl stop memcached || true
       - name: Install dependencies (Mac)
         if: runner.os == 'macOS'
         run: |
-          brew install bison flex ${INSTALL_MEMCACHED}
+          brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
           brew services stop memcached || true
           echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
       - name: Build memcached
@@ -251,17 +276,24 @@ jobs:
       - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
         run: cmake -S . -B build
       - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
-        run: make -C build -j2 all
+        run: cmake --build build -j2
       - name: Test
-        run: make -C build -j2 test
+        run: cmake --build build -j2 --target test
       - name: Install
-        run: make -C build -j2 install DESTDIR=/tmp
-      - name: Package
-        if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
-        run: make -C build package
+        run: cmake --build build -j2 --target install -- DESTDIR=/tmp
       - name: Failed tests log
         if: ${{ failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
+      - name: Package
+        env:
+          PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+        if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+        run: |
+          cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake -DCPACK_COMPONENT_INSTALL=ON build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake --build build -j2 --target push-artifacts -- VERBOSE=
       - name: Notify Gitter (success)
         if: ${{ success() }}
         run: |
@@ -277,17 +309,22 @@ jobs:
             --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
+  # mac debug
   dbg-mac:
-    name: dbg-mac (macos-10.15, clang, apple)
+    name: dbg-mac (macos-10.15, clang, cur)
     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 #
+      CMAKE_BUILD_TYPE:   "Debug"
+      ENABLE_SASL:        "OFF"
+      BUILD_TESTING:      "ON"
+      VERBOSE:            "ON"
+      CFLAGS:             "-O0 --coverage"
+      CXXFLAGS:           "-O0 --coverage"
+        OS_VND:   macOS #
+        OS_VER:   macos-10.15 #
+        CC_VND:   clang #
+        CC_VER:   cur #
+ #
     continue-on-error: true
     steps:
       - uses: actions/checkout@v2
@@ -298,13 +335,15 @@ jobs:
             libevent-dev \
             libsasl2-dev \
             libtbb-dev \
+            python3-m2r \
+            python3-sphinx \
             ${INSTALL_MEMCACHED} \
             ${INSTALL_CC} ${INSTALL_CXX}
           sudo systemctl stop memcached || true
       - name: Install dependencies (Mac)
         if: runner.os == 'macOS'
         run: |
-          brew install bison flex ${INSTALL_MEMCACHED}
+          brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
           brew services stop memcached || true
           echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
       - name: Build memcached
@@ -331,17 +370,24 @@ jobs:
       - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
         run: cmake -S . -B build
       - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
-        run: make -C build -j2 all
+        run: cmake --build build -j2
       - name: Test
-        run: make -C build -j2 test
+        run: cmake --build build -j2 --target test
       - name: Install
-        run: make -C build -j2 install DESTDIR=/tmp
-      - name: Package
-        if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
-        run: make -C build package
+        run: cmake --build build -j2 --target install -- DESTDIR=/tmp
       - name: Failed tests log
         if: ${{ failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
+      - name: Package
+        env:
+          PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+        if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+        run: |
+          cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake -DCPACK_COMPONENT_INSTALL=ON build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake --build build -j2 --target push-artifacts -- VERBOSE=
       - name: Notify Gitter (success)
         if: ${{ success() }}
         run: |
@@ -358,22 +404,120 @@ jobs:
             --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
 
+  # mac release
+  rel-mac:
+    name: rel-mac (macos-10.15, clang, cur)
+    runs-on: macos-10.15 #
+    env:
+      ENABLE_SASL:        "OFF"
+      BUILD_DOCS_MANGZ:   "ON"
+        OS_VND:   macOS #
+        OS_VER:   macos-10.15 #
+        CC_VND:   clang #
+        CC_VER:   cur #
+    continue-on-error: true
+    steps:
+      - uses: actions/checkout@v2
+      - name: Install dependencies (Linux)
+        if: runner.os == 'Linux'
+        run: |
+          sudo apt-get install \
+            libevent-dev \
+            libsasl2-dev \
+            libtbb-dev \
+            python3-m2r \
+            python3-sphinx \
+            ${INSTALL_MEMCACHED} \
+            ${INSTALL_CC} ${INSTALL_CXX}
+          sudo systemctl stop memcached || true
+      - name: Install dependencies (Mac)
+        if: runner.os == 'macOS'
+        run: |
+          brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
+          brew services stop memcached || true
+          echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
+      - name: Build memcached
+        run: |
+          if test -d memcached
+          then
+            cd memcached
+            ./autogen.sh
+            ./configure CFLAGS="-O2 -pipe" \
+              --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 -S . -B build
+      - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
+        run: cmake --build build -j2
+      - name: Test
+        run: cmake --build build -j2 --target test
+      - name: Install
+        run: cmake --build build -j2 --target install -- DESTDIR=/tmp
+      - name: Failed tests log
+        if: ${{ failure() }}
+        run: cat build/Testing/Temporary/LastTest.log || true
+      - name: Package
+        env:
+          PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+        if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+        run: |
+          cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake -DCPACK_COMPONENT_INSTALL=ON build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake --build build -j2 --target push-artifacts -- VERBOSE=
+      - 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}})"
+
   # win build
   win-msvc:
     name: win-msvc (windows-2019, msvc, cur)
     runs-on: windows-2019 #
     env:
-      CMAKE_BUILD_TYPE: Release
-      BUILD_TESTING:    "OFF"
+      ENABLE_SASL:      "OFF"
       BISON_ROOT:       "C:/msys64/usr"
       FLEX_ROOT:        "C:/msys64/usr"
-      OS_VND: Windows
-      OS_VER: windows-2019 #
-      CC_VND: msvc #
-      CC_VER: cur #
+        OS_VND:   Windows #
+        OS_VER:   windows-2019 #
+        CC_VND:   msvc #
+        CC_VER:   cur #
     continue-on-error: true
+    defaults:
+      run:
+        shell: msys2 {0}
     steps:
       - uses: actions/checkout@v2
+      - uses: msys2/setup-msys2@v2
+        with:
+          release: false
+          path-type: inherit
+          install: >-
+            rsync
+            openssh
       - 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 }}
@@ -381,7 +525,11 @@ jobs:
       - name: Install
         run: cmake --install build --prefix installed --config ${{ env.CMAKE_BUILD_TYPE }}
       - name: Package
-        run: cmake -E chdir build cpack
+        env:
+          PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+        run: |
+          cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --target package
+          cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} --target push-artifacts
 
   # release builds
   release:
@@ -394,7 +542,7 @@ jobs:
     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 }}
@@ -476,13 +624,15 @@ jobs:
             libevent-dev \
             libsasl2-dev \
             libtbb-dev \
+            python3-m2r \
+            python3-sphinx \
             ${INSTALL_MEMCACHED} \
             ${INSTALL_CC} ${INSTALL_CXX}
           sudo systemctl stop memcached || true
       - name: Install dependencies (Mac)
         if: runner.os == 'macOS'
         run: |
-          brew install bison flex ${INSTALL_MEMCACHED}
+          brew install bison flex sphinx-doc ${INSTALL_MEMCACHED}
           brew services stop memcached || true
           echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
       - name: Build memcached
@@ -509,17 +659,24 @@ jobs:
       - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
         run: cmake -S . -B build
       - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
-        run: make -C build -j2 all
+        run: cmake --build build -j2
       - name: Test
-        run: make -C build -j2 test
+        run: cmake --build build -j2 --target test
       - name: Install
-        run: make -C build -j2 install DESTDIR=/tmp
-      - name: Package
-        if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
-        run: make -C build package
+        run: cmake --build build -j2 --target install -- DESTDIR=/tmp
       - name: Failed tests log
         if: ${{ failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
+      - name: Package
+        env:
+          PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+        if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+        run: |
+          cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake -DCPACK_COMPONENT_INSTALL=ON build
+          cmake --build build -j2 --target package -- VERBOSE=
+          cmake --build build -j2 --target push-artifacts -- VERBOSE=
       - name: Notify Gitter (success)
         if: ${{ success() }}
         run: |
index 5203ddac357b4b171529a728f291fae856db2749..e4fee7a67d991761b8546b29a691a00c3b6a9853 100644 (file)
@@ -73,6 +73,12 @@ if(BUILD_TESTING)
     endif()
 endif()
 
+if(BUILD_DOCS_MANGZ)
+    set(BUILD_DOCS_MAN ON)
+endif()
+if(BUILD_DOCS_MAN OR BUILD_DOCS_HTML)
+    set(BUILD_DOCS ON)
+endif()
 if(BUILD_DOCS)
     set(SPHINX_OPTIONS ""
         CACHE STRING "additional sphinx-build command line options")
index 436d6d8e56bad13cd33ab5bb3c050030d4f8dac8..171e2469d25b4ea664a8806aa3ffc971882bd704 100644 (file)
@@ -10,7 +10,7 @@ project(libmemcached
         VERSION "${LIBMEMCACHED_VERSION}"
         DESCRIPTION "libmemcached, a C/C++ memcached client library"
         )
-set(CMAKE_PROJECT_HOMEPAGE_URL "https://github.com/m6w6/libmemcached")
+set(PROJECT_HOMEPAGE_URL "https://github.com/m6w6/libmemcached")
 set(PROJECT_CONTACT "Michael Wallner <mike@php.net>")
 
 set(CXX_STANDARD 11)
@@ -55,6 +55,10 @@ if(NOT BUILD_DOCSONLY)
     configure_file(${CONFIGURE_FILE_IN} ${CONFIGURE_FILE_OUT} @ONLY)
 endif()
 
+list(APPEND PROJECT_CONFIG ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR})
+list(APPEND PROJECT_CONFIG ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION})
+list(APPEND PROJECT_CONFIG ${CMAKE_BUILD_TYPE})
+
 include(CPack.txt)
 
 install(FILES
index 386bb131a6ece1ecde3141757c121075e8a5668b..52fefe69fb5973f5cd12639b3fa466cbb53c8d6f 100644 (file)
--- a/CPack.txt
+++ b/CPack.txt
@@ -1,13 +1,12 @@
 # default options
 
+set(CPACK_ARCHIVE_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
+set(CPACK_SOURCE_IGNORE_FILES "/[.]git/;/[.](idea|settings|c?project);~$;[.]log$;[.]bak$")
+
 macro(cpack_include_if GENERATOR)
     message(STATUS "Checking ${GENERATOR} package configuration ...")
-    if(EXISTS ${CMAKE_SOURCE_DIR}/CPack${GENERATOR}.txt)
-        message(STATUS "  Sourcing ${CMAKE_SOURCE_DIR}/CPack${GENERATOR}.txt")
-        include(${CMAKE_SOURCE_DIR}/CPack${GENERATOR}.txt)
-    elseif(EXISTS ${CMAKE_BINARY_DIR}/CPack${GENERATOR}.txt)
-        message(STATUS "  Sourcing ${CMAKE_BINARY_DIR}/CPack${GENERATOR}.txt")
-        include(${CMAKE_BINARY_DIR}/CPack${GENERATOR}.txt)
+    if(EXISTS ${CMAKE_SOURCE_DIR}/CPack/${GENERATOR}.txt)
+        include(${CMAKE_SOURCE_DIR}/CPack/${GENERATOR}.txt)
     endif()
 endmacro()
 
@@ -39,19 +38,27 @@ set(CPACK_PACKAGE_DESCRIPTION
 memcached server (http://memcached.org/). It has been designed to be
 light on memory usage, thread safe, and provide full access to server
 side methods.")
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
-#set(CPACK_PACKAGE_CHECKSUM SHA1)
+list(JOIN PROJECT_CONFIG "-" CPACK_PACKAGE_DIRECTORY)
+set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}/${PROJECT_VERSION}")
+set(CPACK_PACKAGE_CHECKSUM SHA1)
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
 set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
 set(CPACK_CHANGELOG_FILE "${CMAKE_SOURCE_DIR}/ChangeLog-1.1.md")
 
-set(CPACK_SOURCE_IGNORE_FILES "/[.]git/;/[.](idea|settings|c?project);~$;[.]log$;[.]bak$")
 
-set(CPACK_PACKAGE_FILE_NAME
-        "${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
-
-set(CPACK_ARCHIVE_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
-set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME lib)
+execute_process(
+        COMMAND git describe --tags --match [0-9]*.*
+        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+        OUTPUT_VARIABLE PROJECT_TAG
+        ERROR_VARIABLE IGNORED
+)
+string(STRIP "${PROJECT_TAG}" PROJECT_TAG)
+if(PROJECT_TAG)
+    set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_TAG})
+else()
+    set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION})
+endif()
 
 # dependencies
 if(HAVE_LIBSASL)
@@ -64,28 +71,29 @@ if(HAVE_LIBEVENT)
     string(APPEND CPACK_PACKAGE_DEPENDS " libevent")
 endif()
 
-
 # DEBs
-if(EXISTS /usr/bin/dpkg)
+find_program(DPKG dpkg)
+if(DPKG)
     cpack_include_if(DEB)
 endif()
 
-if(APPLE)
-endif()
-
+# WIN
 if(WIN32)
     cpack_include_if(NSIS)
 endif()
 
-# BSDs
-if(CMAKE_SYSTEM_NAME MATCHES BSD)
-    cpack_include_if(BSD)
-endif()
-
 # RPMs
-if(EXISTS /usr/bin/dnf OR EXISTS /usr/bin/yum OR EXISTS /usr/bin/rpmbuild)
+find_program(RPMBUILD rpmbuild)
+if(RPMBUILD)
     cpack_include_if(RPM)
 endif()
 
 # keep last
 include(CPack)
+
+add_custom_target(push-artifacts
+        COMMAND ${CMAKE_SOURCE_DIR}/scripts/push-artifacts.sh
+            ${CPACK_PACKAGE_DIRECTORY}/${PROJECT_NAME}-*
+        WORKING_DIRECTORY ${CPACK_BINARY_DIR}
+        )
+
diff --git a/CPack/DEB.txt b/CPack/DEB.txt
new file mode 100644 (file)
index 0000000..ea19c9b
--- /dev/null
@@ -0,0 +1,6 @@
+set(CPACK_BINARY_DEB ON)
+set(CPACK_DEB_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
+set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
+set(CPACK_COMPONENT_bin_DEPENDS lib)
+set(CPACK_COMPONENT_dev_DEPENDS lib)
diff --git a/CPack/NSIS.txt b/CPack/NSIS.txt
new file mode 100644 (file)
index 0000000..918931e
--- /dev/null
@@ -0,0 +1,5 @@
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}\\\\${PROJECT_VERSION}")
+set(CPACK_NSIS_MODIFY_PATH ON)
+set(CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
+set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}")
+set(CPACK_NSIS_HELP_LINK "${PROJECT_HOMEPAGE_URL}")
diff --git a/CPack/RPM.txt b/CPack/RPM.txt
new file mode 100644 (file)
index 0000000..bbb9a32
--- /dev/null
@@ -0,0 +1,7 @@
+set(CPACK_BINARY_RPM ON)
+set(CPACK_RPM_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
+set(CPACK_RPM_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
+set(CPACK_RPM_PACKAGE_LICENSE "${CPACK_PACKAGE_LICENSE}")
+#set(CPACK_RPM_CHANGELOG_FILE "${CPACK_CHANGELOG_FILE}")
+set(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
+set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
diff --git a/CPackDEB.txt b/CPackDEB.txt
deleted file mode 100644 (file)
index ea19c9b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-set(CPACK_BINARY_DEB ON)
-set(CPACK_DEB_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
-set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
-set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
-set(CPACK_COMPONENT_bin_DEPENDS lib)
-set(CPACK_COMPONENT_dev_DEPENDS lib)
diff --git a/CPackFreeBSD.txt b/CPackFreeBSD.txt
deleted file mode 100644 (file)
index 88106d5..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-set(CPACK_BINARY_FREEBSD ON)
-set(CPACK_FREEBSD_PACKAGE_LICENSE "${CPACK_PACKAGE_LICENSE}")
diff --git a/CPackNSIS.txt b/CPackNSIS.txt
deleted file mode 100644 (file)
index 1a8733e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}\\\\${CMAKE_PROJECT_VERSION}")
-set(CPACK_NSIS_MODIFY_PATH ON)
-set(CPACK_NSIS_DISPLAY_NAME "${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}")
-set(CPACK_NSIS_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
-set(CPACK_NSIS_HELP_LINK "${CMAKE_PROJECT_HOMEPAGE_URL}")
diff --git a/CPackRPM.txt b/CPackRPM.txt
deleted file mode 100644 (file)
index bbb9a32..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-set(CPACK_BINARY_RPM ON)
-set(CPACK_RPM_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
-set(CPACK_RPM_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
-set(CPACK_RPM_PACKAGE_LICENSE "${CPACK_PACKAGE_LICENSE}")
-#set(CPACK_RPM_CHANGELOG_FILE "${CPACK_CHANGELOG_FILE}")
-set(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
-set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
diff --git a/scripts/push-artifacts.conf b/scripts/push-artifacts.conf
new file mode 100644 (file)
index 0000000..6d1e8f2
--- /dev/null
@@ -0,0 +1,8 @@
+StrictHostKeyChecking no
+UserKnownHostsFile /dev/null
+User artifacts
+Port 2
+HostName artifacts.m6w6.name
+IdentityFile ~/.ssh/id_ed25519
+IdentityFile push-artifacts.id
+
diff --git a/scripts/push-artifacts.sh b/scripts/push-artifacts.sh
new file mode 100755 (executable)
index 0000000..45280ee
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+# push artifacts to https://artifacts.m6w6.name/libmemcached/
+
+if test -n "$PUSH_ARTIFACTS_ID"
+then
+  echo "$PUSH_ARTIFACTS_ID" > push-artifacts.id
+fi
+
+RSYNC_CONF=$(dirname $0)/push-artifacts.conf
+rsync -RPae "ssh -F $RSYNC_CONF" "$@" m6w6.name::artifacts/libmemcached/