forked from energymon/energymon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (42 loc) · 1.34 KB
/
.travis.yml
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
44
45
46
47
os:
- linux
- osx
language: c
compiler:
- gcc
- clang
addons:
apt:
packages:
- libudev-dev
- libusb-1.0-0-dev
- autotools-dev
- autoconf
- automake
- libtool
- libftdi-dev
before_install:
# OSX-specific packages
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libusb; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libftdi; fi
# hidapi
- wget https://github.com/signal11/hidapi/archive/master.zip -O /tmp/hidapi.zip
- unzip /tmp/hidapi.zip -d /tmp
- cd /tmp/hidapi-master
- ./bootstrap
- ./configure --prefix=`pwd`/_local_install
- make
- make install
- export PKG_CONFIG_PATH="`pwd`/_local_install/lib/pkgconfig:$PKG_CONFIG_PATH"
- cd -
script:
- mkdir _build
- cd _build
# Test build with stricter flags
- export CFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector -g3 -pedantic -W -Wall -Wbad-function-cast -Wcast-align
-Wcast-qual -Wdisabled-optimization -Wendif-labels -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Winline
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-unused-parameter -Wpointer-arith -Wshadow
-Wstrict-prototypes -Wstack-protector -Wswitch -Wundef -Wwrite-strings -std=c99"
- cmake .. -DCMAKE_C_FLAGS="$CFLAGS"
- cmake --build .