blob: 6e16098deae44ccd8b3f90642fe8a0eeb471846c (
plain) (
blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#!/bin/sh
set -e
types="debug release coverage"
mkdir -p build
cd build
for type in $types
do
rm -rf $type
mkdir -p $type
cd $type
case $type in
debug)
CFLAGS="-O0 -g3 -fsanitize=address,undefined"
LDFLAGS=""
OTHER=""
;;
coverage)
CFLAGS="-O0 -g3 --coverage -fcondition-coverage"
LDFLAGS=""
OTHER="--disable-shared"
;;
release)
CFLAGS="-O3 -flto"
LDFLAGS="-flto"
OTHER=""
;;
*)
echo "Unsupported type"
exit 1
;;
esac
../../configure --enable-maintainer-mode --enable-build-mode=$type CFLAGS="$CFLAGS -Wall -Wextra -Werror -std=c89 -pedantic" LDFLAGS="$LDFLAGS" $OTHER
make -j check
../../configure --enable-maintainer-mode --enable-build-mode=$type CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" $OTHER
cd ..
done
cd ..
fossil ls | entr -c tools/tests $types
|