mirror of
https://github.com/libexpat/libexpat.git
synced 2026-01-26 15:39:10 +00:00
Merge pull request #1124 from libexpat/solaris-ci-alt
`fix-xmltest-log.sh`: Prefer command `gsed` (GNU sed) over `sed` (e.g. for Solaris) + Make GitHub Actions cover Solaris 11.4
This commit is contained in:
commit
30ec2276bf
98
.github/workflows/solaris.yml
vendored
Normal file
98
.github/workflows/solaris.yml
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
# __ __ _
|
||||
# ___\ \/ /_ __ __ _| |_
|
||||
# / _ \\ /| '_ \ / _` | __|
|
||||
# | __// \| |_) | (_| | |_
|
||||
# \___/_/\_\ .__/ \__,_|\__|
|
||||
# |_| XML parser
|
||||
#
|
||||
# Copyright (c) 2026 Sebastian Pipping <sebastian@pipping.org>
|
||||
# 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 in a Solaris VM
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 2 * * 5' # Every Friday at 2am
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
solaris:
|
||||
name: Build in a Solaris VM
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
|
||||
- uses: vmactions/solaris-vm@7a5256863396c1cea1665b084d569876a1321347 # v1.2.4
|
||||
with:
|
||||
release: "11.4-gcc" # with GCC 14 as of 2026-01-11
|
||||
usesh: true
|
||||
|
||||
prepare: |
|
||||
set -e -x
|
||||
pkgutil -y -i \
|
||||
autoconf \
|
||||
automake \
|
||||
bash \
|
||||
cmake \
|
||||
gmake \
|
||||
gsed \
|
||||
libtool
|
||||
|
||||
run: |
|
||||
set -e -x
|
||||
|
||||
compile_flags='-Wall -Wextra -pedantic -O1 -pipe'
|
||||
export CFLAGS="-std=c99 ${compile_flags}"
|
||||
export CXXFLAGS="-std=c++11 ${compile_flags}"
|
||||
|
||||
gcc -v
|
||||
g++ -v
|
||||
|
||||
cd expat
|
||||
./buildconf.sh
|
||||
|
||||
# 1 of 2: GNU Autotools build system
|
||||
mkdir build_autotools
|
||||
cd build_autotools
|
||||
../configure
|
||||
gmake -j2 CFLAGS="${CFLAGS} -Werror"
|
||||
gmake check CFLAGS="${CFLAGS} -Werror" CXXFLAGS="${CXXLAGS} -Werror"
|
||||
gmake run-xmltest
|
||||
gmake install DESTDIR="${PWD}/ROOT/"
|
||||
find ROOT/
|
||||
cd ..
|
||||
|
||||
# 2 of 2: CMake build system
|
||||
mkdir build_cmake
|
||||
cd build_cmake
|
||||
cmake -S .. -B . -DEXPAT_WARNINGS_AS_ERRORS:BOOL=ON
|
||||
gmake -j2 VERBOSE=1
|
||||
gmake test VERBOSE=1
|
||||
gmake run-xmltest VERBOSE=1
|
||||
gmake install DESTDIR="${PWD}/ROOT/"
|
||||
find ROOT/
|
||||
cd ..
|
||||
@ -31,9 +31,10 @@
|
||||
|
||||
set -e
|
||||
|
||||
sed="$(type -P gsed sed false | head -n 1)" # e.g. for Solaris
|
||||
filename="${1:-tests/xmltest.log}"
|
||||
|
||||
sed -i.bak \
|
||||
exec "${sed}" -i.bak \
|
||||
-e '# convert DOS line endings to Unix without resorting to dos2unix' \
|
||||
-e $'s/\r//' \
|
||||
\
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user