gitlab CI: hook up the meson build
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 14 Feb 2020 02:06:46 +0000 (12:06 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 17 Feb 2020 07:42:32 +0000 (17:42 +1000)
Centos doesn't run meson because it's too hard to install the package with dnf
and I can't be bothered going through pip.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
.gitlab-ci.yml
.gitlab-ci/generate-gitlab-ci.py
.gitlab-ci/gitlab-ci.tmpl

index e2c3056f326885b4df76c44a5107a73b113751fb..af2eab5f40386c3607342399c2ccb4dda8c45e85 100644 (file)
@@ -34,6 +34,7 @@ stages:
   - build            # for actually building and testing things in a container
   - VM               # for running the test suite in a VM
   - autotools        # distribution builds with autotools
+  - meson            # distribution builds with meson
   - deploy           # trigger wayland's website generation
   - container_clean  # clean up unused container images
 
@@ -45,23 +46,23 @@ variables:
   # Run dnf install/apt-get install/.. with the list of packages for your       #
   # distribution                                                                #
   ###############################################################################
-  FEDORA_RPMS: 'git gcc gcc-c++ automake autoconf libtool make pkgconfig  python3 check-devel valgrind binutils doxygen xz'
-  CENTOS_RPMS: 'git gcc gcc-c++ automake autoconf libtool make pkgconfig  python3 check-devel valgrind binutils xz'
-  UBUNTU_DEBS: 'git gcc g++     automake autoconf libtool make pkg-config python3 check       valgrind binutils doxygen xz-utils'
+  FEDORA_RPMS: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig  python3 check-devel valgrind binutils doxygen xz'
+  CENTOS_RPMS: 'git gcc gcc-c++       automake autoconf libtool make pkgconfig  python3 check-devel valgrind binutils xz'
+  UBUNTU_DEBS: 'git gcc g++     meson automake autoconf libtool make pkg-config python3 check       valgrind binutils doxygen xz-utils'
   DEBIAN_DEBS: $UBUNTU_DEBS
-  ARCH_PKGS:   'git gcc         automake autoconf libtool make pkgconfig  python3 check       valgrind binutils doxygen'
-  ALPINE_PKGS: 'git gcc g++     automake autoconf libtool make pkgconfig  python3 check-dev   valgrind binutils doxygen xz linux-headers'
+  ARCH_PKGS:   'git gcc         meson automake autoconf libtool make pkgconfig  python3 check       valgrind binutils doxygen'
+  ALPINE_PKGS: 'git gcc g++     meson automake autoconf libtool make pkgconfig  python3 check-dev   valgrind binutils doxygen xz linux-headers'
   ############################ end of package lists #############################
   # these tags should be updated each time the list of packages is updated
   # changing these will force rebuilding the associated image
   # Note: these tags have no meaning and are not tied to a particular
   # libevdev version
-  FEDORA_TAG: '2020-02-17.0'
-  CENTOS_TAG: '2020-02-17.0'
-  DEBIAN_TAG: '2020-02-17.0'
-  UBUNTU_TAG: '2020-02-17.0'
-  ARCH_TAG:   '2020-02-17.0'
-  ALPINE_TAG: '2020-02-17.0'
+  FEDORA_TAG: '2020-02-17.1'
+  CENTOS_TAG: '2020-02-17.1'
+  DEBIAN_TAG: '2020-02-17.1'
+  UBUNTU_TAG: '2020-02-17.1'
+  ARCH_TAG:   '2020-02-17.1'
+  ALPINE_TAG: '2020-02-17.1'
 
   UPSTREAM_REPO: libevdev/libevdev
   BUILDAH_IMAGE: $CI_REGISTRY/wayland/ci-templates/buildah:latest
@@ -79,6 +80,7 @@ variables:
   artifacts:
     paths:
       - _build/test/test-suite.log
+      - builddir/meson-logs/testlog-*.txt
     expire_in: 1 week
     when: on_failure
     reports:
@@ -96,6 +98,13 @@ variables:
     - if ! [[ -z "$MAKE_ARGS" ]]; then make $MAKE_ARGS; fi
     - popd > /dev/null
 
+.meson_build:
+  extends:
+    - .default_artifacts
+  script:
+    - meson builddir $MESON_ARGS
+    - ninja -C builddir $NINJA_ARGS
+
 #################################################################
 #                                                               #
 #                          prep stage                           #
@@ -485,6 +494,14 @@ alpine:latest@container-clean:
   variables:
     MAKE_ARGS: "distcheck"
 
+.meson-build@template:
+  extends:
+    - .meson_build
+  stage: build
+  dependencies: []
+  variables:
+    NINJA_ARGS: "dist"
+
 
 fedora:30@autotools-build:
   extends: .autotools-build@template
@@ -494,6 +511,15 @@ fedora:30@autotools-build:
     FEDORA_VERSION: '30'
   needs: ['fedora:30@container-prep']
 
+fedora:30@meson-build:
+  extends: .meson-build@template
+  stage: meson
+  image: $FEDORA_CONTAINER_IMAGE
+  variables:
+    FEDORA_VERSION: '30'
+  needs: ['fedora:30@container-prep']
+
+
 fedora:31@autotools-build:
   extends: .autotools-build@template
   stage: autotools
@@ -502,6 +528,15 @@ fedora:31@autotools-build:
     FEDORA_VERSION: '31'
   needs: ['fedora:31@container-prep']
 
+fedora:31@meson-build:
+  extends: .meson-build@template
+  stage: meson
+  image: $FEDORA_CONTAINER_IMAGE
+  variables:
+    FEDORA_VERSION: '31'
+  needs: ['fedora:31@container-prep']
+
+
 ubuntu:19.10@autotools-build:
   extends: .autotools-build@template
   stage: autotools
@@ -510,6 +545,15 @@ ubuntu:19.10@autotools-build:
     UBUNTU_VERSION: '19.10'
   needs: ['ubuntu:19.10@container-prep']
 
+ubuntu:19.10@meson-build:
+  extends: .meson-build@template
+  stage: meson
+  image: $UBUNTU_CONTAINER_IMAGE
+  variables:
+    UBUNTU_VERSION: '19.10'
+  needs: ['ubuntu:19.10@container-prep']
+
+
 ubuntu:19.04@autotools-build:
   extends: .autotools-build@template
   stage: autotools
@@ -518,6 +562,15 @@ ubuntu:19.04@autotools-build:
     UBUNTU_VERSION: '19.04'
   needs: ['ubuntu:19.04@container-prep']
 
+ubuntu:19.04@meson-build:
+  extends: .meson-build@template
+  stage: meson
+  image: $UBUNTU_CONTAINER_IMAGE
+  variables:
+    UBUNTU_VERSION: '19.04'
+  needs: ['ubuntu:19.04@container-prep']
+
+
 debian:stable@autotools-build:
   extends: .autotools-build@template
   stage: autotools
@@ -526,6 +579,15 @@ debian:stable@autotools-build:
     DEBIAN_VERSION: 'stable'
   needs: ['debian:stable@container-prep']
 
+debian:stable@meson-build:
+  extends: .meson-build@template
+  stage: meson
+  image: $DEBIAN_CONTAINER_IMAGE
+  variables:
+    DEBIAN_VERSION: 'stable'
+  needs: ['debian:stable@container-prep']
+
+
 debian:sid@autotools-build:
   extends: .autotools-build@template
   stage: autotools
@@ -534,6 +596,15 @@ debian:sid@autotools-build:
     DEBIAN_VERSION: 'sid'
   needs: ['debian:sid@container-prep']
 
+debian:sid@meson-build:
+  extends: .meson-build@template
+  stage: meson
+  image: $DEBIAN_CONTAINER_IMAGE
+  variables:
+    DEBIAN_VERSION: 'sid'
+  needs: ['debian:sid@container-prep']
+
+
 centos:7@autotools-build:
   extends: .autotools-build@template
   stage: autotools
@@ -543,6 +614,8 @@ centos:7@autotools-build:
     MAKE_ARGS: ''  # disable distcheck, requires doxygen
   needs: ['centos:7@container-prep']
 
+
+
 centos:8@autotools-build:
   extends: .autotools-build@template
   stage: autotools
@@ -552,6 +625,8 @@ centos:8@autotools-build:
     MAKE_ARGS: ''  # disable distcheck, requires doxygen
   needs: ['centos:8@container-prep']
 
+
+
 arch:rolling@autotools-build:
   extends: .autotools-build@template
   stage: autotools
@@ -560,6 +635,15 @@ arch:rolling@autotools-build:
     ARCH_VERSION: 'rolling'
   needs: ['arch:rolling@container-prep']
 
+arch:rolling@meson-build:
+  extends: .meson-build@template
+  stage: meson
+  image: $ARCH_CONTAINER_IMAGE
+  variables:
+    ARCH_VERSION: 'rolling'
+  needs: ['arch:rolling@container-prep']
+
+
 alpine:latest@autotools-build:
   extends: .autotools-build@template
   stage: autotools
@@ -568,6 +652,15 @@ alpine:latest@autotools-build:
     ALPINE_VERSION: 'latest'
   needs: ['alpine:latest@container-prep']
 
+alpine:latest@meson-build:
+  extends: .meson-build@template
+  stage: meson
+  image: $ALPINE_CONTAINER_IMAGE
+  variables:
+    ALPINE_VERSION: 'latest'
+  needs: ['alpine:latest@container-prep']
+
+
 # Build argument tests
 #
 # We only run the build option combinations on one image
index cabf9265cdbdf784f70855a25625f6688362db6e..806d7c85b7c879a497da64cf3714134028e14f71 100755 (executable)
@@ -19,6 +19,7 @@ distributions = [
                 'MAKE_ARGS': ('\'\'  # disable distcheck, requires doxygen'),
             }
         },
+        'meson': False
     },
     {
         'name': 'centos', 'version': '8',
@@ -27,6 +28,7 @@ distributions = [
                 'MAKE_ARGS': ('\'\'  # disable distcheck, requires doxygen'),
             }
         },
+        'meson': False
     },
     {'name': 'arch', 'version': 'rolling',
      'flavor': 'archlinux' },  # see https://gitlab.freedesktop.org/wayland/ci-templates/merge_requests/19
index 306fd7b79778487ad62b9216470c3824dbf63046..571188c94d19de6207efbb33bf153fd1cf5dbc53 100644 (file)
@@ -34,6 +34,7 @@ stages:
   - build            # for actually building and testing things in a container
   - VM               # for running the test suite in a VM
   - autotools        # distribution builds with autotools
+  - meson            # distribution builds with meson
   - deploy           # trigger wayland's website generation
   - container_clean  # clean up unused container images
 
@@ -45,23 +46,23 @@ variables:
   # Run dnf install/apt-get install/.. with the list of packages for your       #
   # distribution                                                                #
   ###############################################################################
-  FEDORA_RPMS: 'git gcc gcc-c++ automake autoconf libtool make pkgconfig  python3 check-devel valgrind binutils doxygen xz'
-  CENTOS_RPMS: 'git gcc gcc-c++ automake autoconf libtool make pkgconfig  python3 check-devel valgrind binutils xz'
-  UBUNTU_DEBS: 'git gcc g++     automake autoconf libtool make pkg-config python3 check       valgrind binutils doxygen xz-utils'
+  FEDORA_RPMS: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig  python3 check-devel valgrind binutils doxygen xz'
+  CENTOS_RPMS: 'git gcc gcc-c++       automake autoconf libtool make pkgconfig  python3 check-devel valgrind binutils xz'
+  UBUNTU_DEBS: 'git gcc g++     meson automake autoconf libtool make pkg-config python3 check       valgrind binutils doxygen xz-utils'
   DEBIAN_DEBS: $UBUNTU_DEBS
-  ARCH_PKGS:   'git gcc         automake autoconf libtool make pkgconfig  python3 check       valgrind binutils doxygen'
-  ALPINE_PKGS: 'git gcc g++     automake autoconf libtool make pkgconfig  python3 check-dev   valgrind binutils doxygen xz linux-headers'
+  ARCH_PKGS:   'git gcc         meson automake autoconf libtool make pkgconfig  python3 check       valgrind binutils doxygen'
+  ALPINE_PKGS: 'git gcc g++     meson automake autoconf libtool make pkgconfig  python3 check-dev   valgrind binutils doxygen xz linux-headers'
   ############################ end of package lists #############################
   # these tags should be updated each time the list of packages is updated
   # changing these will force rebuilding the associated image
   # Note: these tags have no meaning and are not tied to a particular
   # libevdev version
-  FEDORA_TAG: '2020-02-17.0'
-  CENTOS_TAG: '2020-02-17.0'
-  DEBIAN_TAG: '2020-02-17.0'
-  UBUNTU_TAG: '2020-02-17.0'
-  ARCH_TAG:   '2020-02-17.0'
-  ALPINE_TAG: '2020-02-17.0'
+  FEDORA_TAG: '2020-02-17.1'
+  CENTOS_TAG: '2020-02-17.1'
+  DEBIAN_TAG: '2020-02-17.1'
+  UBUNTU_TAG: '2020-02-17.1'
+  ARCH_TAG:   '2020-02-17.1'
+  ALPINE_TAG: '2020-02-17.1'
 
   UPSTREAM_REPO: libevdev/libevdev
   BUILDAH_IMAGE: $CI_REGISTRY/wayland/ci-templates/buildah:latest
@@ -79,6 +80,7 @@ variables:
   artifacts:
     paths:
       - _build/test/test-suite.log
+      - builddir/meson-logs/testlog-*.txt
     expire_in: 1 week
     when: on_failure
     reports:
@@ -96,6 +98,13 @@ variables:
     - if ! [[ -z "$MAKE_ARGS" ]]; then make $MAKE_ARGS; fi
     - popd > /dev/null
 
+.meson_build:
+  extends:
+    - .default_artifacts
+  script:
+    - meson builddir $MESON_ARGS
+    - ninja -C builddir $NINJA_ARGS
+
 #################################################################
 #                                                               #
 #                          prep stage                           #
@@ -282,6 +291,14 @@ check-commit:
   variables:
     MAKE_ARGS: "distcheck"
 
+.meson-build@template:
+  extends:
+    - .meson_build
+  stage: build
+  dependencies: []
+  variables:
+    NINJA_ARGS: "dist"
+
 {% for distro in distributions %}
 
 {{ distro.name }}:{{ distro.version }}@autotools-build:
@@ -297,6 +314,23 @@ check-commit:
       {% endfor %}
     {% endif %}
   needs: ['{{ distro.name }}:{{ distro.version }}@container-prep']
+
+{% if distro.meson|default(True) %}
+{{ distro.name }}:{{ distro.version }}@meson-build:
+  extends: .meson-build@template
+  stage: meson
+  image: ${{ distro.name.upper() }}_CONTAINER_IMAGE
+  variables:
+    {{ distro.name.upper() }}_VERSION: '{{ distro.version }}'
+    {# Where we have extra_variables defined, add them to the list #}
+    {% if distro.build is defined and distro.build.extra_variables is defined %}
+      {% for key, value in distro.build.extra_variables.items() %}
+    {{ key }}: {{ value }}
+      {% endfor %}
+    {% endif %}
+  needs: ['{{ distro.name }}:{{ distro.version }}@container-prep']
+{% endif %}
+
 {% endfor %}
 
 # Build argument tests