-
Notifications
You must be signed in to change notification settings - Fork 45
/
.travis.yml
118 lines (112 loc) · 3.88 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
language: generic
before_install_linux: &linux_setup
- mkdir mason
- curl -sSfL "https://github.com/mapbox/mason/archive/e8fa2d1.tar.gz" | tar --gunzip --extract --strip-components=1 --directory=./mason
- ./mason/mason install gdb 7.12
- sudo ln -s $(./mason/mason prefix gdb 7.12)/bin/gdb /usr/local/bin/gdb
- which gdb
# attempt to workaroung "ptrace: Operation not permitted"
- sudo chmod +s $(which gdb)
# To ensure that the --setup command is working we start off by
# manually creating a bogus core pattern
- sudo bash -c 'echo "dummy" > /proc/sys/kernel/core_pattern'
# https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace
# https://www.kernel.org/doc/Documentation/security/Yama.txt
- cat /proc/sys/kernel/yama/ptrace_scope
- sudo bash -c 'echo 0 > /proc/sys/kernel/yama/ptrace_scope'
before_install_osx: &osx_setup
# To ensure that the --setup command is working we start off by
# manually creating a bogus core pattern
- sudo sysctl kern.corefile=dummy
- brew install coreutils || true
- export PATH=$(brew --prefix)/opt/coreutils/libexec/gnubin:${PATH}
- which lldb
- lldb --version
install_default: &run_install
# disable node that may be already enabled via nvm
- nvm unload || true
- platform=$(uname -s | tr '[:upper:]' '[:lower:]')
- NODE_SLUG=node-v$(cat .nvmrc)-${platform}-x64
- curl -sL --retry 3 -O https://nodejs.org/dist/v$(cat .nvmrc)/${NODE_SLUG}.tar.gz
- sudo tar xzf ${NODE_SLUG}.tar.gz --strip-components=1 -C /usr/local
- export PATH=/usr/local/bin:${PATH}
- /usr/local/bin/node --version
- which node
- node --version
- npm --version
script_default: &run_script
- sudo ./bin/logbt --setup
- ./bin/logbt --test
- ./test/unit.sh
services:
- docker
matrix:
include:
- os: linux
env: DOCKER=PID1-signal
dist: trusty
script:
- ./test/docker-snapshotting.sh TERM
- ./test/docker-snapshotting.sh HUP
# TODO: INT never reaches logbt on linux
#- ./test/docker-snapshotting.sh INT
- os: linux
env: DOCKER=writable-proc
dist: trusty
script:
- docker build -t logbt-bionic1 -f Dockerfile.writable-proc .
- docker run --cap-add SYS_PTRACE --volume /proc:/writable-proc logbt-bionic1
- cat /proc/sys/kernel/core_pattern
- os: linux
env: DOCKER=readonly
dist: trusty
script:
- docker build -t logbt-bionic2 -f Dockerfile.readonly .
- sudo ./bin/logbt --setup
- docker run --cap-add SYS_PTRACE logbt-bionic2
- cat /proc/sys/kernel/core_pattern
- os: linux
env: DOCKER=privileged
dist: trusty
script:
- docker build -t logbt-bionic3 -f Dockerfile .
- docker run --privileged logbt-bionic3
- cat /proc/sys/kernel/core_pattern
- os: linux
env: DOCKER=readonly-from-host
dist: trusty
script:
- docker build -t logbt-bionic4 -f Dockerfile.logbt-from-host .
- sudo ./bin/logbt --setup
- docker run --cap-add SYS_PTRACE -v $(pwd)/bin/logbt:/usr/local/bin/logbt logbt-bionic4
- os: linux
dist: bionic
env: CXX=clang++
before_install: *linux_setup
install: *run_install
before_script:
- ./mason/mason install clang++ 10.0.0
- sudo ln -s $(./mason/mason prefix clang++ 10.0.0)/bin/clang++ /usr/local/bin/clang++
- which clang++
script: *run_script
- os: linux
dist: trusty
env: CXX=g++-6
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test']
packages: [ 'g++-6']
before_install: *linux_setup
install: *run_install
script: *run_script
- os: linux
dist: bionic
env: CXX=g++
before_install: *linux_setup
install: *run_install
script: *run_script
- os: osx
osx_image: xcode11
before_install: *osx_setup
install: *run_install
script: *run_script