From: Michael Wallner Date: Thu, 17 Dec 2020 07:24:55 +0000 (+0100) Subject: cmake: CI fixes X-Git-Tag: 1.1.0-beta1~50 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=cfd4a0cf233411410d297a7a0965ff88fffe87b0;p=awesomized%2Flibmemcached cmake: CI fixes --- diff --git a/.github/workflows/cmake-build-ci.gen b/.github/workflows/cmake-build-ci.gen index 2d07e8dc..dd5f8c85 100755 --- a/.github/workflows/cmake-build-ci.gen +++ b/.github/workflows/cmake-build-ci.gen @@ -140,7 +140,6 @@ function steps_getdeps() { libevent-dev \ libsasl2-dev \ libtbb-dev \ - m2r \ python3-sphinx \ ${INSTALL_MEMCACHED} \ ${INSTALL_CC} ${INSTALL_CXX} @@ -181,10 +180,16 @@ function steps_build() { 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 + if: env.BUILD_TESTING == 'ON' + run: | + cmake --build build -j2 --target test + cmake --build build -j2 --target install -- DESTDIR=/tmp - name: Failed tests log if: ${{ failure() }} run: cat build/Testing/Temporary/LastTest.log || true @@ -229,6 +234,7 @@ function steps($splat_map = null) { steps_setenv($splat_map); steps_getdeps(); steps_build(); + steps_test(); steps_package(); steps_notify(); } @@ -268,7 +274,7 @@ on: env: # defaults INSTALL_MEMCACHED: memcached - ENABLE_SASL: "ON" + ENABLE_SASL: "OFF" # ^ almost no memcached distribution package has built in sasl support ENABLE_HASH_HSIEH: "ON" ENABLE_DTRACE: "OFF" OS_VND: # @@ -290,6 +296,7 @@ jobs: CXXFLAGS: "-O0 --coverage" INSTALL_MEMCACHED: "" MEMCACHED_PREFIX: "/tmp" + ENABLE_SASL: "ON" steps: - uses: actions/checkout@v2 - uses: actions/checkout@v2 @@ -332,7 +339,6 @@ jobs: runs-on: # env: CMAKE_BUILD_TYPE: "Debug" - ENABLE_SASL: "OFF" BUILD_TESTING: "ON" VERBOSE: "ON" CFLAGS: "-O0 --coverage" @@ -350,7 +356,6 @@ jobs: runs-on: # env: CMAKE_BUILD_TYPE: "Release" - ENABLE_SASL: "OFF" BUILD_DOCS_MANGZ: "ON" continue-on-error: true @@ -364,14 +369,10 @@ jobs: runs-on: # env: CMAKE_BUILD_TYPE: "Release" - ENABLE_SASL: "OFF" BISON_ROOT: "C:/msys64/usr" FLEX_ROOT: "C:/msys64/usr" continue-on-error: true - defaults: - run: - shell: msys2 {0} steps: - uses: actions/checkout@v2 - uses: msys2/setup-msys2@v2 diff --git a/.github/workflows/cmake-build-ci.yml b/.github/workflows/cmake-build-ci.yml index cf86dbbf..e51e9720 100644 --- a/.github/workflows/cmake-build-ci.yml +++ b/.github/workflows/cmake-build-ci.yml @@ -17,7 +17,7 @@ on: env: # defaults INSTALL_MEMCACHED: memcached - ENABLE_SASL: "ON" + ENABLE_SASL: "OFF" # ^ almost no memcached distribution package has built in sasl support ENABLE_HASH_HSIEH: "ON" ENABLE_DTRACE: "OFF" OS_VND: Linux # @@ -39,6 +39,7 @@ jobs: CXXFLAGS: "-O0 --coverage" INSTALL_MEMCACHED: "" MEMCACHED_PREFIX: "/tmp" + ENABLE_SASL: "ON" steps: - uses: actions/checkout@v2 - uses: actions/checkout@v2 @@ -58,7 +59,6 @@ jobs: libevent-dev \ libsasl2-dev \ libtbb-dev \ - m2r \ python3-sphinx \ ${INSTALL_MEMCACHED} \ ${INSTALL_CC} ${INSTALL_CXX} @@ -95,9 +95,10 @@ jobs: - 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 + if: env.BUILD_TESTING == 'ON' + run: | + cmake --build build -j2 --target test + cmake --build build -j2 --target install -- DESTDIR=/tmp - name: Failed tests log if: ${{ failure() }} run: cat build/Testing/Temporary/LastTest.log || true @@ -150,7 +151,6 @@ jobs: libevent-dev \ libsasl2-dev \ libtbb-dev \ - m2r \ python3-sphinx \ ${INSTALL_MEMCACHED} \ ${INSTALL_CC} ${INSTALL_CXX} @@ -187,9 +187,10 @@ jobs: - 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 + if: env.BUILD_TESTING == 'ON' + run: | + cmake --build build -j2 --target test + cmake --build build -j2 --target install -- DESTDIR=/tmp - name: Failed tests log if: ${{ failure() }} run: cat build/Testing/Temporary/LastTest.log || true @@ -241,7 +242,6 @@ jobs: libevent-dev \ libsasl2-dev \ libtbb-dev \ - m2r \ python3-sphinx \ ${INSTALL_MEMCACHED} \ ${INSTALL_CC} ${INSTALL_CXX} @@ -278,9 +278,10 @@ jobs: - 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 + if: env.BUILD_TESTING == 'ON' + run: | + cmake --build build -j2 --target test + cmake --build build -j2 --target install -- DESTDIR=/tmp - name: Failed tests log if: ${{ failure() }} run: cat build/Testing/Temporary/LastTest.log || true @@ -315,7 +316,6 @@ jobs: runs-on: macos-10.15 # env: CMAKE_BUILD_TYPE: "Debug" - ENABLE_SASL: "OFF" BUILD_TESTING: "ON" VERBOSE: "ON" CFLAGS: "-O0 --coverage" @@ -335,7 +335,6 @@ jobs: libevent-dev \ libsasl2-dev \ libtbb-dev \ - m2r \ python3-sphinx \ ${INSTALL_MEMCACHED} \ ${INSTALL_CC} ${INSTALL_CXX} @@ -372,9 +371,10 @@ jobs: - 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 + if: env.BUILD_TESTING == 'ON' + run: | + cmake --build build -j2 --target test + cmake --build build -j2 --target install -- DESTDIR=/tmp - name: Failed tests log if: ${{ failure() }} run: cat build/Testing/Temporary/LastTest.log || true @@ -410,7 +410,6 @@ jobs: runs-on: macos-10.15 # env: CMAKE_BUILD_TYPE: "Release" - ENABLE_SASL: "OFF" BUILD_DOCS_MANGZ: "ON" OS_VND: macOS # OS_VER: macos-10.15 # @@ -426,7 +425,6 @@ jobs: libevent-dev \ libsasl2-dev \ libtbb-dev \ - m2r \ python3-sphinx \ ${INSTALL_MEMCACHED} \ ${INSTALL_CC} ${INSTALL_CXX} @@ -463,9 +461,10 @@ jobs: - 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 + if: env.BUILD_TESTING == 'ON' + run: | + cmake --build build -j2 --target test + cmake --build build -j2 --target install -- DESTDIR=/tmp - name: Failed tests log if: ${{ failure() }} run: cat build/Testing/Temporary/LastTest.log || true @@ -500,7 +499,6 @@ jobs: runs-on: windows-2019 # env: CMAKE_BUILD_TYPE: "Release" - ENABLE_SASL: "OFF" BISON_ROOT: "C:/msys64/usr" FLEX_ROOT: "C:/msys64/usr" OS_VND: Windows # @@ -508,9 +506,6 @@ jobs: 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 @@ -627,7 +622,6 @@ jobs: libevent-dev \ libsasl2-dev \ libtbb-dev \ - m2r \ python3-sphinx \ ${INSTALL_MEMCACHED} \ ${INSTALL_CC} ${INSTALL_CXX} @@ -664,9 +658,10 @@ jobs: - 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 + if: env.BUILD_TESTING == 'ON' + run: | + cmake --build build -j2 --target test + cmake --build build -j2 --target install -- DESTDIR=/tmp - name: Failed tests log if: ${{ failure() }} run: cat build/Testing/Temporary/LastTest.log || true diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 303ceada..c2d6325a 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -40,14 +40,15 @@ else() add_custom_command( OUTPUT "${SPHINX_HTML_DIR}" COMMAND - ${SPHINX_EXECUTABLE} - -q -b html - -c "${SPHINX_BUILD_DIR}" - -d "${SPHINX_CACHE_DIR}" - ${SPHINX_OPTIONS} - "${SPHINX_SOURCE_DIR}" - "${SPHINX_HTML_DIR}" - COMMAND ${CMAKE_COMMAND} -E touch html + ${SPHINX_EXECUTABLE} + -q -b html + -c "${SPHINX_BUILD_DIR}" + -d "${SPHINX_CACHE_DIR}" + ${SPHINX_OPTIONS} + "${SPHINX_SOURCE_DIR}" + "${SPHINX_HTML_DIR}" + COMMAND + ${CMAKE_COMMAND} -E touch "${SPHINX_HTML_DIR}" BYPRODUCTS ${SPHINX_HTML_DIR} DEPENDS "${DOCS_SOURCE}" ) @@ -62,14 +63,15 @@ else() add_custom_command( OUTPUT ${SPHINX_MAN_DIR} COMMAND - ${SPHINX_EXECUTABLE} - -q -b man - -c "${SPHINX_BUILD_DIR}" - -d "${SPHINX_CACHE_DIR}" - ${SPHINX_OPTIONS} - "${SPHINX_SOURCE_DIR}" - "${SPHINX_MAN_DIR}" - COMMAND ${CMAKE_COMMAND} -E touch man + ${SPHINX_EXECUTABLE} + -q -b man + -c "${SPHINX_BUILD_DIR}" + -d "${SPHINX_CACHE_DIR}" + ${SPHINX_OPTIONS} + "${SPHINX_SOURCE_DIR}" + "${SPHINX_MAN_DIR}" + COMMAND + ${CMAKE_COMMAND} -E touch "${SPHINX_MAN_DIR}" BYPRODUCTS ${SPHINX_MAN_DIR} DEPENDS "${DOCS_SOURCE}" ) @@ -86,9 +88,11 @@ else() if(GZIP) set(MAN_EXT ".gz") add_custom_target(man_gz ALL - ${GZIP} -kf ${SPHINX_MAN_DIR}/*.{1,3} + COMMAND ${GZIP} -kf + ${SPHINX_MAN_DIR}/*.1 + ${SPHINX_MAN_DIR}/*.3 DEPENDS ${SPHINX_MAN_DIR} - ) + ) # some shells do not support braced glob patterns endif() endif() diff --git a/scripts/push-artifacts.sh b/scripts/push-artifacts.sh index 45280ee3..6ed63d27 100755 --- a/scripts/push-artifacts.sh +++ b/scripts/push-artifacts.sh @@ -4,6 +4,7 @@ if test -n "$PUSH_ARTIFACTS_ID" then echo "$PUSH_ARTIFACTS_ID" > push-artifacts.id + chmod 0600 push-artifacts.id fi RSYNC_CONF=$(dirname $0)/push-artifacts.conf