-
Notifications
You must be signed in to change notification settings - Fork 29
/
.travis.yml
123 lines (102 loc) · 3.87 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
114
115
116
117
118
119
120
121
sudo: true
language: cpp
compiler:
- gcc
- clang
os:
- linux
- osx
env:
global:
- secure: "To1R20fuYQQnL/d9OsGjTlGdTJ1cGo8Cm0aSf5IngkWIvCgmJHtt5uqO8DbCLONskmH07BlxnKPYZFjTSELe09ifSxggr866/Olnxh7BbBSLYU0xOAZ1C8LcEkFQxdXCfLQC/WrwWL9mosjYh6mozMZipUktBc2i6FopzkIpb41kTINO6+v4sKIHPOb2RLRVXM5gNnMee98QnlCQPI2IySm30R0K8MI/AjooC4RBOUBLTFSbN4DXzuYpJmGdpVofHx7sWrBcSzkpTMkEtQSHJPzXIPslSILAhEk0NGxL+Qikqt6yDXPrAWRJ+tYh/M0fgHwPYUJog9uEIlz9g1OIBjtOZH6yAI7OMv+XATDikqmfgYLT8nUiuvAypC9+0T4+uzh2ogKCCGa7wX9UyrIzCDV38MvehsQNmRSeGdofx8StuIcGE9OWPVhspaNMFm6BF7UpojZdC5b7+fz+ZZ0Q8aKQ0+yokAXYXlHhDbkO/sE7BnG0jiH/6BLKcSJtDzpsmLOKxFqWz9yMKy+i25C2vNATdppMkXbE1eUlsF/i8jLzHFAaT2J9JeTUbUx8gUyW0AVC2waNl/sJaH3vfvjG74LWMer4bZ0zFfyOIDguzdSC1S7oj5DPza3E1txcGjY2TmUAfHcdDcEuNA0+IA8b3YyMwR8N50id+Yi61EZgFsg="
before_install:
- echo -n | openssl s_client -connect https://scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
- pip install --user cpp-coveralls
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_COMPILER" == "gcc" ]]; then sudo apt-get install -y gdb; fi
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_COMPILER" == "gcc" ]]; then ulimit -c unlimited -S; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo sysctl -w kern.sysv.shmmax=419430400; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo sysctl -w kern.sysv.shmall=419430400; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo sysctl -w kernel.shmmax=419430400; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo sysctl -w kernel.shmall=419430400; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" || "$TRAVIS_OS_NAME" == "linux" ]]; then sysctl -a|grep shm; fi
- df -m
- ipcs -m
- ipcs -mt
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ipcs -M; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ipcs -lm; fi
- ulimit -a
script:
- cmake --version
- mkdir build
- cd build
- cmake -DENABLE_GCOV=TRUE ..
- make -j4
- ls ../bin/*
- cd ../bin
- ./test_buffer
- ./test_filter
- ./test_load_config
- ./test_udp >/dev/null 2>&1
- ./test_buffer_correct
- ./test_fast_debug
- ./test_fast_default
- ./test_coverage
- ./test_channel_normal
- ./stress_multi-thread-env_main_reboot
- ./stress_multi-thread-env_concurrent_reboot 50000 >/dev/null 2>&1
- cd ..
- find ./ -name "*.gc*"
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_COMPILER" == "gcc" ]]; then coveralls; else echo "$TRAVIS_OS_NAME $TRAVIS_COMPILER"; fi
- ls -la
- sh merge_header.sh
- mv src/include src/bak
- mkdir src/include
- mv fn_log.h.only src/include/fn_log.h
- mkdir benchmarke-build
- cd benchmarke-build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j4
- cd ..
- rm -fr benchmarke-build
- rm -fr src/include
- mv src/bak src/include
- ls bin/*
- cd bin
- ./stress_multi-thread-env_concurrent_reboot >/dev/null 2>&1
- ./stress_multi-thread-env_main_reboot
- ./benchmark_multi-thread
- ./benchmark_multi-thread_nofile
- ./benchmark_multi-thread_sync
- ./benchmark_multi-thread_sync_nofile
- ./benchmark_serialize_integer
- ./benchmark_sync_bat_write
- ./benchmark_normal
- ./benchmark_udp
- ./benchmark_fast
- ipcs -m
- ipcs -mt
- ./test_shm
- ipcs -m
- ipcs -mt
- ./test_shm
- ipcs -m
- ipcs -mt
- ./benchmark_multi-thread_travis_shm
- cd ..
- find ./ -name "*.gc*"
- cd ..
after_success:
after_failure:
#- COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) # find core file
#- if [[ -f "$COREFILE" ]]; then gdb -c "$COREFILE" example -ex "thread apply all bt" -ex "set pagination 0" -batch; fi
addons:
coverity_scan:
project:
name: "zsummer/fn-log"
description: "fn-log coverity"
notification_email: [email protected]
build_command_prepend: "mkdir coverity; cd coverity; cmake .."
build_command: "make -j2"
branch_pattern: coverity