• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#                          __  __            _
2#                       ___\ \/ /_ __   __ _| |_
3#                      / _ \\  /| '_ \ / _` | __|
4#                     |  __//  \| |_) | (_| | |_
5#                      \___/_/\_\ .__/ \__,_|\__|
6#                               |_| XML parser
7#
8# Copyright (c) 2021-2024 Sebastian Pipping <sebastian@pipping.org>
9# Copyright (c) 2023      Joyce Brum <joycebrum@google.com>
10# Copyright (c) 2024      Dag-Erling Smørgrav <des@des.dev>
11# Licensed under the MIT license:
12#
13# Permission is  hereby granted,  free of charge,  to any  person obtaining
14# a  copy  of  this  software   and  associated  documentation  files  (the
15# "Software"),  to  deal in  the  Software  without restriction,  including
16# without  limitation the  rights  to use,  copy,  modify, merge,  publish,
17# distribute, sublicense, and/or sell copies of the Software, and to permit
18# persons  to whom  the Software  is  furnished to  do so,  subject to  the
19# following conditions:
20#
21# The above copyright  notice and this permission notice  shall be included
22# in all copies or substantial portions of the Software.
23#
24# THE  SOFTWARE  IS  PROVIDED  "AS  IS",  WITHOUT  WARRANTY  OF  ANY  KIND,
25# EXPRESS  OR IMPLIED,  INCLUDING  BUT  NOT LIMITED  TO  THE WARRANTIES  OF
26# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
27# NO EVENT SHALL THE AUTHORS OR  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
28# DAMAGES OR  OTHER LIABILITY, WHETHER  IN AN  ACTION OF CONTRACT,  TORT OR
29# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
30# USE OR OTHER DEALINGS IN THE SOFTWARE.
31
32name: Collect test coverage
33
34on:
35  pull_request:
36  push:
37  schedule:
38    - cron: '0 2 * * 5'  # Every Friday at 2am
39  workflow_dispatch:
40
41permissions:
42  contents: read
43
44jobs:
45  checks:
46    name: Collect test coverage
47    runs-on: ubuntu-22.04
48    env:
49      CFLAGS: -g3 -pipe
50    steps:
51    - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683  # v4.2.2
52    - name: Install build dependencies
53      run: |-
54        set -x -u
55        source /etc/os-release
56
57        # Unlock 32bit architecture (for Wine further down)
58        sudo dpkg --add-architecture i386  # for wine32
59        sudo apt-get update  # due to new architecture
60
61        sudo apt-get install --yes --no-install-recommends -V \
62            cmake \
63            docbook-xml \
64            docbook2x \
65            gcc-multilib \
66            g++-multilib \
67            lcov \
68            libbsd-dev \
69            lzip \
70            moreutils
71
72        # Install 32bit Wine
73        sudo apt-get install --yes --no-install-recommends -V \
74            mingw-w64 \
75            wine-stable \
76            wine32:i386
77    - name: Unshallow Git clone
78      run: |
79        git fetch --force --tags --unshallow origin  # for "git describe" in coverage.sh
80    - name: Collect test coverage
81      env:
82        MODE: coverage-sh
83      run: |
84        exec ./.ci.sh
85
86    - name: Store coverage .info and HTML report
87      uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882  # v4.4.3
88      with:
89        name: coverage
90        path: expat/coverage__*/
91        if-no-files-found: error
92