-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (41 loc) · 1.14 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
language: cpp
compiler: gcc
dist: trusty
before_install:
# C++17
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
install:
# C++17
- sudo apt-get install -qq g++-6
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90
# cppcheck
- sudo apt-get install -qq cppcheck
script:
# Build and run this project
- g++ main.cpp -std=c++17 -o travis_gcc_cpp17_cppcheck
- ./travis_gcc_cpp17_cppcheck
# cppcheck
- cppcheck --quiet --error-exitcode=1 .
language: cpp
compiler: gcc
dist: trusty
before_install:
# C++17
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
install:
# C++17
- sudo apt-get install -qq g++-6
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90
# cppcheck
- sudo apt-get install -qq cppcheck
script:
# build and run this project
- g++ main.cpp -DNDEBUG -O2 -pg -std=c++17 -o travis_gcc_cpp17_gprof
- ./travis_gcc_cpp17_gprof
# cppcheck
- cppcheck --quiet --error-exitcode=1 .
# produce the gprof log
- gprof ./travis_gcc_cpp17_gprof > gprof.log
- head gprof.log -n 100