File: .travis.yml

package info (click to toggle)
colmap 3.5-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 20,564 kB
  • sloc: ansic: 170,595; cpp: 95,339; python: 2,335; makefile: 183; sh: 51
file content (149 lines) | stat: -rw-r--r-- 3,925 bytes parent folder | download
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
language: cpp
sudo: true
dist: trusty

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - cmake
      - build-essential
      - libboost-program-options-dev
      - libboost-filesystem-dev
      - libboost-graph-dev
      - libboost-regex-dev
      - libboost-system-dev
      - libboost-test-dev
      - libeigen3-dev
      - libatlas-base-dev
      - libsuitesparse-dev
      - libfreeimage-dev
      - libgoogle-glog-dev
      - libgflags-dev
      - libglew-dev
      - libcgal-dev

env:
  - QT_QPA_PLATFORM="offscreen"

matrix:
  include:
    - os: linux
      env:
        - CMAKE_OPTIONS="-DOPENGL_ENABLED=OFF -DCGAL_ENABLED=ON"
        - RUN_TESTS=true
        - QT_VERSION=596
    - os: linux
      env:
        - CMAKE_OPTIONS="-DOPENGL_ENABLED=OFF -DCGAL_ENABLED=ON"
        - RUN_TESTS=true
        - QT_VERSION=542
    - os: linux
      env:
        - CMAKE_OPTIONS="-DOPENGL_ENABLED=OFF -DCGAL_ENABLED=OFF"
        - RUN_TESTS=true
        - QT_VERSION=596
    - os: linux
      env:
        - CMAKE_OPTIONS="-DOPENGL_ENABLED=ON -DCGAL_ENABLED=ON"
        - RUN_TESTS=false
        - QT_VERSION=596
    - os: linux
      env:
        - CMAKE_OPTIONS="-DOPENGL_ENABLED=OFF -DCGAL_ENABLED=ON -DCUDA_ARCHS=Kepler"
        - RUN_TESTS=false
        - QT_VERSION=596
        - CUDA_VERSION=7.5-18
    - os: linux
      env:
        - CMAKE_OPTIONS="-DOPENGL_ENABLED=OFF -DCGAL_ENABLED=ON -DCUDA_ARCHS=Pascal"
        - RUN_TESTS=false
        - QT_VERSION=596
        - CUDA_VERSION=8.0.61-1
    - os: osx
      env:
        - CMAKE_OPTIONS="-DIPO_ENABLED=OFF -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5"

cache:
  directories:
    - ${TRAVIS_BUILD_DIR}/deps
    - ${TRAVIS_BUILD_DIR}/build

before_script:
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      brew tap homebrew/science
      brew install \
        cmake \
        boost \
        eigen \
        freeimage \
        glog \
        gflags \
        suite-sparse \
        ceres-solver \
        qt5 \
        glew \
        cgal || true
    fi
  - |
    if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
      export DISPLAY=:99.0
      sh -e /etc/init.d/xvfb start
      sleep 3

      sudo add-apt-repository --yes ppa:beineri/opt-qt${QT_VERSION}-trusty
      export PATH="/opt/qt${QT_VERSION:0:2}/bin:$PATH"
      sudo apt-get update -qq
      sudo apt-get -y install qt${QT_VERSION:0:2}base

      if [[ ! -z "$CUDA_VERSION" ]]; then
        wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_${CUDA_VERSION}_amd64.deb
        sudo dpkg -i cuda-repo-ubuntu1404_${CUDA_VERSION}_amd64.deb
        sudo apt-get update -qq
        CUDA_VERSION_APT=${CUDA_VERSION:0:3}
        sudo apt-get install -y cuda-drivers cuda-core-${CUDA_VERSION_APT} cuda-cudart-dev-${CUDA_VERSION_APT} cuda-curand-dev-${CUDA_VERSION_APT}
        sudo ln -s /usr/local/cuda-${CUDA_VERSION:0:3}/ /usr/local/cuda
      fi

      cd ${TRAVIS_BUILD_DIR}/deps
      if [[ -z "$(ls -A ceres-solver)" ]]; then
        git clone https://ceres-solver.googlesource.com/ceres-solver
      fi
      cd ceres-solver
      git pull
      mkdir -p build
      cd build
      cmake .. \
        -DBUILD_TESTING=OFF \
        -DBUILD_EXAMPLES=OFF
      make -j2
      sudo make install
      cd ${TRAVIS_BUILD_DIR}
    fi

script:
  - cmake --version
  - cd build
  - |
    if [[ -z "$(ls -A colmap)" ]]; then
      git clone https://github.com/colmap/colmap.git
    fi
  - cd colmap
  - git pull
  - git checkout ${TRAVIS_BRANCH}
  - mkdir -p build
  - cd build
  - |
    if [ "$RUN_TESTS" = true ]; then
      export CMAKE_OPTIONS="${CMAKE_OPTIONS} -DTESTS_ENABLED=ON"
    else
      export CMAKE_OPTIONS="${CMAKE_OPTIONS} -DTESTS_ENABLED=OFF"
    fi
  - cmake .. -DCMAKE_BUILD_TYPE=Release ${CMAKE_OPTIONS}
  - make -j2
  - |
    if [ "$RUN_TESTS" = true ]; then
      TEST_OUTPUT_ON_FAILURE=1 make test
    fi