summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2022-09-09 16:00:53 +0200
committerGitHub <noreply@github.com>2022-09-09 16:00:53 +0200
commit1cc2b29c47d0daa2fb7efcd418ddcfaa4f1833b2 (patch)
tree566a9c6faf5b47d59e6b309feeadd1aec43748c5
parent9d246a722576be37d6880a63782dab30132d423e (diff)
parent0d2def4cce8e7a1bb6940720f478d5e2a16ee89f (diff)
downloadlibexpat-git-1cc2b29c47d0daa2fb7efcd418ddcfaa4f1833b2.tar.gz
Merge pull request #632 from libexpat/github-actions-off-deprecated-ubuntu-18-04
Get GitHub Actions CI off deprecated Ubuntu 18.04
-rw-r--r--.github/workflows/coverage.yml37
-rw-r--r--.github/workflows/expat_config_h.yml2
-rw-r--r--.github/workflows/linux.yml47
-rw-r--r--expat/Changes4
-rw-r--r--expat/cmake/mingw-toolchain.cmake1
-rwxr-xr-xexpat/coverage.sh4
-rwxr-xr-xexpat/qa.sh4
7 files changed, 68 insertions, 31 deletions
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 66839ee8..3de03475 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -38,26 +38,18 @@ on:
jobs:
checks:
name: Collect test coverage
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-22.04
env:
CFLAGS: -g3 -pipe
steps:
- uses: actions/checkout@v3.0.2
- - name: Add Clang/LLVM repositories
- 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 http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-14 main"
- name: Install build dependencies
- # NOTE: Please note the version-specific ${PATH} extension for Clang in .travis.sh
run: |-
- sudo dpkg --add-architecture i386 # for wine32
+ set -x -u -o pipefail
+ source /etc/os-release
+
sudo apt-get update
sudo apt-get install --yes --no-install-recommends -V \
- clang-14 \
- clang-format-14 \
- llvm-14 \
cmake \
docbook2x \
dos2unix \
@@ -66,10 +58,27 @@ jobs:
lcov \
libbsd-dev \
lzip \
+ moreutils
+
+ # Get rid of packages installed from ppa:ondrej/php so that we will be able to install wine32:i386 without conflicts
+ # (see issue https://github.com/actions/virtual-environments/issues/4589)
+ # In detail we:
+ # 1. Remove all packages that ppa:ondrej/php has but plain Ubuntu doesn't, e.g. everything PHP
+ # 2. Revert (remaining) packages that ppa:ondrej/php and plain Ubuntu share, back to the plain Ubuntu version
+ # 3. Assert that no packages from ppa:ondrej/php are left installed
+ dpkg -l | grep '^ii' | fgrep deb.sury.org | awk '{print $2}' | grep '^php' \
+ | xargs -r -t sudo apt-get remove --yes libpcre2-posix3 libzip4
+ dpkg -l | grep '^ii' | fgrep deb.sury.org | awk '{print $2}' | sed "s,\$,/${UBUNTU_CODENAME}," \
+ | xargs -r -t sudo apt-get install --yes --no-install-recommends --allow-downgrades -V
+ ! dpkg -l | grep '^ii' | fgrep deb.sury.org
+
+ # 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 \
- moreutils \
wine-stable \
- wine32
+ wine32:i386
- name: Unshallow Git clone
run: |
git fetch --force --tags --unshallow origin # for "git describe" in coverage.sh
diff --git a/.github/workflows/expat_config_h.yml b/.github/workflows/expat_config_h.yml
index 0054cb72..ddc75364 100644
--- a/.github/workflows/expat_config_h.yml
+++ b/.github/workflows/expat_config_h.yml
@@ -38,7 +38,7 @@ on:
jobs:
checks:
name: Check expat_config.h.{in,cmake} for regressions
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3.0.2
- name: Check expat_config.h.{in,cmake} for regressions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index e2706c50..7e05f80a 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -76,26 +76,52 @@ jobs:
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-18.04
+ runs-on: ubuntu-20.04
env:
CFLAGS: -g3 -pipe
steps:
- uses: actions/checkout@v3.0.2
- - name: Add Clang/LLVM repositories
+ - name: Install build dependencies (MinGW)
+ if: "${{ contains(matrix.FLAT_ENV, 'mingw') }}"
+ run: |-
+ set -x -u -o pipefail
+ source /etc/os-release
+
+ # Get rid of packages installed from ppa:ondrej/php so that we will be able to install wine32:i386 without conflicts
+ # (see issue https://github.com/actions/virtual-environments/issues/4589)
+ # In detail we:
+ # 1. Remove all packages that ppa:ondrej/php has but plain Ubuntu doesn't, e.g. everything PHP
+ # 2. Revert (remaining) packages that ppa:ondrej/php and plain Ubuntu share, back to the plain Ubuntu version
+ # 3. Assert that no packages from ppa:ondrej/php are left installed
+ dpkg -l | grep '^ii' | fgrep deb.sury.org | awk '{print $2}' | grep '^php' \
+ | xargs -r -t sudo apt-get remove --yes libpcre2-posix3 libzip4
+ dpkg -l | grep '^ii' | fgrep deb.sury.org | awk '{print $2}' | sed "s,\$,/${UBUNTU_CODENAME}," \
+ | xargs -r -t sudo apt-get install --yes --no-install-recommends --allow-downgrades -V
+ ! dpkg -l | grep '^ii' | fgrep deb.sury.org
+
+ # 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 http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-14 main"
- - name: Install build dependencies
- # NOTE: Please note the version-specific ${PATH} extension for Clang in .travis.sh
- run: |-
- sudo dpkg --add-architecture i386 # for wine32
- sudo apt-get update
+ sudo apt-get update # due to new repository
+ # NOTE: Please note the version-specific ${PATH} extension for Clang in .travis.sh
sudo apt-get install --yes --no-install-recommends -V \
clang-14 \
clang-format-14 \
- llvm-14 \
+ llvm-14
+ - name: Install build dependencies (common)
+ run: |-
+ sudo apt-get install --yes --no-install-recommends -V \
cmake \
docbook2x \
dos2unix \
@@ -104,10 +130,7 @@ jobs:
lcov \
libbsd-dev \
lzip \
- mingw-w64 \
- moreutils \
- wine-stable \
- wine32
+ moreutils
- name: Perform check "${{ matrix.MODE }}"
env:
MODE: ${{ matrix.MODE }}
diff --git a/expat/Changes b/expat/Changes
index 025f0bb5..831e9918 100644
--- a/expat/Changes
+++ b/expat/Changes
@@ -20,11 +20,15 @@ Release x.x.x xxx xxxxx xx xxxx
#622 #624 MinGW|CMake: Sync library name with GNU Autotools,
i.e. produce libexpat-1.dll rather than libexpat.dll
by default. Filename libexpat.dll.a is unaffected.
+ #632 MinGW|CMake: Set missing variable CMAKE_RC_COMPILER in
+ toolchain file "cmake/mingw-toolchain.cmake" to avoid
+ error "windres: Command not found" on e.g. Ubuntu 20.04
#620 CMake: Make documentation on variables a bit more consistent
#610 Address Cppcheck 2.8.1 warning
Infrastructure:
#597 #598 CI: Windows: Start covering MSVC 2022
+ #632 CI: Linux: Make migration off deprecated Ubuntu 18.04 work
Special thanks to:
David Faure
diff --git a/expat/cmake/mingw-toolchain.cmake b/expat/cmake/mingw-toolchain.cmake
index 31a238b0..9032d9e5 100644
--- a/expat/cmake/mingw-toolchain.cmake
+++ b/expat/cmake/mingw-toolchain.cmake
@@ -31,6 +31,7 @@ set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
+set(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
set(WIN32 ON)
set(MINGW ON)
diff --git a/expat/coverage.sh b/expat/coverage.sh
index 260bcf56..10512111 100755
--- a/expat/coverage.sh
+++ b/expat/coverage.sh
@@ -117,8 +117,8 @@ _copy_missing_mingw_libaries() {
# * coverage GCC flags make them needed
# * With WINEDLLPATH Wine looks for .dll.so in these folders, not .dll
local target="$1"
- local mingw_gcc_dll_dir="$(dirname "$(ls -1 /usr/lib*/gcc/i686-w64-mingw32/*/libgcc_s_sjlj-1.dll | head -n1)")"
- for dll in libgcc_s_sjlj-1.dll libstdc++-6.dll; do
+ local mingw_gcc_dll_dir="$(dirname "$(ls -1 /usr/lib*/gcc/i686-w64-mingw32/*/{libgcc_s_sjlj-1.dll,libstdc++-6.dll} | head -n1)")"
+ for dll in libgcc_s_dw2-1.dll libgcc_s_sjlj-1.dll libstdc++-6.dll; do
(
set -x
ln -s "${mingw_gcc_dll_dir}"/${dll} "${target}"/${dll}
diff --git a/expat/qa.sh b/expat/qa.sh
index b7e9c25e..cb1eb5f9 100755
--- a/expat/qa.sh
+++ b/expat/qa.sh
@@ -154,11 +154,11 @@ run_tests() {
esac
if [[ ${CC} =~ mingw ]]; then
- # NOTE: Filenames are hardcoded for Travis' Ubuntu Bionic, as of now
for i in tests xmlwf ; do
- mingw32_dir="$(ls -1d /usr/lib/gcc/i686-w64-mingw32/* | head -n1)"
+ mingw32_dir="$(dirname "$(ls -1 /usr/lib*/gcc/i686-w64-mingw32/*/{libgcc_s_sjlj-1.dll,libstdc++-6.dll} | head -n1)")"
RUN ln -s \
/usr/i686-w64-mingw32/lib/libwinpthread-1.dll \
+ "${mingw32_dir}"/libgcc_s_dw2-1.dll \
"${mingw32_dir}"/libgcc_s_sjlj-1.dll \
"${mingw32_dir}"/libstdc++-6.dll \
"$PWD"/libexpat{,w}-*.dll \