-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
57 lines (51 loc) · 1.03 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
image: registry.gitlab.sensirion.lokal/sensirion/docker/docker-python:2.7-18.04-1.1.0
stages:
- test
- build
- deploy
variables:
PACKAGE_NAME: "sps30"
test:
stage: test
tags:
- linux
- docker
script:
- apt-get -qq update && apt-get -q install -y linux-headers-generic
- export KERNELVERSION=$(dpkg -s linux-headers-generic | grep '^Depends:' | sed 's/^.*linux-headers-//')
- export KERNELDIR=/lib/modules/${KERNELVERSION}/build
- make check
- make clean && make
build:
stage: build
tags:
- linux
- docker
only:
- master
script:
- echo "Create snapshot artifact"
artifacts:
expire_in: 1 week
name: ${PACKAGE_NAME}-${CI_COMMIT_REF_NAME}
paths:
- LICENSE
- Makefile
- README.md
- sps30/
deploy:
stage: deploy
tags:
- linux
- docker
only:
- tags
script:
- echo "Create release artifact"
artifacts:
name: ${PACKAGE_NAME}-${CI_COMMIT_TAG}
paths:
- LICENSE
- Makefile
- README.md
- sps30/