mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-15 09:44:36 +00:00
Merge pull request #632 from libexpat/github-actions-off-deprecated-ubuntu-18-04
Get GitHub Actions CI off deprecated Ubuntu 18.04
This commit is contained in:
commit
1cc2b29c47
7 changed files with 68 additions and 31 deletions
37
.github/workflows/coverage.yml
vendored
37
.github/workflows/coverage.yml
vendored
|
@ -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
|
||||
|
|
2
.github/workflows/expat_config_h.yml
vendored
2
.github/workflows/expat_config_h.yml
vendored
|
@ -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
|
||||
|
|
47
.github/workflows/linux.yml
vendored
47
.github/workflows/linux.yml
vendored
|
@ -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 }}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Add table
Reference in a new issue