]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
github-actions: make workflow more robust. 165/head
authorMarc Fehling <mafehling.git@gmail.com>
Thu, 18 Jan 2024 20:02:04 +0000 (13:02 -0700)
committerMarc Fehling <mafehling.git@gmail.com>
Thu, 18 Jan 2024 22:41:39 +0000 (15:41 -0700)
.github/action-issue-template.md
.github/workflows/linux.yml

index 1f75184363e8df13eb4a8e66686e43824de5e842..6073f9c7cece9a3f399dbc43f9a4cc95884e2901 100644 (file)
@@ -2,4 +2,6 @@
 title: "Scheduled GitHub Actions worker is failing"
 ---
 
+The following projects failed to either configure, build or test: {{ env.error_compile }} {{ env.error_test }}
+
 See [the action log](https://github.com/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}) for more details.
index a6e3b861a8ef835a833dc51f7115deea7e40b4f7..4113621a10d4e1c98319c244236ac31ec94e89f4 100644 (file)
@@ -54,26 +54,27 @@ jobs:
 
       - name: Compile all projects
         run: |
-          for dir in */
-          do
+          for dir in */; do
             cd ${dir}
-            if [ -e CMakeLists.txt ]
-            then
+            if [ -e CMakeLists.txt ]; then
               echo "Current project: ${dir}"
-              cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .
-              make
+              (cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . && make) || err="${err} ${dir}"
             else
               echo "Skipping project: ${dir}"
             fi
             cd ..
           done
+          if [ -n "${err}" ]; then
+            echo "error_compile=${err}" >> $GITHUB_ENV
+            exit 1
+          fi
 
       - name: Test coupled_laplace_problem
         run: |
           cd coupled_laplace_problem
           (./coupled_laplace_problem 2>&1 & ./fancy_boundary_condition >fbc.log)
           sed -i '2d' solution-10.vtk
-          numdiff solution-10.vtk test_data/reference-10.vtk
+          numdiff solution-10.vtk test_data/reference-10.vtk || (echo "error_test=coupled_laplace_problem/" >> $GITHUB_ENV && exit 1)
 
       - name: Create issue about failure
         if: failure() && github.event_name == 'schedule'

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.