libinput 1.22.0
[platform/upstream/libinput.git] / .gitlab-ci / meson-prep.sh
1 #!/usr/bin/env bash
2
3 set -x
4 if [[ -f .meson_environment ]]; then
5         . .meson_environment
6 fi
7
8 if [[ -z "$MESON_BUILDDIR" ]]; then
9         echo "\$MESON_BUILDDIR undefined."
10         exit 1
11 fi
12
13 # emulate a few gitlab variables to make it easier to
14 # run and debug locally.
15 if [[ -z "$CI_JOB_ID" ]] || [[ -z "$CI_JOB_NAME" ]]; then
16         echo "Missing \$CI_JOB_ID or \$CI_JOB_NAME".
17         CI_JOB_ID=$(date +%s)
18         CI_JOB_NAME='libinput-job-local'
19         echo "Simulating gitlab environment: "
20         echo " CI_JOB_ID=$CI_JOB_ID"
21         echo " CI_JOB_NAME=$CI_JOB_NAME"
22 fi
23
24 if [[ -n "$FDO_CI_CONCURRENT" ]]; then
25         NINJA_ARGS="-j$FDO_CI_CONCURRENT $NINJA_ARGS"
26         MESON_TESTTHREADS="$FDO_CI_CONCURRENT"
27 fi
28
29 echo "*************************************************"
30 echo "builddir: $MESON_BUILDDIR"
31 echo "meson args: $MESON_ARGS"
32 echo "ninja args: $NINJA_ARGS"
33 echo "meson test args: $MESON_TEST_ARGS"
34 echo "*************************************************"
35
36 set -e