aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 6bf543861606e2382b557046c2510b2d78df9760 (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
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
73
74
75
76
77
78
79
80
81
82
83
language: generic
sudo: false
os: osx
env:
  global:
    - CF="-DCOMPILE_OFFLINE_TESTS=1 -DERROR_ON_WARNING=ON"

matrix:
  include:
#    - osx_image: xcode7.3 #default
#      before_install: &brew
#      - brew update
#      - brew install hidapi
    - osx_image: xcode9.1
    - osx_image: xcode8.2
    - os: linux
      dist: trusty
      env: COMPILER_NAME=gcc CXX=g++-5 CC=gcc-5
      addons:
        apt:
          packages:
            - cmake
            - libhidapi-dev
            - g++-5
            - python3
            - python3-pip
            - python3-requests
            - git
          sources: &sources
            - ubuntu-toolchain-r-test
      script:
        - make -j2
        - ctest -VV
        - mkdir install && make install DESTDIR=install
        - pip3 install pytest --user
        - cd ../
        - pip3 install -r unittest/requirements.txt --user
        - cd unittest && python3 -m pytest -sv test_offline.py
    - os: linux
      dist: trusty
      env: COMPILER_NAME=gcc CXX=g++-6 CC=gcc-6
      addons:
        apt:
          packages:
            - cmake
            - libhidapi-dev
            - g++-6
          sources: *sources
    - os: linux
      dist: trusty
      env: COMPILER_NAME=gcc CXX=g++-7 CC=gcc-7
      addons:
        apt:
          packages:
            - cmake
            - libhidapi-dev
            - g++-7
          sources: *sources
    - os: linux
      dist: trusty
      env: COMPILER_NAME=clang CXX=clang++-3.8 CC=clang-3.8
      addons:
        apt:
          packages:
            - cmake
            - libhidapi-dev
            - g++-5
            - clang-3.8
          sources: *sources


install:
  - mkdir -p build
  - cd build
#  - export CXXFLAGS="${CXX_FLAGS} -Wall -Wextra -Werror" # TODO enable when fixed
  - ${CXX} --version || true
  - cmake --version
  - cmake .. ${CF}

script:
  - make -j2
  - ctest -VV
  - mkdir install && make install DESTDIR=install