Skip to content

Commit 101e90e

Browse files
committed
Tests lxc 5.0
1 parent c9ee059 commit 101e90e

File tree

1 file changed

+31
-57
lines changed

1 file changed

+31
-57
lines changed

.gitlab-ci.yml

Lines changed: 31 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -13,76 +13,50 @@ fmt:
1313

1414
.common: &common
1515
before_script:
16-
- VERSION=$(echo "$CI_JOB_NAME" | cut -d ':' -f 2)
1716
- apt update
18-
- apt install lxc-dev clang -y
17+
- apt install lxc-dev clang meson systemd -y
1918

2019
- git clone https://github.com/lxc/lxc.git
2120
- cd lxc
22-
- git checkout "lxc-$VERSION.0"
23-
- ./autogen.sh
24-
- ./configure
25-
- cp src/lxc/attach_options.h src/lxc/lxccontainer.h src/lxc/version.h /usr/include/lxc
26-
27-
.clippy: &clippy
21+
- >
22+
case "$VERSION" in
23+
"5.0")
24+
TAG="lxc-5.0.3"
25+
;;
26+
*)
27+
TAG="lxc-$VERSION.0"
28+
;;
29+
esac
30+
- git checkout "$TAG"
31+
- >
32+
if [[ $(echo "$VERSION" | cut -d. -f1) -ge 5 ]]
33+
then
34+
meson setup -Dprefix=/usr -Dman=false build
35+
meson compile -C build
36+
meson install -C build
37+
else
38+
./autogen.sh
39+
./configure
40+
cp src/lxc/attach_options.h src/lxc/lxccontainer.h src/lxc/version.h /usr/include/lxc
41+
fi
42+
43+
clippy:
44+
parallel:
45+
matrix:
46+
- VERSION: ["1.0", "1.1", "2.0", "2.1", "3.0", "3.1", "3.2", "4.0", "5.0"]
2847
<<: *common
2948
stage: lint
3049
script:
3150
- rustup component add clippy
3251
- cargo clippy --features="v${VERSION/./_}"
3352

34-
clippy:1.0:
35-
<<: *clippy
36-
37-
clippy:1.1:
38-
<<: *clippy
39-
40-
clippy:2.0:
41-
<<: *clippy
42-
43-
clippy:2.1:
44-
<<: *clippy
45-
46-
clippy:3.0:
47-
<<: *clippy
48-
49-
clippy:3.1:
50-
<<: *clippy
51-
52-
clippy:3.2:
53-
<<: *clippy
54-
55-
clippy:4.0:
56-
<<: *clippy
57-
58-
.test: &test
53+
test:
54+
parallel:
55+
matrix:
56+
- VERSION: ["1.0", "1.1", "2.0", "2.1", "3.0", "3.1", "3.2", "4.0", "5.0"]
5957
<<: *common
6058
stage: test
6159
script:
6260
- FEATURE="v${VERSION/./_}"
6361
- cargo test --features=$FEATURE --release
6462
- cargo test --features=$FEATURE
65-
66-
test:1.0:
67-
<<: *test
68-
69-
test:1.1:
70-
<<: *test
71-
72-
test:2.0:
73-
<<: *test
74-
75-
test:2.1:
76-
<<: *test
77-
78-
test:3.0:
79-
<<: *test
80-
81-
test:3.1:
82-
<<: *test
83-
84-
test:3.2:
85-
<<: *test
86-
87-
test:4.0:
88-
<<: *test

0 commit comments

Comments
 (0)