summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 654a1aa37b5da7c148f9aa2f7facb4f01c3ac62a (plain)
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
image: fedora:latest

variables:
  DEPS_COMMON: git gcc redhat-rpm-config
               meson ninja-build gtk-doc glib2-devel
               gettext gettext-devel bzip2 rpmlint rpm-build
               mingw32-filesystem mingw64-filesystem

before_script:
- dnf install -y $DEPS_COMMON

fedora:
  script:
    # build project and distribution
    - meson --buildtype=release build-default
    - ninja -C build-default
    - ninja -C build-default dist
    # check SPEC file
    - rpmlint spice-protocol.spec
    # check the SPEC version and project (in meson.build) are the same
    - "VER_SPEC=$(sed '/^Version:/!d; s/.*: \\+//' < spice-protocol.spec)"
    - "VER_PROJECT=$(sed '/version/ { s/.*'\\''\\(.*\\)'\\''.*/\\1/; q }; d' < meson.build)"
    - "test \"x$VER_SPEC\" = \"x$VER_PROJECT\""
    # build RPM from tarball generate
    - rpmbuild -ta build-default/meson-dist/spice-protocol*.tar.xz