ci: gh-actions: attempt to fix mingw env
[awesomized/libmemcached] / .github / workflows / cmake-build-ci.gen
index dea4d8d7dff67476a869bc745d380ae7e09a72ad..99e0dd04071cfe9d27d446d5ec03af3adb85465b 100755 (executable)
@@ -103,7 +103,7 @@ function steps_setenv($os_vnd, $splat_map = null) {
       - name: Prepare environment (MinGW)
         if: env.CC_VND == 'mingw'
         run: |
-          echo "CMAKE_GENERATOR=\"MinGW Makefiles\"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
+          echo 'CMAKE_GENERATOR="MinGW Makefiles"' | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
 <?php
   } elseif ($splat_map !== false) {
     foreach (MAP as $os_is => $os_vers) {
@@ -242,24 +242,10 @@ function steps_package() {
 }
 
 function steps_notify($os_vnd) {
-  if ($os_vnd !== "Windows") :
 ?>
-      - name: Notify Gitter (success)
-        if: ${{ success() && runner.os != 'Windows'}}
-        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() && runner.os != 'Windows'}}
-        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}})"
+      - name: Notify Gitter
+        run: bash .github/notify-gitter.sh ${{ secrets.GITTER }} ${{ job.status }}
 <?php
-  endif;
 }
 
 function steps($os_vnd, $splat_map = null) {
@@ -387,7 +373,7 @@ jobs:
       - uses: actions/checkout@v2
         with:
           fetch-depth: 0
-<?php steps(false); ?>
+<?php steps("macOS", false); ?>
 
   # windows release builds
   windows: