summaryrefslogtreecommitdiff
path: root/check.sh
blob: bca48e1183ae276df5a8b856047d87500df20dbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

source /etc/profile
source /lib/gentoo/functions.sh

export PATH="${HOME}/.local/bin:${PATH}" CC=clang CXX=clang++

lld=$(command -v lld)

if [[ -n ${ldd} ]]; then
    export LDFLAGS=-fuse-ld=${lld}
fi

if [[ ! -d build ]]; then
    meson setup \
          -Dfuzz=enabled \
          -Dtests=enabled \
          -Dbuildtype=debugoptimized \
          -Ddocs=enabled \
          -Dclap:derive=enabled \
          build || exit $?
fi

meson compile -C build || exit $?

ebegin "running check commands"
parallel --halt soon,fail=1 --keep-order -j$(nproc) < check_commands.txt
eend $? || exit $?