gitlab CI: sync the meson-build.sh script with libinput
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 9 Jan 2023 22:56:13 +0000 (08:56 +1000)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 17 Nov 2023 10:55:47 +0000 (19:55 +0900)
Pulls in the three libinput commits up to 31ecda70087

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
.gitlab-ci/meson-build.sh

index d12dd0f90f681a031025e17df9eaae9311b9d86b..82f00e09d75b22da2d9f33fb0da53583d2860862 100755 (executable)
@@ -1,4 +1,6 @@
 #!/usr/bin/env bash
+#
+# SPDX-License-Identifier: MIT
 
 set -x
 if [[ -f .meson_environment ]]; then
@@ -42,15 +44,16 @@ fi
 # run and debug locally.
 if [[ -z "$CI_JOB_ID" ]] || [[ -z "$CI_JOB_NAME" ]]; then
        echo "Missing \$CI_JOB_ID or \$CI_JOB_NAME".
+       CI_PROJECT_NAME=$(basename "$PWD")
        CI_JOB_ID=$(date +%s)
-       CI_JOB_NAME='libevdev-job-local'
+       CI_JOB_NAME="$CI_PROJECT_NAME-job-local"
        echo "Simulating gitlab environment: "
        echo " CI_JOB_ID=$CI_JOB_ID"
        echo " CI_JOB_NAME=$CI_JOB_NAME"
 fi
 
 if [[ -n "$FDO_CI_CONCURRENT" ]]; then
-       NINJA_ARGS="-j$FDO_CI_CONCURRENT $NINJA_ARGS"
+       jobcount="-j$FDO_CI_CONCURRENT"
        export MESON_TESTTHREADS="$FDO_CI_CONCURRENT"
 fi
 
@@ -59,6 +62,7 @@ echo "builddir: $MESON_BUILDDIR"
 echo "meson args: $MESON_ARGS"
 echo "ninja args: $NINJA_ARGS"
 echo "meson test args: $MESON_TEST_ARGS"
+echo "job count: ${jobcount-0}"
 echo "*************************************************"
 
 set -e
@@ -70,7 +74,10 @@ fi
 meson configure "$MESON_BUILDDIR"
 
 if [[ -z "$MESON_SKIP_BUILD" ]]; then
-       ninja -C "$MESON_BUILDDIR" $NINJA_ARGS
+       if [[ -n "$NINJA_ARGS" ]]; then
+               ninja_args="--ninja-args $NINJA_ARGS"
+       fi
+       meson compile -v -C "$MESON_BUILDDIR" $jobcount $ninja_args
 fi
 
 if [[ -n "$MESON_RUN_TEST" ]]; then