-
Notifications
You must be signed in to change notification settings - Fork 117
/
Copy path.travis.yml
114 lines (99 loc) · 4.52 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
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
dist: jammy
language: cpp
compiler: gcc
addons:
apt:
packages:
- libboost-filesystem-dev
- libboost-system-dev
- libboost-program-options-dev
- libboost-thread-dev
env:
matrix:
- CUDA_VERSION_MAJOR="11" CUDA_VERSION_MINOR="8" CUDA_PKG_LONGVERSION="${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}.0-1" CUDA_PKG_VERSION="${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}"
- CUDA_VERSION_MAJOR="12" CUDA_VERSION_MINOR="5" CUDA_PKG_LONGVERSION="${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}.1-1" CUDA_PKG_VERSION="${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}"
global:
- NUM_CPU="`grep processor /proc/cpuinfo | wc -l`"; echo $NUM_CPU
- BUILD_SYSTEM="`uname -s`"
- BUILD_PROCESSOR="`uname -p`"
- POPSIFT_SOURCE=${TRAVIS_BUILD_DIR}
- POPSIFT_BUILD_RELEASE=${TRAVIS_BUILD_DIR}/build_release
- POPSIFT_BUILD_DEBUG=${TRAVIS_BUILD_DIR}/build_debug
- POPSIFT_INSTALL_RELEASE=${POPSIFT_BUILD_RELEASE}/install
- POPSIFT_INSTALL_DEBUG=${POPSIFT_BUILD_DEBUG}/install
- POPSIFT_APP_SRC=${POPSIFT_SOURCE}/src/application
- POPSIFT_APP_BUILD_RELEASE=${POPSIFT_APP_SRC}/build_release
- POPSIFT_APP_BUILD_DEBUG=${POPSIFT_APP_SRC}/build_debug
- POPSIFT_APP_INSTALL_RELEASE=${POPSIFT_APP_BUILD_RELEASE}/install
- POPSIFT_APP_INSTALL_DEBUG=${POPSIFT_APP_BUILD_DEBUG}/install
# CMAKE
- CMAKE_URL="https://github.com/Kitware/CMake/releases/download/v3.30.1/cmake-3.30.1-linux-x86_64.tar.gz"
- CMAKE_ROOT=${TRAVIS_BUILD_DIR}/cmake
- CMAKE_SOURCE=${CMAKE_ROOT}/source
- CMAKE_INSTALL=${CMAKE_ROOT}/install
before_install:
# CMAKE most recent version
- >
if [ "$(ls -A ${CMAKE_INSTALL})" ]; then
echo "CMake found in cache.";
ls -A ${CMAKE_INSTALL}
export PATH=${CMAKE_INSTALL}/bin:${PATH};
cmake --version
else
mkdir --parent ${CMAKE_SOURCE}
mkdir --parent ${CMAKE_INSTALL}
ls -A ${CMAKE_INSTALL}
travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_INSTALL}
export PATH=${CMAKE_INSTALL}/bin:${PATH};
cmake --version
fi
install:
- UBUNTU_VERSION=ubuntu2204
- wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/cuda-${UBUNTU_VERSION}.pin
- travis_retry sudo mv cuda-${UBUNTU_VERSION}.pin /etc/apt/preferences.d/cuda-repository-pin-600
- travis_retry sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/3bf863cc.pub
- travis_retry sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/ /"
- sudo apt-get update && sudo apt-get -y install cuda
# - CUDA_REPO_PKG=cuda-repo-${UBUNTU_VERSION}_${CUDA_PKG_LONGVERSION}_amd64.deb
# - wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/$CUDA_REPO_PKG
before_script:
# Classic release build
# Create build folder
- mkdir -p ${POPSIFT_BUILD_RELEASE}
- cd ${POPSIFT_BUILD_RELEASE}
- >
cmake . ${POPSIFT_SOURCE} -DCMAKE_INSTALL_PREFIX=${POPSIFT_INSTALL_RELEASE} -DCMAKE_BUILD_TYPE=Release -DPopSift_BUILD_DOCS:BOOL=OFF
# Classic debug build
# Create build folder
- mkdir -p ${POPSIFT_BUILD_DEBUG}
- cd ${POPSIFT_BUILD_DEBUG}
- >
cmake . ${POPSIFT_SOURCE} -DCMAKE_INSTALL_PREFIX=${POPSIFT_INSTALL_DEBUG} -DCMAKE_BUILD_TYPE=Debug -DPopSift_BUILD_DOCS:BOOL=OFF
script:
- cd ${POPSIFT_BUILD_RELEASE}
# limit GCC builds to a reduced number of thread for the virtual machine
- make install -j 2 VERBOSE=1
# Perform unit tests
# - make test
# Perform tests building application with PopSift as 3rd party
- cd ${POPSIFT_APP_SRC}
- mkdir -p ${POPSIFT_APP_BUILD_RELEASE}
- cd ${POPSIFT_APP_BUILD_RELEASE}
- cmake .. -DPopSift_DIR=${POPSIFT_INSTALL_RELEASE}/lib/cmake/PopSift/ -DCMAKE_INSTALL_PREFIX=${POPSIFT_APP_INSTALL_RELEASE} -DCMAKE_BUILD_TYPE=Release -DPopSift_BUILD_DOCS:BOOL=OFF
- make install -j 2 VERBOSE=1
# same for debug
- cd ${POPSIFT_BUILD_DEBUG}
# limit GCC builds to a reduced number of thread for the virtual machine
- make install -j 2 VERBOSE=1
# Perform unit tests
# - make test
# Perform tests building application with PopSift as 3rd party
- cd ${POPSIFT_APP_SRC}
- mkdir -p ${POPSIFT_APP_BUILD_DEBUG}
- cd ${POPSIFT_APP_BUILD_DEBUG}
- cmake .. -DPopSift_DIR=${POPSIFT_INSTALL_DEBUG}/lib/cmake/PopSift/ -DCMAKE_INSTALL_PREFIX=${POPSIFT_APP_INSTALL_DEBUG} -DCMAKE_BUILD_TYPE=Debug -DPopSift_BUILD_DOCS:BOOL=OFF
- make install -j 2 VERBOSE=1
cache:
apt: true
directories:
- ${CMAKE_INSTALL}