forked from volkszaehler/vzlogger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (64 loc) · 2.57 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
sudo: required
dist: trusty
language: cpp
compiler:
- clang
- gcc
env:
- CTEST_OUTPUT_ON_FAILURE=1 USE_GCC7=0
- CTEST_OUTPUT_ON_FAILURE=1 USE_GCC7=1
matrix:
exclude:
- compiler: clang
env: CTEST_OUTPUT_ON_FAILURE=1 USE_GCC7=1
before_install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -qq
# uncomment for ubuntu precise. not needed for >=trusty - if [ "$CXX" = "g++" ]; then sudo apt-get install -y -qq g++-4.8; export CXX="g++-4.8" CC="gcc-4.8"; else echo "yes" | sudo add-apt-repository 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main'; echo "yes" | sudo add-apt-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.6 main'; wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -; sudo apt-get update; sudo apt-get install -qq --allow-unauthenticated llvm-3.6 llvm-3.6-dev clang-3.6 libstdc++-4.8-dev; export CXX="clang++-3.6" CC="clang-3.6"; fi
- if [ "$USE_GCC7" = "1" ]; then sudo apt-get install -y -qq g++-7; export CXX="g++-7" CC="gcc-7"; fi
- $CXX --version
# install json-c
- sudo apt-get install -y build-essential
- sudo apt-get install -y wget
- sudo apt-get install -y libtool
- git clone -b json-c-0.12 https://github.com/json-c/json-c
- cd json-c
- sh autogen.sh
- ./configure
- make
- sudo make install
- cd ..
- sudo apt-get install -y libcurl4-openssl-dev openssl libmicrohttpd-dev uuid-dev uuid-runtime libunistring-dev
# -- get libsml --
- git clone https://github.com/volkszaehler/libsml.git # or github.com/TheCount/libsml.git # or https://github.com/dailab/libsml.git
- cd libsml
- # git checkout develop # only dev branch seems to work
- make
# -- install libsml --
- sudo cp sml/lib/libsml.* /usr/lib/.
- sudo cp -R sml/include/* /usr/include/.
- sudo cp sml.pc /usr/lib/pkgconfig/.
- cd ..
# -- install leptonica
- sudo apt-get install -y libpng-dev libtiff-dev
- wget http://www.leptonica.org/source/leptonica-1.71.tar.gz
- tar -zxvf leptonica-1.71.tar.gz
- cd leptonica-1.71
- ./configure --disable-programs
- make
- sudo make install
- sudo ldconfig
- cd ..
# -- install libmbus
- git clone https://github.com/rscada/libmbus
- cd libmbus
- ./build.sh
- sudo make install
- cd ..
- sudo apt-get install -y lcov
# -- install libmosquitto-dev
- sudo add-apt-repository ppa:mosquitto-dev/mosquitto-ppa -y
- sudo apt-get update -qq
- sudo apt-get install -qq libmosquitto-dev
script:
- cmake . -DMETEREXEC_ROOTACCESS=OFF -DENABLE_OCR=ON -DSML_HOME=/usr/local/src/libsml/sml && make && make test