From 8e7c117e8ff7ae7ec1224780b95153b61152f748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 1 May 2024 11:54:07 +0200 Subject: [PATCH 1/7] github-ci: Don't die if already exists. --- .github/workflows/cmake-required-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-required-version.yml b/.github/workflows/cmake-required-version.yml index 030e363b..de41fe8c 100644 --- a/.github/workflows/cmake-required-version.yml +++ b/.github/workflows/cmake-required-version.yml @@ -58,7 +58,7 @@ jobs: wget --no-verbose "${download_url}" chmod +x "${installer_filename}" - mkdir ~/.local/ + mkdir -p ~/.local/ ./"${installer_filename}" --prefix="${HOME}"/.local/ --skip-license From 85e01c40046684d9464637addd62f144b2959ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 1 May 2024 11:55:02 +0200 Subject: [PATCH 2/7] github-ci: Drop requirement for GNU find. --- .ci.sh | 3 +-- .github/workflows/cppcheck.yml | 2 +- .github/workflows/scripts/mass-cppcheck.sh | 8 +------- Brewfile | 1 - 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.ci.sh b/.ci.sh index 374bc025..3913c997 100755 --- a/.ci.sh +++ b/.ci.sh @@ -38,7 +38,6 @@ if [[ ${RUNNER_OS} = macOS ]]; then latest_brew_python3_bin="$(ls -1d /usr/local/Cellar/python/3.*/bin | sort -n | tail -n1)" export PATH="${latest_brew_python3_bin}${PATH:+:}${PATH}" export PATH="/usr/local/opt/coreutils/libexec/gnubin${PATH:+:}${PATH}" - export PATH="/usr/local/opt/findutils/libexec/gnubin${PATH:+:}${PATH}" elif [[ ${RUNNER_OS} = Linux ]]; then export PATH="/usr/lib/llvm-18/bin:${PATH}" else @@ -65,7 +64,7 @@ elif [[ ${MODE} = cmake-oos ]]; then cmake ${CMAKE_ARGS} .. make VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=1 all test make DESTDIR="${PWD}"/ROOT install - find ROOT -printf "%P\n" | sort + find ROOT | cut -c 6- | sort elif [[ ${MODE} = coverage-sh ]]; then ./coverage.sh else diff --git a/.github/workflows/cppcheck.yml b/.github/workflows/cppcheck.yml index 0c9558a5..e6f43891 100644 --- a/.github/workflows/cppcheck.yml +++ b/.github/workflows/cppcheck.yml @@ -48,7 +48,7 @@ jobs: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Install runtime dependencies run: | - exec brew install cppcheck findutils + exec brew install cppcheck - name: Run Cppcheck run: | exec .github/workflows/scripts/mass-cppcheck.sh diff --git a/.github/workflows/scripts/mass-cppcheck.sh b/.github/workflows/scripts/mass-cppcheck.sh index 0eaa407e..fb3ef6b8 100755 --- a/.github/workflows/scripts/mass-cppcheck.sh +++ b/.github/workflows/scripts/mass-cppcheck.sh @@ -31,14 +31,8 @@ PS4='# ' set -e -u -o pipefail -x -if [[ "$(uname -s)" =~ ^Darwin ]]; then - export PATH="/usr/local/opt/findutils/libexec/gnubin${PATH:+:}${PATH}" -fi - cppcheck --version -find --version | head -n1 - for xml_context_bytes in 0 1024; do for xml_ge in 0 1; do cppcheck_args=( @@ -63,6 +57,6 @@ for xml_context_bytes in 0 1024; do -exec cppcheck "${cppcheck_args[@]}" {} + ) - time find "${find_args[@]}" + time find . "${find_args[@]}" done done diff --git a/Brewfile b/Brewfile index 740aab51..118b2bdb 100644 --- a/Brewfile +++ b/Brewfile @@ -4,7 +4,6 @@ brew "cmake" brew "coreutils" brew "docbook2x" brew "dos2unix" -brew "findutils" brew "gcc" brew "gettext" brew "ghostscript" From d69aee5244a270417fa32535361b966c394a586d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 1 May 2024 11:57:50 +0200 Subject: [PATCH 3/7] github-ci: Switch macOS tests over to supported releases. --- .github/workflows/autotools-cmake.yml | 2 +- .github/workflows/cppcheck.yml | 2 +- .github/workflows/macos.yml | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/autotools-cmake.yml b/.github/workflows/autotools-cmake.yml index 0d371f11..bf48db9b 100644 --- a/.github/workflows/autotools-cmake.yml +++ b/.github/workflows/autotools-cmake.yml @@ -46,7 +46,7 @@ jobs: strategy: matrix: include: - - os: macos-11 + - os: macos-14 configure_args: cmake_args: - os: ubuntu-20.04 diff --git a/.github/workflows/cppcheck.yml b/.github/workflows/cppcheck.yml index e6f43891..c7ec305d 100644 --- a/.github/workflows/cppcheck.yml +++ b/.github/workflows/cppcheck.yml @@ -43,7 +43,7 @@ permissions: jobs: checks: name: Run Cppcheck - runs-on: macos-12 + runs-on: macos-14 steps: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Install runtime dependencies diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 1c7f3499..9f1abf18 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -45,6 +45,7 @@ jobs: name: Perform checks strategy: matrix: + os: [macos-12, macos-14] include: # NOTE: This is a quick port from .travis.yml in reaction to # Homebrew issues at Travis CI. While we have the matrix @@ -53,7 +54,7 @@ jobs: - MODE: distcheck - MODE: qa-sh FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address - runs-on: macos-11 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Install build dependencies From 26be7c3f117dd7488bfa3091f5cfdc488accff74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 1 May 2024 12:16:29 +0200 Subject: [PATCH 4/7] github-ci: Enable exhaustive branch analysis in cppcheck job. --- .github/workflows/scripts/mass-cppcheck.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/scripts/mass-cppcheck.sh b/.github/workflows/scripts/mass-cppcheck.sh index fb3ef6b8..8a081a8b 100755 --- a/.github/workflows/scripts/mass-cppcheck.sh +++ b/.github/workflows/scripts/mass-cppcheck.sh @@ -39,6 +39,7 @@ for xml_context_bytes in 0 1024; do --quiet --error-exitcode=1 --force + --check-level=exhaustive --suppress=objectIndex --suppress=unknownMacro -DXML_CONTEXT_BYTES=${xml_context_bytes} From 2083722b95e2f6decba4113be3c5fa499de7dcc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 1 May 2024 12:24:11 +0200 Subject: [PATCH 5/7] github-ci: Install docbook-xml. Some tests use the xmlwf documentation as sample input. It is written in DocBook, and the tests appear to be failing because they try to fetch it at run time, which is not allowed. Work around this by installing it in advance. --- .github/workflows/coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b9450512..a8e0b9e6 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -59,6 +59,7 @@ jobs: sudo apt-get install --yes --no-install-recommends -V \ cmake \ + docbook-xml \ docbook2x \ dos2unix \ gcc-multilib \ From 58539734545fbd2e271f6cb3f798c253390024cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Thu, 2 May 2024 21:36:16 +0200 Subject: [PATCH 6/7] github-ci: Remove obsolete comments referencing Travis CI. --- .github/workflows/linux.yml | 2 -- .github/workflows/macos.yml | 3 --- 2 files changed, 5 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 66fcc0c3..22bcb702 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -47,8 +47,6 @@ jobs: strategy: matrix: include: - # NOTE: This is a quick port from .travis.yml in reaction to - # stability issues at Travis CI. - MODE: cmake-oos - MODE: distcheck - MODE: qa-sh diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9f1abf18..f942a8ec 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -47,9 +47,6 @@ jobs: matrix: os: [macos-12, macos-14] include: - # NOTE: This is a quick port from .travis.yml in reaction to - # Homebrew issues at Travis CI. While we have the matrix - # in two places, please keep the two files in sync. Thank you! - MODE: cmake-oos - MODE: distcheck - MODE: qa-sh From 2f2057733f837c4dbfa1c9a770b70b5ab7bc37bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Thu, 2 May 2024 23:17:16 +0200 Subject: [PATCH 7/7] github-ci: Drop requirement for GNU coreutils. --- .ci.sh | 1 - Brewfile | 1 - 2 files changed, 2 deletions(-) diff --git a/.ci.sh b/.ci.sh index 3913c997..e855be9c 100755 --- a/.ci.sh +++ b/.ci.sh @@ -37,7 +37,6 @@ set -e if [[ ${RUNNER_OS} = macOS ]]; then latest_brew_python3_bin="$(ls -1d /usr/local/Cellar/python/3.*/bin | sort -n | tail -n1)" export PATH="${latest_brew_python3_bin}${PATH:+:}${PATH}" - export PATH="/usr/local/opt/coreutils/libexec/gnubin${PATH:+:}${PATH}" elif [[ ${RUNNER_OS} = Linux ]]; then export PATH="/usr/lib/llvm-18/bin:${PATH}" else diff --git a/Brewfile b/Brewfile index 118b2bdb..f4bf3b39 100644 --- a/Brewfile +++ b/Brewfile @@ -1,7 +1,6 @@ brew "autoconf" brew "automake" brew "cmake" -brew "coreutils" brew "docbook2x" brew "dos2unix" brew "gcc"