-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
98 lines (93 loc) · 2.09 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
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
default:
image: debian:testing
tags:
- bookworm
stages:
- build
- test
- generate
- lava
.build debian package:
stage: build
tags:
- ultra-heavyweight
cache:
when: on_success
key: $CI_COMMIT_REF_SLUG
paths:
- ccache
variables:
DEBIAN_FRONTEND: noninteractive
GIT_SUBMODULE_STRATEGY: normal
ARCH: amd64
DEFCONFIG: defconfig
CCACHE_BASEDIR: $CI_PROJECT_DIR
CCACHE_DIR: $CI_PROJECT_DIR/ccache
before_script:
- apt update
- apt install -y devscripts
build-essential
crossbuild-essential-arm64
bc
bison
ccache
flex
rsync
kmod
cpio
libelf-dev
libssl-dev
# Setup ccache
- export PATH="/usr/lib/ccache:$PATH"
- ccache -s
script:
- make $DEFCONFIG
- make -j$(nproc) $ADDITIONAL_BUILD_CMD bindeb-pkg
- mkdir artifacts && dcmd mv ../*.changes artifacts/
artifacts:
paths:
- artifacts
build arm64 debian package:
extends: .build debian package
variables:
ARCH: arm64
CROSS_COMPILE: aarch64-linux-gnu-
ADDITIONAL_BUILD_CMD: KBUILD_IMAGE=arch/arm64/boot/Image
generate tests:
image: debian:bookworm-slim
stage: generate
tags:
- lightweight
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: "1"
needs:
- "build arm64 debian package"
script:
- mkdir deb
- "for x in artifacts/linux-image*.deb ; do dpkg -x ${x} deb ; done"
- cp deb/boot/vmlinuz* vmlinuz
- tar -f modules.tar.gz -C deb -c -z -v lib/modules
- mkdir dtbs
- cp -r deb/usr/lib/linux-image*/* dtbs
- sed -i s,%%KERNEL_BUILD_JOB%%,${CI_JOB_ID},g lava/testjob.yaml
artifacts:
paths:
- vmlinuz*
- modules.tar.gz
- dtbs
- lava/testjob.yaml
lava test:
stage: lava
tags:
- lava-runner
script:
- submit lava/testjob.yaml
needs:
- "generate tests"
artifacts:
when: always
paths:
- "*"
reports:
junit: "*.xml"