forked from Omegastick/pytorch-cpp-rl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
38 lines (38 loc) · 1.19 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
dist: trusty
language: c++
compiler: gcc
install: export CXX="g++-8"
git:
submodules: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-8
- g++-8
- libzmqpp-dev
before_install:
# Load git submodules
- sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
# Install Cmake >= 3.10.0
- wget -O cmake.sh https://cmake.org/files/v3.10/cmake-3.10.0-rc1-Linux-x86_64.sh
- sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local
# Install libtorch
- wget https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-1.4.0%2Bcpu.zip -O /tmp/libtorch.zip
- unzip /tmp/libtorch.zip -d /tmp/
# Install cppcheck
- git clone https://github.com/danmar/cppcheck /tmp/cppcheck && cd /tmp/cppcheck && git checkout 1.87 && cd -
- mkdir -p /tmp/cppcheck/build && cd /tmp/cppcheck/build && cmake .. && make -j2 && sudo make install && cd -
script:
# Print compiler versions
- gcc -v && g++ -v && cmake --version
# Build
- mkdir build && cd build
- /usr/local/bin/cmake -DCMAKE_PREFIX_PATH=/tmp/libtorch ..
- make -j2
# Run tests
- ./cpprl_tests
# Cppcheck
- make check