]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Attempt to run codecov again if it fails.
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Sat, 8 Feb 2020 21:37:43 +0000 (22:37 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 9 Mar 2020 13:13:36 +0000 (14:13 +0100)
.github/workflows/cmake.yml
tools/codecov-upload.sh [new file with mode: 0644]

index e18038b62258a417501bb1825287e51714888d2c..ded1f19b4c229ac253f81a4a44dca16a9ca8f1b8 100644 (file)
@@ -328,9 +328,12 @@ jobs:
       if: matrix.codecov && ( env.CODECOV_TOKEN_SECRET != '' || github.repository == 'zlib-ng/zlib-ng' )
       shell: bash
       run: |
-        cd ${{ matrix.build-dir || '.' }}
-        python -m codecov --required --flags "${{ matrix.codecov }}" --name "${{ matrix.name }}" --gcov-exec="${{ matrix.gcov-exec || 'gcov' }}"
+        bash tools/codecov-upload.sh
       env:
         # Codecov does not yet support GitHub Actions
         CODECOV_TOKEN_SECRET: "${{secrets.CODECOV_TOKEN}}"
         CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN || 'e4fdf847-f541-4ab1-9d50-3d27e5913906' }}"
+        CODECOV_FLAGS: "${{ matrix.codecov }}"
+        CODECOV_NAME:  "${{ matrix.name }}"
+        CODECOV_EXEC:  "${{ matrix.gcov-exec || 'gcov' }}"
+        CODECOV_DIR:   "${{ matrix.build-dir || '.' }}"
diff --git a/tools/codecov-upload.sh b/tools/codecov-upload.sh
new file mode 100644 (file)
index 0000000..e3a48aa
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -ux
+cd "$CODECOV_DIR"
+python -m codecov --required --flags "$CODECOV_FLAGS" --name "$CODECOV_NAME" --gcov-exec="$CODECOV_EXEC"
+if [ $? -ne 0 ]; then
+  sleep 30
+  python -m codecov --required --flags "$CODECOV_FLAGS" --name "$CODECOV_NAME" --gcov-exec="$CODECOV_EXEC" --tries=25
+fi
+exit $?