ci: gh-action windows fixes
[awesomized/libmemcached] / .github / workflows / cmake-build-ci.gen
index 24fd7bb465d0f278679f41d35329dd965b815d1e..06bc0383cf761ee7f278b5fef9f1522ade630867 100755 (executable)
@@ -151,6 +151,7 @@ function steps_getdeps() {
           brew services stop memcached || true
           echo MEMCACHED_BINARY="/usr/local/bin/memcached" >> ${GITHUB_ENV}
       - name: Build memcached
+        if: runner.os != 'Windows'
         run: |
           if test -d memcached
           then
@@ -187,11 +188,12 @@ function steps_test() {
 ?>
       - name: Test
         if: env.BUILD_TESTING == 'ON'
-        run: |
-          cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target test
-          cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target install -- DESTDIR=/tmp
+        run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target test
+      - name: Install
+        if: env.BUILD_TESTING == 'ON'
+        run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --prefix /tmp
       - name: Failed tests log
-        if: ${{ failure() }}
+        if: ${{ env.BUILD_TESTING == 'ON' && failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
 <?php
 }
@@ -201,20 +203,20 @@ function steps_package() {
       - name: Package
         env:
           PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
-        if: env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+        if: env.CC_VER == 'cur' && env.CMAKE_BUILD_TYPE == 'Release'
         run: |
           cmake --config ${{ env.CMAKE_BUILD_TYPE }} -S . -B build
-          cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target package -- VERBOSE=
+          cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target package
           cmake -DCPACK_COMPONENT_INSTALL=ON build
-          cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target package -- VERBOSE=
-          cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target push-artifacts -- VERBOSE=
+          cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target package
+          cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target push-artifacts
 <?php
 }
 
 function steps_notify() {
 ?>
       - name: Notify Gitter (success)
-        if: ${{ success() && runner.os!='Windows'}}
+        if: ${{ success() && runner.os != 'Windows'}}
         run: |
           REF=$(basename ${GITHUB_REF})
           curl -sS "${{ secrets.GITTER }}" \