@@ -10,10 +10,10 @@ inputs:
10
10
description : Path of the top-level folder for build output.
11
11
required : true
12
12
default : ${{ github.workspace }}/extras/test/build
13
- runtime-path :
14
- description : Path of the runtime binary generated by building the tests.
13
+ runtime-paths :
14
+ description : YAML format list of paths to runtime binaries generated by building the tests.
15
15
required : true
16
- default : ${{ github.workspace }}/extras/test/build/bin/unit-test-binary
16
+ default : " - ${{ github.workspace }}/extras/test/build/bin/unit-test-binary"
17
17
coverage-exclude-paths :
18
18
description : YAML format list of paths to remove from coverage data.
19
19
required : true
@@ -28,7 +28,7 @@ inputs:
28
28
29
29
runs :
30
30
using : composite
31
- steps :
31
+ steps :
32
32
- name : Build tests
33
33
shell : bash
34
34
run : |
39
39
make --directory="${{ inputs.build-path }}"
40
40
echo "::endgroup::"
41
41
42
+ - name : Install yq
43
+ shell : bash
44
+ run : |
45
+ sudo snap install yq > /dev/null
46
+
42
47
- name : Install Valgrind
43
48
shell : bash
44
49
run : |
@@ -47,14 +52,24 @@ runs:
47
52
- name : Run tests
48
53
shell : bash
49
54
run : |
50
- echo "::group::Run ${{ inputs.runtime-path }} with Valgrind"
51
- valgrind --tool=memcheck --leak-check=yes --error-exitcode=1 "${{ inputs.runtime-path }}"
52
- echo "::endgroup::"
55
+ if [[ -n "${{ inputs.runtime-path }}" ]]; then
56
+ echo "::warning::The runtime-path input is deprecated. Please use runtime-paths instead."
57
+ RUNTIME_PATHS="${{ inputs.runtime-path }}"
58
+ else
59
+ RUNTIME_PATHS="${{ inputs.runtime-paths }}"
60
+ fi
53
61
54
- - name : Install yq
55
- shell : bash
56
- run : |
57
- sudo snap install yq > /dev/null
62
+ EXIT_STATUS=0
63
+ set +o errexit
64
+ while IFS='' read -r runtimePath && [[ -n "$runtimePath" ]]; do
65
+ echo "::group::Run $runtimePath with Valgrind"
66
+ if ! valgrind --tool=memcheck --leak-check=yes --error-exitcode=1 "$runtimePath"; then
67
+ EXIT_STATUS=1
68
+ echo "::error file=$runtimePath::While running $runtimePath"
69
+ fi
70
+ echo "::endgroup::"
71
+ done <<<"$(echo "$RUNTIME_PATHS" | yq read - [*])"
72
+ exit $EXIT_STATUS
58
73
59
74
- name : Parse coverage-exclude-paths input
60
75
id : parse-coverage-exclude-paths
0 commit comments