forked from OSInside/kiwi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
98 lines (90 loc) · 2.39 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
stages:
- test
- package
image: fedora:latest
variables:
LANG: en_US.UTF-8
.install_deps: &install_system_deps
before_script:
- >
dnf install -y --refresh
python3 python3-devel 'python3dist(pip)' 'python3dist(tox)'
gcc xz libxml2-devel libxslt-devel enchant
.install_and_build_src_package: &install_and_build_system_src_package
before_script:
- >
dnf install -y --refresh
mock gzip tar git python3 python3-dateutil python3-docopt
make which
- 'sed -i "s|build: clean tox|build:|" Makefile'
- make build
- mv dist/python-kiwi.spec .
- rm dist/python-kiwi.changes
- >
mock
--old-chroot -r /etc/mock/fedora-29-x86_64.cfg
--buildsrpm --sources ./dist
--spec ./python-kiwi.spec 2>&1 | tee srpm_build_out
- "export SRC_RPM=$(ls $(grep 'INFO: Results ' srpm_build_out | awk -F ':' '{print $3}')/*.src.rpm)"
- mv $SRC_RPM .
.add_cache: &set_cache_dir
cache:
key: "$CI_JOB_NAME"
paths:
- .tox
code_style_plus_unit_test:
<<: *install_system_deps
script:
- >
dnf install -y
python36 xorriso genisoimage ShellCheck
# Flake
- tox -e check
# Python 3.6
- export PYTHON=python3.6
- tox -e unit_py3_6 "-n $(nproc)"
# Python 3.7
- export PYTHON=python3.7
- tox -e unit_py3_7 "-n $(nproc)"
<<: *set_cache_dir
build_doc:
<<: *install_system_deps
script:
- >
dnf install -y
latexmk texlive-cmap texlive-metafont texlive-ec
texlive-babel-english texlive-fncychap texlive-fancyhdr texlive-titlesec
texlive-tabulary texlive-framed texlive-wrapfig texlive-parskip
texlive-upquote texlive-capt-of texlive-needspace texlive-makeindex
texlive-times texlive-helvetic texlive-courier texlive-gsftopk
texlive-updmap-map texlive-dvips
- tox -e packagedoc
artifacts:
paths:
- doc/build/
cache:
key: "$CI_JOB_NAME"
paths:
- .tox/
- doc/build/
rpm_fedora_29:
stage: package
<<: *install_and_build_system_src_package
script:
- >
mock
--old-chroot
-r /etc/mock/fedora-29-x86_64.cfg $(basename $SRC_RPM)
dependencies:
- build_doc
rpm_suse_TW:
stage: package
<<: *install_and_build_system_src_package
script:
- >
mock
--old-chroot
-r /etc/mock/opensuse-tumbleweed-x86_64.cfg $(basename $SRC_RPM)
allow_failure: true
dependencies:
- build_doc