-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathci.sh
More file actions
executable file
·36 lines (30 loc) · 886 Bytes
/
ci.sh
File metadata and controls
executable file
·36 lines (30 loc) · 886 Bytes
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
#!/bin/bash -ex
COMPILER=${COMPILER:-gcc}
CFLAGS="-Werror"
if [ x$BUILTIN == xyes ]; then
CFLAGS+=" -DBUILTIN_MODULE=libev"
fi
if [ -f /etc/debian_version ]; then
apt-get update
apt-get -y install autoconf build-essential libtool $COMPILER \
lib{ev,event,glib2.0}-dev
elif [ -f /etc/fedora-release ]; then
# dnf has no update-only verb
dnf -y install autoconf automake libtool make which $COMPILER \
{glib2,libevent,libev}-devel --nogpgcheck --skip-broken
elif [ -f /etc/redhat-release ]; then
# rhel/centos
yum -y install autoconf automake libtool make which $COMPILER \
{glib2,libevent}-devel
# rhel doesn't have libev anyway
CFLAGS+=" -std=c89"
else
echo "Distro not found!"
false
fi
autoreconf -fiv
./configure CFLAGS="$CFLAGS" CC=$(which $COMPILER)
make
if [ x$BUILTIN != xyes ]; then
make check
fi