2017-08-12 10:22:16 -04:00
|
|
|
#! /bin/bash
|
|
|
|
# __ __ _
|
|
|
|
# ___\ \/ /_ __ __ _| |_
|
|
|
|
# / _ \\ /| '_ \ / _` | __|
|
|
|
|
# | __// \| |_) | (_| | |_
|
|
|
|
# \___/_/\_\ .__/ \__,_|\__|
|
|
|
|
# |_| XML parser
|
|
|
|
#
|
2022-03-28 10:52:39 -04:00
|
|
|
# Copyright (c) 2017-2022 Sebastian Pipping <sebastian@pipping.org>
|
2021-05-01 19:49:02 -04:00
|
|
|
# Copyright (c) 2017 Rolf Eike Beer <eike@sf-mail.de>
|
|
|
|
# Copyright (c) 2019 Mohammed Khajapasha <mohammed.khajapasha@intel.com>
|
|
|
|
# Copyright (c) 2019 Philippe Antoine <contact@catenacyber.fr>
|
2017-08-12 10:22:16 -04:00
|
|
|
# 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.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2019-01-27 10:24:24 -05:00
|
|
|
if [[ ${TRAVIS_OS_NAME} = osx ]]; then
|
2020-02-01 12:27:10 -05:00
|
|
|
latest_brew_python3_bin="$(ls -1d /usr/local/Cellar/python/3.*/bin | sort -n | tail -n1)"
|
|
|
|
export PATH="${latest_brew_python3_bin}${PATH:+:}${PATH}"
|
2019-01-27 10:24:24 -05:00
|
|
|
export PATH="/usr/local/opt/coreutils/libexec/gnubin${PATH:+:}${PATH}"
|
2020-05-12 16:06:34 -04:00
|
|
|
export PATH="/usr/local/opt/findutils/libexec/gnubin${PATH:+:}${PATH}"
|
2019-07-22 17:25:46 -04:00
|
|
|
elif [[ ${TRAVIS_OS_NAME} = linux ]]; then
|
2022-03-24 21:27:53 -04:00
|
|
|
export PATH="/usr/lib/llvm-14/bin:${PATH}"
|
2019-01-27 10:24:24 -05:00
|
|
|
fi
|
|
|
|
|
2020-02-01 12:13:31 -05:00
|
|
|
echo "New \${PATH}:"
|
|
|
|
tr : '\n' <<<"${PATH}" | sed 's,^,- ,'
|
|
|
|
echo
|
|
|
|
|
2017-08-12 10:22:16 -04:00
|
|
|
PS4='# '
|
|
|
|
set -x
|
|
|
|
|
|
|
|
cd expat
|
|
|
|
./buildconf.sh
|
|
|
|
|
|
|
|
if [[ ${MODE} = distcheck ]]; then
|
2019-07-12 01:14:26 -04:00
|
|
|
./configure ${CONFIGURE_ARGS}
|
2017-08-12 10:22:16 -04:00
|
|
|
make distcheck
|
2017-12-13 12:39:53 -05:00
|
|
|
elif [[ ${MODE} = cmake-oos ]]; then
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2019-07-12 01:14:26 -04:00
|
|
|
cmake ${CMAKE_ARGS} ..
|
2020-10-25 15:47:58 -04:00
|
|
|
make VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=1 all test
|
2017-12-13 12:39:53 -05:00
|
|
|
make DESTDIR="${PWD}"/ROOT install
|
2017-12-13 12:46:19 -05:00
|
|
|
find ROOT -printf "%P\n" | sort
|
2019-07-24 14:48:55 -04:00
|
|
|
elif [[ ${MODE} = clang-format ]]; then
|
|
|
|
./apply-clang-format.sh
|
|
|
|
git diff --exit-code
|
2019-10-06 17:53:38 -04:00
|
|
|
elif [[ ${MODE} = coverage-sh ]]; then
|
|
|
|
./coverage.sh
|
2017-08-12 10:22:16 -04:00
|
|
|
else
|
2019-09-02 15:30:40 -04:00
|
|
|
./qa.sh ${CMAKE_ARGS}
|
2017-08-12 10:22:16 -04:00
|
|
|
fi
|