diff --git a/.github/workflows/autotools-cmake.yml b/.github/workflows/autotools-cmake.yml deleted file mode 100644 index 00317a01..00000000 --- a/.github/workflows/autotools-cmake.yml +++ /dev/null @@ -1,178 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2021-2025 Sebastian Pipping -# Copyright (c) 2023 Joyce Brum -# Copyright (c) 2024 Dag-Erling Smørgrav -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Ensure that GNU Autotools and CMake build systems agree - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - checks: - name: Ensure that GNU Autotools and CMake build systems agree - strategy: - matrix: - include: - - os: macos-14 - configure_args: - cmake_args: - - os: ubuntu-22.04 - configure_args: - cmake_args: - - os: ubuntu-22.04 - configure_args: --host=i686-w64-mingw32 - cmake_args: -DCMAKE_TOOLCHAIN_FILE=cmake/mingw-toolchain.cmake - defaults: - run: - shell: bash - runs-on: "${{ matrix.os }}" - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: (Linux) Install build dependencies - if: "${{ runner.os == 'Linux' }}" - run: |- - set -x - sudo apt-get update - sudo apt-get install --yes --no-install-recommends -V \ - cmake \ - docbook2x \ - lzip \ - mingw-w64 - - - name: (macOS) Install build dependencies - if: "${{ runner.os == 'macOS' }}" - run: | - brew install \ - autoconf \ - automake \ - cmake \ - docbook2x \ - libtool \ - lzip - - - name: Produce and extract a release archive - run: | - set -x - cd expat - ./buildconf.sh - ./configure - make dist - tar xf expat-*.*.*.tar.gz - - - name: Build and install using GNU Autotools - run: | - set -x - cd expat/expat-*.*.*/ - mkdir build_autotools - cd build_autotools - ../configure \ - --libdir='${exec_prefix}/lib123' \ - ${{matrix.configure_args}} - make install DESTDIR="${PWD}"/ROOT - find ROOT | sort | xargs ls -ld - - - name: Build and install using CMake - run: | - set -x - cd expat/expat-*.*.*/ - mkdir build_cmake - cd build_cmake - cmake \ - -DCMAKE_INSTALL_LIBDIR=lib123 \ - ${{matrix.cmake_args}} \ - .. - make install DESTDIR="${PWD}"/ROOT - find ROOT | sort | xargs ls -ld - - - name: Check for identical CMake files from both build systems - run: | - set -x - cd expat/expat-*.*.*/ - - if [[ "${{ runner.os }}" == macOS ]]; then - # There is a known difference between Autotools and CMake for macOS: - # Autotools: - # - /usr/local/lib123/libexpat..dylib - # - /usr/local/lib123/libexpat.dylib - # CMake: - # - /usr/local/lib123/libexpat....dylib - # - /usr/local/lib123/libexpat..dylib - # - /usr/local/lib123/libexpat.dylib - # We patch the CMake side in line here to get the differ below to empty. - ( cd build_cmake/ROOT/usr/local/lib*/cmake/expat-*/ \ - && sed -E 's,(libexpat\.[0-9]+)\.[0-9]+\.[0-9]+(\.dylib),\1\2,' expat-noconfig.cmake > expat-noconfig-patched.cmake \ - && ! diff -u0 expat-noconfig{,-patched}.cmake \ - && mv expat-noconfig{-patched,}.cmake ) - - # Autotools' LT_LIB_M has a hardcoded exclude for "*-*-darwin*" hosts, - # while macOS does have libm and is successfully found by CMake. - # We patch the CMake side in line here to get the differ below to empty. - # - # Both GNU and BSD sed can edit in-place without creating a backup, - # but not with the same syntax. The syntax for editing in-place - # _with_ a backup however is the same, so do that, then remove the - # backup so it doesn't show up in the diff later. - sed -e 's,-lm,,' -i.bak \ - build_cmake/ROOT/usr/local/lib*/pkgconfig/expat.pc - rm -f build_cmake/ROOT/usr/local/lib*/pkgconfig/expat.pc.bak - fi - - diff \ - --recursive \ - --unified \ - --exclude=xmlwf \ - --exclude=xmlwf.exe \ - --exclude=libexpat.a \ - --exclude=libexpat-*.dll \ - --exclude=libexpat.dll.a \ - --exclude=libexpat.la \ - --exclude=libexpat.so\* \ - --exclude=libexpat.\*dylib \ - --exclude=expat_config.h \ - build_{autotools,cmake}/ROOT - - - name: (Linux except MinGW) Check for identical exported symbols from both build systems - if: "${{ runner.os == 'Linux' && ! contains(matrix.configure_args, 'mingw') }}" - run: | - list_shared_library_symbols_sh="${GITHUB_WORKSPACE}"/.github/workflows/scripts/list-shared-library-symbols.sh - exported_symbols_txt="${GITHUB_WORKSPACE}"/.github/workflows/data/exported-symbols.txt - - set -x - cd expat/expat-*.*.*/ - diff -u "${exported_symbols_txt}" <("${list_shared_library_symbols_sh}" build_autotools/ROOT/usr/local/lib*/libexpat.so) - diff -u "${exported_symbols_txt}" <("${list_shared_library_symbols_sh}" build_cmake/ROOT/usr/local/lib*/libexpat.so) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml deleted file mode 100644 index ebee2512..00000000 --- a/.github/workflows/clang-format.yml +++ /dev/null @@ -1,68 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2021-2024 Sebastian Pipping -# Copyright (c) 2023 Joyce Brum -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Enforce clang-format clean code - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - clang_format: - name: Enforce clang-format clean code - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Install clang-format 19 - run: |- - set -x - source /etc/os-release - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo add-apt-repository "deb https://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-19 main" - sudo apt-get update # due to new repository - sudo apt-get install --yes --no-install-recommends -V \ - clang-format-19 \ - moreutils - echo /usr/lib/llvm-19/bin >>"${GITHUB_PATH}" - - - name: Run clang-format - run: | - set -x - cd expat/ - ./apply-clang-format.sh - git config color.diff always - git diff --exit-code # i.e. fail CI when there is a diff (and present it) diff --git a/.github/workflows/clang-static-analyzer.yml b/.github/workflows/clang-static-analyzer.yml deleted file mode 100644 index f0d6acd3..00000000 --- a/.github/workflows/clang-static-analyzer.yml +++ /dev/null @@ -1,90 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2025 Sebastian Pipping -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Enforce Clang Static Analyzer (scan-build) clean code - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - clang_static_analyzer: - name: Enforce Clang Static Analyzer (scan-build) clean code - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Install Clang 19 (including scan-build) - run: |- - set -x - source /etc/os-release - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo add-apt-repository "deb https://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-19 main" - sudo apt-get update # due to new repository - sudo apt-get install --yes --no-install-recommends -V \ - clang-19 \ - clang-tools-19 - echo /usr/lib/llvm-19/bin >>"${GITHUB_PATH}" - - - name: Build using scan-build - run: | - set -x - - clang --version | head -n1 - clang++ --version | head -n1 - - available_checkers="$(scan-build --help | grep -o '^ [+ ] [^. ]\+\.[^ ]\+' | sed 's,^.\{3\},,' | sort)" - [[ "$(wc -l <<<"${available_checkers}")" -ge 103 ]] # self-test - - enabled_checkers="$(grep -v \ - -e '^optin\.performance\.Padding$' \ - -e '^security\.insecureAPI\.strcpy$' \ - <<<"${available_checkers}")" - [[ "$(wc -l <<<"${enabled_checkers}")" -ge 101 ]] # self-test - - scan-build \ - -o html/ \ - $(sed 's,^,-enable-checker ,' <<<"${enabled_checkers}") \ - sh -c 'cmake -S expat/ -B build/ && make -C build -j$(nproc) VERBOSE=1' - - rmdir html || false 'The report directory is non-empty, i.e. Clang Static Analyzer found an issue! Please download and inspect the zip file artifact attached to this CI run. Thanks!' - - - name: Store scan-build report - if: always() - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: expat_scan_build_report_${{ github.sha }} - path: html/ - if-no-files-found: ignore diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml deleted file mode 100644 index 2db4dac0..00000000 --- a/.github/workflows/clang-tidy.yml +++ /dev/null @@ -1,65 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2021-2024 Sebastian Pipping -# Copyright (c) 2023 Joyce Brum -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Enforce clang-tidy clean code - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - clang_tidy: - name: Enforce clang-tidy clean code - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Install clang-tidy 19 - run: |- - set -x - source /etc/os-release - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo add-apt-repository "deb https://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-19 main" - sudo apt-get update # due to new repository - sudo apt-get install --yes --no-install-recommends -V \ - clang-tidy-19 - echo /usr/lib/llvm-19/bin >>"${GITHUB_PATH}" - - - name: Run clang-tidy - run: | - set -x - cd expat/ - ./apply-clang-tidy.sh diff --git a/.github/workflows/cmake-required-version.yml b/.github/workflows/cmake-required-version.yml deleted file mode 100644 index 0f7d8dc5..00000000 --- a/.github/workflows/cmake-required-version.yml +++ /dev/null @@ -1,78 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2021-2025 Sebastian Pipping -# Copyright (c) 2023 Joyce Brum -# Copyright (c) 2024 Dag-Erling Smørgrav -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Ensure realistic minimum CMake version requirement - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - checks: - name: Ensure realistic minimum CMake version requirement - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Install ancient CMake - run: | - set -ux - - needed_cmake_version="$(sed -n 's/cmake_minimum_required(VERSION \(.*\))/\1/p' expat/CMakeLists.txt)" - - installer_filename="cmake-${needed_cmake_version}-linux-x86_64.sh" - download_url="https://github.com/Kitware/CMake/releases/download/v${needed_cmake_version}/${installer_filename}" - wget --no-verbose "${download_url}" - - chmod +x "${installer_filename}" - mkdir -p ~/.local/ - - ./"${installer_filename}" --prefix="${HOME}"/.local/ --skip-license - - hash cmake # or the running shell will keep using the cached old location - present_cmake_version="$(cmake --version | sed -n 's/cmake version \(.*\)/\1/p')" - [[ ${present_cmake_version} = ${needed_cmake_version} ]] - - - name: Build libexpat using ancient CMake - run: | - set -ux - mkdir expat/build - cd expat/build - cmake --version - cmake .. - make VERBOSE=1 all test install DESTDIR="${PWD}/ROOT/" - find ROOT/ -not -type d | sort diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index aed97590..00000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,54 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2021-2024 Sebastian Pipping -# Copyright (c) 2023 Joyce Brum -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Enforce codespell-clean spelling - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - checks: - name: Enforce codespell-clean spelling - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # v2.1 - with: - path: expat/ - # "arameter" is from "[p]arameter" in xmlwf help output - # "otation" is from "[n]otation" in xmlwf help output - ignore_words_list: arameter,otation diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 01e94c9b..00000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,91 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2021-2024 Sebastian Pipping -# Copyright (c) 2023 Joyce Brum -# Copyright (c) 2024 Dag-Erling Smørgrav -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Collect test coverage - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - checks: - name: Collect test coverage - runs-on: ubuntu-22.04 - env: - CFLAGS: -g3 -pipe - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Install build dependencies - run: |- - set -x -u - source /etc/os-release - - # Unlock 32bit architecture (for Wine further down) - sudo dpkg --add-architecture i386 # for wine32 - sudo apt-get update # due to new architecture - - sudo apt-get install --yes --no-install-recommends -V \ - cmake \ - docbook-xml \ - docbook2x \ - gcc-multilib \ - g++-multilib \ - lcov \ - libbsd-dev \ - lzip \ - moreutils - - # Install 32bit Wine - sudo apt-get install --yes --no-install-recommends -V \ - mingw-w64 \ - wine-stable \ - wine32:i386 - - name: Unshallow Git clone - run: | - git fetch --force --tags --unshallow origin # for "git describe" in coverage.sh - - name: Collect test coverage - env: - MODE: coverage-sh - run: | - exec ./.ci.sh - - - name: Store coverage .info and HTML report - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: coverage - path: expat/coverage__*/ - if-no-files-found: error diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml deleted file mode 100644 index 14f39c66..00000000 --- a/.github/workflows/coverity-scan.yml +++ /dev/null @@ -1,125 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2024-2025 Sebastian Pipping -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Upload build to Coverity Scan - -on: - push: - branches: - - master - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - coverity_scan_upload: - name: Upload build to Coverity Scan - # NOTE: The idea is not to bother fork repositories with a job - # that is doomed to fail - if: ${{ github.repository == 'libexpat/libexpat' }} - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - # The next two lines ensure clean and public-only submissions - repository: libexpat/libexpat - ref: master - # This will allow to do "git describe --tags" further done - fetch-depth: 0 - - - name: Determine version string - id: determine_version - run: |- - set -x - tee "${GITHUB_OUTPUT}" <<< "version=$(git describe --tags | sed -e 's,^R_,,' -e 's,_,.,g')" - tee -a "${GITHUB_OUTPUT}" <<< "git_commit=$(git rev-parse HEAD)" - - - name: Install Clang 19 - run: |- - set -x - source /etc/os-release - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo add-apt-repository "deb https://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-19 main" - sudo apt-get update # due to new repository - sudo apt-get install --yes --no-install-recommends -V \ - clang-19 \ - libclang-rt-19-dev \ - llvm-19 - echo /usr/lib/llvm-19/bin >>"${GITHUB_PATH}" - - - name: Install build dependencies - run: |- - set -x - sudo apt-get install --yes --no-install-recommends -V \ - libprotobuf-dev \ - protobuf-compiler - - - name: Configure using CMake - run: | - set -x -o pipefail - - type -P clang clang++ - clang --version | head -n1 - clang++ --version | head -n1 - - cd expat/ - args=( - -DEXPAT_BUILD_DOCS=OFF - -DEXPAT_BUILD_FUZZERS=ON - - # Tune compilation of fuzzers to (1) pass all sanity checks from - # CMakeLists.txt (that e.g. require use of fuzzers with sanitizers) - # and (2) ideally speed up compilation since no machine or human - # will be running the binaries we build for nothing but Coverity: - -DCMAKE_C_COMPILER=clang - -DCMAKE_CXX_COMPILER=clang++ - -DCMAKE_{C,CXX}_FLAGS='-O1 -g -fsanitize=address' - -DCMAKE_{EXE,MODULE,SHARED}_LINKER_FLAGS='-g -fsanitize=address' - ) - cmake "${args[@]}" -S . -B . - - - uses: vapier/coverity-scan-action@2068473c7bdf8c2fb984a6a40ae76ee7facd7a85 # v1.8.0 - with: - email: ${{ secrets.COVERITY_SCAN_EMAIL }} - token: ${{ secrets.COVERITY_SCAN_TOKEN }} - command: make VERBOSE=1 - working-directory: "${{ github.workspace }}/expat" - version: "${{ steps.determine_version.outputs.version }}" - # NOTE: The commit here is not necessarily the same as ${{ github.sha }} that triggered the action. - description: "coverity-scan-action libexpat/libexpat / ${{ steps.determine_version.outputs.git_commit }}" - - - name: Offer analysis tarball for inspection - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: expat_coverity_scan_upload_${{ github.sha }} - path: expat/cov-int.tgz - if-no-files-found: error diff --git a/.github/workflows/cppcheck.yml b/.github/workflows/cppcheck.yml deleted file mode 100644 index a987b3a7..00000000 --- a/.github/workflows/cppcheck.yml +++ /dev/null @@ -1,57 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2021-2025 Sebastian Pipping -# Copyright (c) 2023 Joyce Brum -# Copyright (c) 2024 Dag-Erling Smørgrav -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Run Cppcheck (from macOS Homebrew) - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - checks: - name: Run Cppcheck - runs-on: macos-14 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Install runtime dependencies - run: | - set -x - brew update - exec brew install cppcheck - - name: Run Cppcheck - run: | - exec .github/workflows/scripts/mass-cppcheck.sh diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml deleted file mode 100644 index 5c9cc961..00000000 --- a/.github/workflows/emscripten.yml +++ /dev/null @@ -1,68 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2025 Sebastian Pipping -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Build with Emscripten - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - emscripten: - name: Build with Emscripten - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Install build dependencies - run: |- - set -x - sudo apt-get update - sudo apt-get install --yes --no-install-recommends -V \ - cmake \ - emscripten \ - make - - - name: Build using musl-tools - run: | - cmake_args=( - -DCMAKE_C_FLAGS='-O1 -pipe -Wall -Wextra -pedantic -Wno-overlength-strings' - -DCMAKE_CXX_FLAGS='-O2 -pipe -Wall -Wextra -pedantic -Wno-overlength-strings' - -DEXPAT_BUILD_DOCS=OFF - -DEXPAT_WARNINGS_AS_ERRORS=ON - ) - set -x - emcmake cmake "${cmake_args[@]}" -S expat/ -B build/ - emmake make -C build -j$(nproc) VERBOSE=1 all diff --git a/.github/workflows/expat_config_h.yml b/.github/workflows/expat_config_h.yml deleted file mode 100644 index aca49c2c..00000000 --- a/.github/workflows/expat_config_h.yml +++ /dev/null @@ -1,63 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2020-2025 Sebastian Pipping -# Copyright (c) 2023 Joyce Brum -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Check expat_config.h.{in,cmake} for regressions - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - checks: - name: Check expat_config.h.{in,cmake} for regressions - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Check expat_config.h.{in,cmake} for regressions - run: | - set -v - # A non-empty diff indicates a change in the list of macros exported: - # - Removals would be trouble (because expat_config.h is installed). - # - Additions could use an extra check by a human - ( cd expat && ./buildconf.sh ) # generate expat_config.h.in - diff -u <(sort < .github/workflows/data/expat_config_h_in__expected.txt) <(.github/workflows/scripts/list_exported_macros.sh expat/expat_config.h.in) - diff -u <(sort < .github/workflows/data/expat_config_h_cmake__expected.txt) <(.github/workflows/scripts/list_exported_macros.sh expat/expat_config.h.cmake) - - # Informational (and not an ideal state) - diff -u \ - <(sort < .github/workflows/data/expat_config_h_in__expected.txt) \ - <(sort < .github/workflows/data/expat_config_h_cmake__expected.txt) \ - || true diff --git a/.github/workflows/fuzzing.yml b/.github/workflows/fuzzing.yml deleted file mode 100644 index 6e14fffa..00000000 --- a/.github/workflows/fuzzing.yml +++ /dev/null @@ -1,173 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2024-2025 Sebastian Pipping -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Run fuzzing regression tests - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - run_fuzzers: - name: Run fuzzing regression tests - strategy: - fail-fast: false - matrix: - fuzzer: - - xml_parse_fuzzer_UTF-8 - - xml_parsebuffer_fuzzer_UTF-16LE - runs-on: ubuntu-24.04 - env: - fuzzer: ${{ matrix.fuzzer }} - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Install Clang 19 - run: |- - set -x - source /etc/os-release - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo add-apt-repository "deb https://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-19 main" - sudo apt-get update # due to new repository - sudo apt-get install --yes --no-install-recommends -V \ - clang-19 \ - libclang-rt-19-dev \ - llvm-19 - echo /usr/lib/llvm-19/bin >>"${GITHUB_PATH}" - - - name: Install build dependencies - run: |- - set -x - sudo apt-get install --yes --no-install-recommends -V \ - autoconf \ - automake \ - docbook2x \ - libtool \ - libprotobuf-dev \ - lzip \ - protobuf-compiler - - - name: Turn Git clone into Autotools "make dist" release tarball - run: |- - set -x - pushd expat/ - ./buildconf.sh - ./configure - make dist - popd - tar xf expat/expat-*.tar.xz - rm -R expat/ - mv expat-* expat - - - name: Build Expat fuzzers - run: | - set -x -o pipefail - - type -P clang clang++ - clang --version | head -n1 - clang++ --version | head -n1 - - cd expat/ - args=( - # Build nothing but fuzzers - -DEXPAT_BUILD_DOCS=OFF - -DEXPAT_BUILD_EXAMPLES=OFF - -DEXPAT_BUILD_FUZZERS=ON - -DEXPAT_BUILD_PKGCONFIG=OFF - -DEXPAT_BUILD_TESTS=OFF - -DEXPAT_BUILD_TOOLS=OFF - - # Tune compilation of fuzzers to use Clang with ASan and UBSan - -DCMAKE_C_COMPILER=clang - -DCMAKE_CXX_COMPILER=clang++ - -DCMAKE_{C,CXX}_FLAGS='-Wall -Wextra -pedantic -O1 -g -fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer -fno-common -fprofile-instr-generate -fcoverage-mapping' - -DCMAKE_{EXE,MODULE,SHARED}_LINKER_FLAGS='-g -fsanitize=address,undefined' - -DEXPAT_WARNINGS_AS_ERRORS=ON - ) - cmake "${args[@]}" -S . -B build - make -C build VERBOSE=1 -j$(nproc) - - ./build/fuzz/xml_lpm_fuzzer -help=1 - - - name: Download and extract Expat fuzzing corpora - run: |- - set -x - cd expat/build/ - wget -q -O corpus.zip "https://storage.googleapis.com/expat-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/expat_${fuzzer}/public.zip" - unzip -q -d corpus/ corpus.zip - - - name: Run fuzzing regression tests (1 to 5 minutes) - run: | - fuzz_args=( - -jobs=$(nproc) - -print_final_stats=1 - -rss_limit_mb=2560 # from OSS-Fuzz - -timeout=25 # from OSS-Fuzz - ) - - set -x -o pipefail - cd expat/build/ - - mkdir coverage/ - export LLVM_PROFILE_FILE=coverage/expat-%p.profraw - - find corpus/ -type f | sort | xargs "fuzz/${fuzzer}" "${fuzz_args[@]}" - - - name: Store fuzzing logs of last batch - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: ${{ matrix.fuzzer }}_${{ github.sha }}_logs_last - path: expat/build/fuzz-*.log - if-no-files-found: error - - - name: Render coverage report - run: | - set -x -o pipefail - cd expat/build/ - - # Merged and convert to a single indexed profile data file - llvm-profdata merge -sparse -o coverage/expat.profdata coverage/expat-*.profraw - - # Render report - llvm-cov show fuzz/${fuzzer} -instr-profile=coverage/expat.profdata -show-branches=count -format=html -output-dir=coverage/html/ - llvm-cov report fuzz/${fuzzer} -instr-profile=coverage/expat.profdata -show-functions -sources ../lib/ | tee coverage/report_functions.txt - llvm-cov report fuzz/${fuzzer} -instr-profile=coverage/expat.profdata -sources ../lib/ | tee coverage/report_files.txt - - - name: Store coverage report - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: ${{ matrix.fuzzer }}_${{ github.sha }}_coverage - path: expat/build/coverage/ - if-no-files-found: error diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100644 index 1ea03b7b..00000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,129 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2021-2025 Sebastian Pipping -# Copyright (c) 2023 Joyce Brum -# Copyright (c) 2023 Hanno Böck -# Copyright (c) 2024 Dag-Erling Smørgrav -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Run Linux CI tasks - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - checks: - name: Perform checks - strategy: - matrix: - include: - - MODE: cmake-oos - - MODE: distcheck - - MODE: qa-sh - FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address - - MODE: qa-sh - FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS=-DEXPAT_ATTR_INFO=ON - - MODE: qa-sh - FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS=-DEXPAT_CONTEXT_BYTES=0 - - MODE: qa-sh - FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS="-DEXPAT_DTD=OFF -DEXPAT_GE=ON" - - MODE: qa-sh - FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS="-DEXPAT_DTD=OFF -DEXPAT_GE=OFF" - - MODE: qa-sh - FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS=-DEXPAT_LARGE_SIZE=ON - - MODE: qa-sh - FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS=-DEXPAT_MIN_SIZE=ON - - MODE: qa-sh - FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address CMAKE_ARGS=-DEXPAT_NS=OFF - - MODE: qa-sh - FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=cfi - - MODE: qa-sh - FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=memory - - MODE: qa-sh - FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=undefined - - MODE: qa-sh - FLAT_ENV: CC=gcc CXX=g++ LD=ld QA_PROCESSOR=gcov - - MODE: qa-sh - FLAT_ENV: CC=gcc CXX=g++ LD=ld QA_PROCESSOR=gcov CMAKE_ARGS=-D_EXPAT_M32=ON - - MODE: qa-sh - FLAT_ENV: CC=gcc CXX=g++ LD=ld QA_PROCESSOR=gcov CMAKE_ARGS="-D_EXPAT_M32=ON -DEXPAT_ATTR_INFO=ON" - - MODE: qa-sh - FLAT_ENV: CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ LD=i686-w64-mingw32-ld QA_PROCESSOR=gcov CMAKE_ARGS="-DCMAKE_SYSTEM_NAME=Windows -DWIN32=ON -DMINGW=ON -DEXPAT_ATTR_INFO=ON" - - MODE: qa-sh - FLAT_ENV: CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ LD=i686-w64-mingw32-ld QA_PROCESSOR=gcov CMAKE_ARGS="-DCMAKE_SYSTEM_NAME=Windows -DWIN32=ON -DMINGW=ON -DEXPAT_ATTR_INFO=ON -DEXPAT_CHAR_TYPE=wchar_t" - runs-on: ubuntu-22.04 - env: - CFLAGS: -g3 -pipe - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Install build dependencies (MinGW) - if: "${{ contains(matrix.FLAT_ENV, 'mingw') }}" - run: |- - set -x - - # Install 32bit Wine - sudo dpkg --add-architecture i386 # for wine32 - sudo apt-get update # due to new architecture - sudo apt-get install --yes --no-install-recommends -V \ - mingw-w64 \ - wine-stable \ - wine32:i386 - - name: Install build dependencies (Non-MinGW) - if: "${{ ! contains(matrix.FLAT_ENV, 'mingw') }}" - run: |- - set -x - source /etc/os-release - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo add-apt-repository "deb https://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-19 main" - sudo apt-get update # due to new repository - # NOTE: Please note the version-specific ${PATH} extension for Clang adding /usr/lib/llvm-19/bin in .ci.sh - sudo apt-get install --yes --no-install-recommends -V \ - clang-19 \ - libclang-rt-19-dev - - name: Install build dependencies (common) - run: |- - sudo apt-get install --yes --no-install-recommends -V \ - cmake \ - docbook2x \ - gcc-multilib \ - g++-multilib \ - lcov \ - libbsd-dev \ - lzip \ - moreutils - - name: Perform check "${{ matrix.MODE }}" - env: - MODE: ${{ matrix.MODE }} - run: | - env ${{ matrix.FLAT_ENV }} ./.ci.sh diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 28a44656..00000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,66 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2020-2024 Sebastian Pipping -# Copyright (c) 2023 Joyce Brum -# Copyright (c) 2024 Dag-Erling Smørgrav -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Run macOS CI tasks - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - checks: - name: Perform checks - strategy: - matrix: - os: [macos-13, macos-15] - include: - - MODE: cmake-oos - - MODE: distcheck - - MODE: qa-sh - FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Install build dependencies - run: | - sudo rm /usr/local/bin/2to3 # so that "brew link" will work - brew bundle # acts upon file Brewfile - - name: Perform check "${{ matrix.MODE }}" - env: - MODE: ${{ matrix.MODE }} - run: | - env ${{ matrix.FLAT_ENV }} ./.ci.sh diff --git a/.github/workflows/musl.yml b/.github/workflows/musl.yml deleted file mode 100644 index 94b413b0..00000000 --- a/.github/workflows/musl.yml +++ /dev/null @@ -1,69 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2025 Sebastian Pipping -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Build with musl - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - musl: - name: Build with musl - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Install build dependencies - run: |- - set -x - sudo apt-get update - sudo apt-get install --yes --no-install-recommends -V \ - cmake \ - musl-tools - - - name: Build using musl-tools - run: | - cmake_args=( - -DCMAKE_C_COMPILER=musl-gcc - -DCMAKE_CXX_COMPILER=g++ # musl-tools does not support C++ - -DCMAKE_C_FLAGS='-O1 -pipe -Wall -Wextra -pedantic -Wno-overlength-strings' - -DCMAKE_CXX_FLAGS='-O0 -pipe' - -DEXPAT_BUILD_DOCS=OFF - -DEXPAT_WARNINGS_AS_ERRORS=ON - ) - set -x - cmake "${cmake_args[@]}" -S expat/ -B build/ - make -C build -j$(nproc) VERBOSE=1 all diff --git a/.github/workflows/perl-integration.yml b/.github/workflows/perl-integration.yml deleted file mode 100644 index 1662cf94..00000000 --- a/.github/workflows/perl-integration.yml +++ /dev/null @@ -1,78 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2025 Sebastian Pipping -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Run Perl XML::Parser integration tests - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - perl_integration: - name: Run Perl XML::Parser integration tests - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Build and replace system Expat - run: | - set -x - - cd expat/ - args=( - # Replace system Expat - -DCMAKE_INSTALL_PREFIX=/usr - - # Build nothing but core library - -DEXPAT_BUILD_DOCS=OFF - -DEXPAT_BUILD_EXAMPLES=OFF - -DEXPAT_BUILD_TESTS=OFF - -DEXPAT_BUILD_TOOLS=OFF - ) - cmake "${args[@]}" -S . -B build - make -C build VERBOSE=1 -j$(nproc) - sudo make -C build VERBOSE=1 install - - - name: Run Perl XML::Parser integration tests - run: | - set -x - - # NOTE: The version pin is for CI stability. - git clone --depth 1 --branch 2.47 https://github.com/cpan-authors/XML-Parser - cd XML-Parser/ - - perl Makefile.PL - make -j$(nproc) - make test diff --git a/.github/workflows/valid-xml.yml b/.github/workflows/valid-xml.yml deleted file mode 100644 index 580d204a..00000000 --- a/.github/workflows/valid-xml.yml +++ /dev/null @@ -1,70 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2021-2025 Sebastian Pipping -# Copyright (c) 2023 Joyce Brum -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Ensure well-formed and valid XML - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - checks: - name: Ensure well-formed and valid XML - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Install build dependencies - run: |- - set -x - sudo apt-get update - sudo apt-get install --yes --no-install-recommends -V \ - docbook \ - libxml2-utils \ - w3c-sgml-lib - - - name: Ensure well-formed and valid XML - run: | - set -x - - # Target offline validation rather than online (for robust CI) - sed 's,http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd,file:///usr/share/sgml/docbook/dtd/4.2/docbookx.dtd,' -i expat/doc/xmlwf.xml - sed 's,http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd,file:///usr/share/xml/w3c-sgml-lib/schema/dtd/REC-xhtml1-20020801/xhtml1-strict.dtd,' -i expat/doc/reference.html - - # We're using unshare(1) to take internet access away forcefully - # so that we'll notice whenever our all-offline validation stops being all-offline - unshare --map-root-user --net -- xmllint --nonet --noout --valid expat/doc/reference.html - unshare --map-root-user --net -- xmllint --nonet --noout --valid expat/doc/xmlwf.xml diff --git a/.github/workflows/windows-binaries.yml b/.github/workflows/windows-binaries.yml deleted file mode 100644 index f314564e..00000000 --- a/.github/workflows/windows-binaries.yml +++ /dev/null @@ -1,211 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2025 Sebastian Pipping -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Build Windows binaries - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - windows_binaries: - name: Build ${{ matrix.expat_platform }} binaries - strategy: - fail-fast: false - matrix: - include: - - runs-on: windows-2019 - cmake_build_type: Debug - cmake_generator: Visual Studio 16 2019 - cmake_platform: Win32 - expat_char_type: char - expat_dll: libexpatd.dll - expat_platform: win32 - - runs-on: windows-2019 - cmake_build_type: Debug - cmake_generator: Visual Studio 16 2019 - cmake_platform: x64 - expat_char_type: wchar_t - expat_dll: libexpatwd.dll - expat_platform: win64 - defaults: - run: - shell: bash - runs-on: "${{ matrix.runs-on }}" - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2 - - - name: Install Inno Setup - shell: pwsh - run: |- - Invoke-WebRequest -Uri https://files.jrsoftware.org/is/6/innosetup-6.1.2.exe -OutFile D:\\is.exe - Start-Process -FilePath D:\\is.exe -ArgumentList "/VERYSILENT", "/SUPPRESSMSGBOXES", "/NORESTART" -Wait - - - name: 'Add Inno Setup compiler to ${PATH}' - run: |- - echo 'C:\Program Files (x86)\Inno Setup 6' >> "${GITHUB_PATH}" - - - name: Install Innoextract - env: - version: 1.9 - run: |- - set -x - mkdir innoextract - cd innoextract - export PATH="${PATH}:/c/msys64/usr/bin" # for wget - wget -q https://github.com/dscharrer/innoextract/releases/download/${version}/innoextract-${version}-windows.zip - unzip innoextract-${version}-windows.zip - echo "${GITHUB_WORKSPACE}\innoextract" >> "${GITHUB_PATH}" - - - name: Prepare win64 installer - if: "${{ matrix.expat_platform == 'win64' }}" - run: |- - bat_sed_args=( - -e 's,-A Win32,-A x64,g' - -e 's,win32,win64,g' - ) - inno_sed_args=( - -e 's,^OutputDir=win32,OutputDir=win64,' - -e 's,win32bin,win64bin,' - -e 's,win32\\bin,win64\\bin,g' - ) - set -x - cd expat - mkdir win64 - - sed "${bat_sed_args[@]}" win32/build_expat_iss.bat > win64/build_expat_iss.bat - ! grep -i win32 win64/build_expat_iss.bat # i.e. assert success - - sed "${inno_sed_args[@]}" win32/expat.iss > win64/expat.iss - ! grep 'win32\\bin' win64/expat.iss # i.e. assert success - grep win32 win64/expat.iss # purely informational - - - name: Build installer - env: - expat_platform: ${{ matrix.expat_platform }} - run: |- - set -x - cd expat - - cmd < "${expat_platform}"/build_expat_iss.bat - - ls -lh "${expat_platform}"/*.exe - cp -v "${expat_platform}"/expat-*bin-*.*.*.exe /d/expat-installer.exe - - - name: Create .zip file from installer content - env: - expat_platform: ${{ matrix.expat_platform }} - run: |- - export PATH="${PATH}:/c/msys64/usr/bin" # for zip - set -x - - cd "expat/${expat_platform}" - zip_name="$(echo expat-*bin-*.exe | sed 's,\.exe$,.zip,')" - - # Workaround issues with innoextract 1.9 as documented at - # https://github.com/dscharrer/innoextract/issues/178#issue-2505033557 - innoextract -l expat-*bin-*.exe \ - | awk -F'"' '{print $2}' \ - | xargs dirname \ - | sort -u \ - | xargs mkdir -v -p - - innoextract -e expat-*bin-*.exe - - ls -lh app/Bin/ - - ( cd app && zip -9 -r ../"${zip_name}" . ) - - - name: Offer binaries for download - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: expat_${{ matrix.expat_platform }}_${{ github.sha }} - path: expat/${{ matrix.expat_platform }}/expat-win*bin-*.*.*.* - if-no-files-found: error - - - name: Run installer - shell: pwsh - run: |- - Start-Process -FilePath D:\\expat-installer.exe -ArgumentList "/VERYSILENT", "/SUPPRESSMSGBOXES", "/NORESTART" -Wait - - - name: Build installed code — Configure - env: - cmake_build_type: ${{ matrix.cmake_build_type }} - cmake_generator: ${{ matrix.cmake_generator }} - cmake_platform: ${{ matrix.cmake_platform }} - expat_char_type: ${{ matrix.expat_char_type }} - run: |- - cmake_args=( - -A "${cmake_platform}" - -G "${cmake_generator}" - -DCMAKE_BUILD_TYPE="${cmake_build_type}" - -DEXPAT_CHAR_TYPE="${expat_char_type}" - -DEXPAT_WARNINGS_AS_ERRORS=ON - -Wdev - -Wdeprecated - ) - set -x - cd '/c/Program Files (x86)/Expat '*/Source - mkdir build - cmake -S . -B build "${cmake_args[@]}" - - - name: Build installed code — Build - env: - cmake_build_type: ${{ matrix.cmake_build_type }} - run: |- - msbuild_args=( - -m - -property:Configuration="${cmake_build_type}" - ) - set -x - cd '/c/Program Files (x86)/Expat '*/Source/build - MSBuild.exe "${msbuild_args[@]}" expat.sln - - - name: Build installed code — Run tests - env: - cmake_build_type: ${{ matrix.cmake_build_type }} - expat_dll: ${{ matrix.expat_dll }} - run: |- - ctest_args=( - --build-config "${cmake_build_type}" - --output-on-failure - --parallel 2 - ) - set -x - cd '/c/Program Files (x86)/Expat '*/Source/build - cp -v "${cmake_build_type}/${expat_dll}" "tests/${cmake_build_type}/" - ctest "${ctest_args[@]}" diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml deleted file mode 100644 index 7f629d11..00000000 --- a/.github/workflows/windows-build.yml +++ /dev/null @@ -1,116 +0,0 @@ -# __ __ _ -# ___\ \/ /_ __ __ _| |_ -# / _ \\ /| '_ \ / _` | __| -# | __// \| |_) | (_| | |_ -# \___/_/\_\ .__/ \__,_|\__| -# |_| XML parser -# -# Copyright (c) 2025 Sebastian Pipping -# Licensed under the MIT license: -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the -# following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -# USE OR OTHER DEALINGS IN THE SOFTWARE. - -name: Build on Windows - -on: - pull_request: - push: - schedule: - - cron: '0 2 * * 5' # Every Friday at 2am - workflow_dispatch: - -permissions: - contents: read - -jobs: - windows_build: - name: Build on Windows (${{ matrix.runs-on }}, ${{ matrix.cmake_platform }}, ${{ matrix.expat_char_type }}) - strategy: - fail-fast: false - matrix: - include: - - runs-on: windows-2019 - cmake_build_type: Debug - cmake_generator: Visual Studio 16 2019 - cmake_platform: Win32 - expat_char_type: char - expat_dll: libexpatd.dll - - runs-on: windows-2022 - cmake_build_type: Debug - cmake_generator: Visual Studio 17 2022 - cmake_platform: x64 - expat_char_type: wchar_t - expat_dll: libexpatwd.dll - defaults: - run: - shell: bash - runs-on: "${{ matrix.runs-on }}" - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2 - - - name: Configure - env: - cmake_build_type: ${{ matrix.cmake_build_type }} - cmake_generator: ${{ matrix.cmake_generator }} - cmake_platform: ${{ matrix.cmake_platform }} - expat_char_type: ${{ matrix.expat_char_type }} - run: |- - cmake_args=( - -A "${cmake_platform}" - -G "${cmake_generator}" - -DCMAKE_BUILD_TYPE="${cmake_build_type}" - -DEXPAT_CHAR_TYPE="${expat_char_type}" - -DEXPAT_WARNINGS_AS_ERRORS=ON - -Wdev - -Wdeprecated - ) - set -x - cd expat - mkdir build - cmake -S . -B build "${cmake_args[@]}" - - - name: Build - env: - cmake_build_type: ${{ matrix.cmake_build_type }} - run: |- - msbuild_args=( - -m - -property:Configuration="${cmake_build_type}" - ) - set -x - cd expat/build - MSBuild.exe "${msbuild_args[@]}" expat.sln - - - name: Run tests - env: - cmake_build_type: ${{ matrix.cmake_build_type }} - expat_dll: ${{ matrix.expat_dll }} - run: |- - ctest_args=( - --build-config "${cmake_build_type}" - --output-on-failure - --parallel 2 - ) - set -x - cd expat/build - cp -v "${cmake_build_type}/${expat_dll}" "tests/${cmake_build_type}/" - ctest "${ctest_args[@]}"