appstream-generator/tests/ci/build-and-test.sh
2023-01-22 20:06:37 +01:00

40 lines
566 B
Bash
Executable File

#!/bin/sh
#
# This script is supposed to run inside the AppStream Generator Docker container
# on the CI system.
#
set -e
export LANG=C.UTF-8
if [ "$DC" = "ldc" ];
then
export DC=ldc2
fi
ROOT_DIR=$(pwd)
echo "D compiler: $DC"
set -v
$DC --version
meson --version
#
# Build & Test
#
mkdir -p build && cd build
meson setup -Ddownload-js=true ..
ninja -j8
# Run tests
meson test -v --print-errorlogs
# Test install
DESTDIR=/tmp/install-ninja ninja install
cd $ROOT_DIR
#
# Other checks
#
# run D-Scanner
./tests/ci/run-dscanner.py . tests/dscanner.ini || true