13
13
- reopened
14
14
jobs :
15
15
Linux :
16
- runs-on : ubuntu-latest
17
16
strategy :
18
17
matrix :
18
+ runs-on : ['ubuntu-24.04', 'ubuntu-24.04-arm']
19
19
version : ['8.4']
20
20
type : ['cli', 'zts']
21
21
distro : ['bookworm']
22
- outputs :
23
- matrix : ${{ toJson(matrix) }}
22
+ runs-on : ${{ matrix.runs-on }}
24
23
steps :
25
24
- name : Checkout
26
25
uses : actions/checkout@v4
@@ -30,14 +29,14 @@ jobs:
30
29
uses : docker/setup-buildx-action@v3
31
30
- name : Build container
32
31
run : |
33
- docker compose build --pull --no-cache --build-arg PLATFORM="linux/amd64" --build-arg IMAGE="php" --build-arg TAG="${{ matrix.version }}-${{ matrix.type }}-${{ matrix.distro }}"
32
+ docker compose build --pull --no-cache --build-arg IMAGE="php" --build-arg TAG="${{ matrix.version }}-${{ matrix.type }}-${{ matrix.distro }}"
34
33
- name : Test with gcov
35
34
run : |
36
35
docker compose run -v "$(pwd)/ext:/ext" --rm shell pskel coverage
37
36
- name : Upload coverage to artifact
38
37
uses : actions/upload-artifact@v4
39
38
with :
40
- name : coverage-${{ matrix.version }}-${{ matrix.type }}-${{ matrix.distro }}
39
+ name : coverage-${{ matrix.runs-on }}-${{ matrix. version }}-${{ matrix.type }}-${{ matrix.distro }}
41
40
path : ${{ github.workspace }}/ext/lcov.info
42
41
Coverage :
43
42
needs : [Linux]
@@ -47,17 +46,35 @@ jobs:
47
46
uses : actions/checkout@v4
48
47
- name : Download coverage artifacts
49
48
uses : actions/download-artifact@v4
49
+ with :
50
+ path : coverage-artifacts
51
+ - name : Install lcov
52
+ run : sudo apt-get install -y lcov
50
53
- name : Merge coverages
51
54
run : |
52
- sudo apt-get install -y "lcov"
53
- LCOV_FILES="$(find . -name "lcov.info")"
54
- CMD="$(which "lcov")"
55
- for LCOV_FILE in ${LCOV_FILES}; do
56
- CMD+=" -a ${LCOV_FILE}"
55
+ LCOV_FILES=$(find coverage-artifacts -name "lcov.info" -type f)
56
+
57
+ if [ -z "$LCOV_FILES" ]; then
58
+ echo "No lcov.info files found in the artifacts!"
59
+ exit 1
60
+ fi
61
+
62
+ CMD="lcov"
63
+ for LCOV_FILE in $LCOV_FILES; do
64
+ echo "Adding coverage file: $LCOV_FILE"
65
+ CMD+=" -a $LCOV_FILE"
57
66
done
58
67
CMD+=" -o lcov.info"
59
- echo "Merging coverages: ${LCOV_FILES}"
60
- ${CMD}
68
+
69
+ echo "Executing: $CMD"
70
+ eval $CMD
71
+
72
+ if [ ! -f "lcov.info" ]; then
73
+ echo "Failed to generate merged lcov.info file!"
74
+ exit 1
75
+ fi
76
+
77
+ echo "Successfully merged $(echo $LCOV_FILES | wc -w) coverage files."
61
78
- name : Report coverage
62
79
uses : k1LoW/octocov-action@v1
63
80
with :
0 commit comments