Newer
Older
dub_jkp / scripts / ci / ci.sh
@Mathias Lang Mathias Lang on 23 Jan 2024 585 bytes Build the tests and binary with -cov on POSIX
#!/bin/bash

set -v -e -o pipefail

vibe_ver=$(jq -r '.versions | .["vibe-d"]' < dub.selections.json)
dub fetch vibe-d@$vibe_ver # get optional dependency
dub test --compiler=${DC} -c library-nonet

export DMD="$(command -v $DMD)"

./build.d -preview=dip1000 -preview=in -w -g -debug

if [ "$COVERAGE" = true ]; then
    # library-nonet fails to build with coverage (Issue 13742)
    dub test --compiler=${DC} -b unittest-cov
    ./build.d -cov
else
    ./build.d
    DUB=`pwd`/bin/dub DC=${DC} dub --single ./test/run-unittest.d
    DUB=`pwd`/bin/dub DC=${DC} test/run-unittest.sh
fi