appstream-generator/tests/ci/build-and-test.sh

40 lines
560 B
Bash
Raw Normal View History

#!/bin/sh
#
# This script is supposed to run inside the AppStream Generator Docker container
# on the CI system.
#
set -e
2017-01-18 12:25:59 -08:00
export LANG=C.UTF-8
if [ "$DC" = "ldc" ];
then
export DC=ldc2
fi
2021-02-12 10:38:06 -08:00
ROOT_DIR=$(pwd)
echo "D compiler: $DC"
set -v
$DC --version
meson --version
#
2017-04-20 11:30:11 -07:00
# Build & Test
#
2016-09-25 19:58:40 -07:00
mkdir -p build && cd build
meson -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
./tests/ci/run-dscanner.py . tests/dscanner.ini || true