-
Notifications
You must be signed in to change notification settings - Fork 15
/
.gitlab-ci.yml
60 lines (54 loc) · 2.08 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
# Copyright (C) 2019 Casper Meijn <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0
include:
template: SAST.gitlab-ci.yml
stages:
- build
- test
- alpha
- deploy
flatpak:
image: registry.gitlab.com/caspermeijn/docker-images/flatpak-kde:latest
stage: build
script:
- flatpak-builder --repo=flatpak/repo flatpak/build --keep-build-dirs flatpak/net.meijn.onvifviewer.yaml
- flatpak build-bundle flatpak/repo onvifviewer.flatpak net.meijn.onvifviewer
- xvfb-run -a -s "-screen 0 1024x768x24" flatpak-builder --run flatpak/build flatpak/net.meijn.onvifviewer.yaml ninja -C .flatpak-builder/build/onvifviewer/_flatpak_build test
artifacts:
paths:
- onvifviewer.flatpak
cache:
paths:
- .flatpak-builder/cache
fedora:
image: registry.gitlab.com/caspermeijn/docker-images/fedora-build-onvifviewer:latest
stage: build
script:
- mkdir build-onvifviewer/
- cd build-onvifviewer/
- cmake ..
- make
- xvfb-run -a -s "-screen 0 1024x768x24" make test
- make install
reuse:
image:
name: fsfe/reuse:latest
entrypoint: [""]
stage: test
script:
- reuse lint || echo "Always report as successful. For now this is a informational test"
test-translations:
image: registry.gitlab.com/caspermeijn/docker-images/fedora-build-onvifviewer:latest
stage: test
script:
- git config diff.podiff.textconv "msgcat --no-location --sort-output"
- mkdir -p .git/info && echo "*.po diff=podiff" >> .git/info/attributes && echo "*.pot diff=podiff" >> .git/info/attributes
- cd po && ./update_translation.sh
- mkdir build && cmake .. && cmake --build . --target fastlane-metadata
# --ignore-space-change is a workaround, as --exit-code doesn't work properly without it. See http://git.661346.n2.nabble.com/git-diff-exit-code-does-not-honour-textconv-setting-tp7651075.html
- git diff --ignore-space-change --exit-code
artifacts:
paths:
- po/onvifviewer.pot
- po/*.po