This repository has been archived by the owner on Feb 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
73 lines (64 loc) · 1.7 KB
/
.gitlab-ci.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
image: debian:buster-slim
stages:
- build
- test
variables:
LINUX_HEADER_VERSION: "4.19.0-6"
TEST_PATH: "/tmp/implant"
CODECOV_TOKEN: ad5d0db4-a0a8-493f-8f9d-d0f66bd9e86d
.update: &update apt-get update -y && apt-get upgrade -y
.test:
stage: test
dependencies:
- client
before_script:
- *update
- apt-get install valgrind curl gcc ca-certificates -y --no-install-recommends
- touch ${TEST_PATH}
script:
- sh client/${CI_JOB_NAME}.sh
after_script:
- bash <(curl https://codecov.io/bash -t ${CODECOV_TOKEN})
kmod:
stage: build
before_script:
- *update
- apt-get install make gcc linux-headers-${LINUX_HEADER_VERSION}-amd64 -y --no-install-recommends
script:
- make KDIR=/lib/modules/${LINUX_HEADER_VERSION}-amd64/build
client:
stage: build
before_script:
- *update
- apt-get install make gcc libc6-dev linux-headers-${LINUX_HEADER_VERSION}-amd64 upx-ucl -y --no-install-recommends
script:
- make KDIR=/lib/modules/${LINUX_HEADER_VERSION}-amd64/build IMPLANT_DEVICE_PATH='\"${TEST_PATH}\"' COVERAGE=true PACKER=false DEBUG=true sc-client
artifacts:
paths:
- sc-client
- "*.gcno"
expire_in: 1 week
format:
stage: build
before_script:
- *update
- apt-get install make clang-format git -y --no-install-recommends
script:
- make format
- (! git status | grep modified:)
pages:
stage: build
before_script:
- *update
- apt-get install make python3-pip clang -y --no-install-recommends
- pip3 install clang sphinx sphinx-rtd-theme hawkmoth
script:
- make -C doc html
- mv doc/build/html/ public/
artifacts:
paths:
- public
only:
- master
test/run_all:
extends: .test