Skip to content

Commit

Permalink
Merge pull request #165 from marcfehling/ci-robust
Browse files Browse the repository at this point in the history
github-actions: make workflow more robust.
  • Loading branch information
marcfehling authored Jan 26, 2024
2 parents dbcad22 + 7b0e260 commit 13e03c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/action-issue-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
15 changes: 8 additions & 7 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 13e03c3

Please sign in to comment.