• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#                          __  __            _
2#                       ___\ \/ /_ __   __ _| |_
3#                      / _ \\  /| '_ \ / _` | __|
4#                     |  __//  \| |_) | (_| | |_
5#                      \___/_/\_\ .__/ \__,_|\__|
6#                               |_| XML parser
7#
8# Copyright (c) 2020-2022 Sebastian Pipping <sebastian@pipping.org>
9# Licensed under the MIT license:
10#
11# Permission is  hereby granted,  free of charge,  to any  person obtaining
12# a  copy  of  this  software   and  associated  documentation  files  (the
13# "Software"),  to  deal in  the  Software  without restriction,  including
14# without  limitation the  rights  to use,  copy,  modify, merge,  publish,
15# distribute, sublicense, and/or sell copies of the Software, and to permit
16# persons  to whom  the Software  is  furnished to  do so,  subject to  the
17# following conditions:
18#
19# The above copyright  notice and this permission notice  shall be included
20# in all copies or substantial portions of the Software.
21#
22# THE  SOFTWARE  IS  PROVIDED  "AS  IS",  WITHOUT  WARRANTY  OF  ANY  KIND,
23# EXPRESS  OR IMPLIED,  INCLUDING  BUT  NOT LIMITED  TO  THE WARRANTIES  OF
24# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
25# NO EVENT SHALL THE AUTHORS OR  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
26# DAMAGES OR  OTHER LIABILITY, WHETHER  IN AN  ACTION OF CONTRACT,  TORT OR
27# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
28# USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30name: Check expat_config.h.{in,cmake} for regressions
31
32on:
33  pull_request:
34  push:
35  schedule:
36    - cron: '0 2 * * 5'  # Every Friday at 2am
37
38jobs:
39  checks:
40    name: Check expat_config.h.{in,cmake} for regressions
41    runs-on: ubuntu-20.04
42    steps:
43    - uses: actions/checkout@v3.1.0
44    - name: Check expat_config.h.{in,cmake} for regressions
45      run: |
46        set -v
47        # A non-empty diff indicates a change in the list of macros exported:
48        # - Removals would be trouble (because expat_config.h is installed).
49        # - Additions could use an extra check by a human
50        ( cd expat && ./buildconf.sh )  # generate expat_config.h.in
51        diff -u <(sort < .github/workflows/data/expat_config_h_in__expected.txt) <(.github/workflows/scripts/list_exported_macros.sh expat/expat_config.h.in)
52        diff -u <(sort < .github/workflows/data/expat_config_h_cmake__expected.txt) <(.github/workflows/scripts/list_exported_macros.sh expat/expat_config.h.cmake)
53
54        # Informational (and not an ideal state)
55        diff -u \
56            <(sort < .github/workflows/data/expat_config_h_in__expected.txt) \
57            <(sort < .github/workflows/data/expat_config_h_cmake__expected.txt) \
58            || true
59