2016-06-02 16:44:44 -07:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# This script is supposed to run inside the AppStream Generator Docker container
|
|
|
|
# on the CI system.
|
|
|
|
#
|
2016-10-15 08:29:13 -07:00
|
|
|
set -e
|
2017-01-18 12:25:59 -08:00
|
|
|
export LANG=C.UTF-8
|
2016-06-02 16:44:44 -07:00
|
|
|
|
2021-01-22 14:44:40 -08:00
|
|
|
if [ "$DC" = "ldc" ];
|
2020-02-20 16:31:01 -08:00
|
|
|
then
|
2021-01-22 14:44:40 -08:00
|
|
|
export DC=ldc2
|
2020-02-20 16:31:01 -08:00
|
|
|
fi
|
2021-02-12 10:38:06 -08:00
|
|
|
ROOT_DIR=$(pwd)
|
2020-02-20 16:31:01 -08:00
|
|
|
|
2016-10-15 08:29:13 -07:00
|
|
|
echo "D compiler: $DC"
|
|
|
|
set -v
|
|
|
|
$DC --version
|
|
|
|
meson --version
|
2016-06-02 16:44:44 -07:00
|
|
|
|
2016-10-15 08:29:13 -07:00
|
|
|
#
|
2017-04-20 11:30:11 -07:00
|
|
|
# Build & Test
|
2016-10-15 08:29:13 -07:00
|
|
|
#
|
2016-09-25 19:58:40 -07:00
|
|
|
mkdir -p build && cd build
|
2023-01-22 11:06:37 -08:00
|
|
|
meson setup -Ddownload-js=true ..
|
2018-04-03 11:56:17 -07:00
|
|
|
ninja -j8
|
2016-09-25 19:58:40 -07:00
|
|
|
|
|
|
|
# Run tests
|
2021-02-12 10:38:06 -08:00
|
|
|
meson test -v --print-errorlogs
|
2016-09-25 19:58:40 -07:00
|
|
|
|
2017-04-20 11:30:11 -07:00
|
|
|
# Test install
|
2016-09-25 19:58:40 -07:00
|
|
|
DESTDIR=/tmp/install-ninja ninja install
|
2021-02-12 10:38:06 -08:00
|
|
|
cd $ROOT_DIR
|
2018-04-05 18:42:57 -07:00
|
|
|
|
|
|
|
#
|
|
|
|
# Other checks
|
|
|
|
#
|
|
|
|
|
|
|
|
# run D-Scanner
|
2021-02-12 14:15:34 -08:00
|
|
|
./tests/ci/run-dscanner.py . tests/dscanner.ini || true
|