summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2020-07-31 07:26:11 +0000
committerAkira TAGOH <akira@tagoh.org>2020-07-31 07:26:11 +0000
commit57a224f51d6c019e4ce5d75efb22f34a8330423e (patch)
treee3d7acfe511c07650db57c485c6dcf134e2c78a5 /.gitlab-ci.yml
parent03aa12c75e117acb0d160212536f6f832e0dc8d9 (diff)
Add Meson build system
See https://mesonbuild.com
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml144
1 files changed, 144 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a8e7dcf..f8e2c03 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,6 +8,7 @@ before_script:
- dnf -y upgrade --disablerepo=rawhide-modular
- dnf -y install --disablerepo=rawhide-modular --allowerasing --skip-broken @buildsys-build autoconf automake libtool gettext gettext-devel gperf expat-devel freetype-devel json-c-devel git docbook-utils docbook-utils-pdf bubblewrap
- dnf -y install --disablerepo=rawhide-modular --allowerasing --skip-broken mingw64-gettext mingw64-freetype mingw64-expat wine
+ - dnf -y install --disablerepo=rawhide-modular --allowerasing --skip-broken meson ninja-build wget
shared-build:
stage: build
@@ -78,3 +79,146 @@ mingw-build:
- build-*/test/*.log
- build-*/test/*.trs
- build-*/test/out*
+meson-shared-build:
+ image: fedora:latest
+ stage: build
+ script:
+ - export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
+ - export PREFIX="$(pwd)/prefix-$BUILD_ID"
+ - export BUILDDIR="$(pwd)/build-$BUILD_ID"
+ - export MAKEFLAGS="-j4"
+ - meson --prefix="$PREFIX" --default-library=shared "$BUILDDIR"
+ - ninja -C "$BUILDDIR"
+ - ninja -C "$BUILDDIR" test
+ - ninja -C "$BUILDDIR" install
+ artifacts:
+ name: fontconfig-$CI_COMMIT_SHA-$CI_JOB_ID
+ when: always
+ paths:
+ - build-*/meson-logs/*txt
+ - prefix-*
+meson-static-build:
+ image: fedora:latest
+ stage: build
+ script:
+ - export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
+ - export PREFIX="$(pwd)/prefix-$BUILD_ID"
+ - export BUILDDIR="$(pwd)/build-$BUILD_ID"
+ - export MAKEFLAGS="-j4"
+ - meson --prefix="$PREFIX" --default-library=static "$BUILDDIR"
+ - ninja -C "$BUILDDIR"
+ - ninja -C "$BUILDDIR" test
+ - ninja -C "$BUILDDIR" install
+ artifacts:
+ name: fontconfig-$CI_COMMIT_SHA-$CI_JOB_ID
+ when: always
+ paths:
+ - build-*/meson-logs/*txt
+ - prefix-*
+meson-mingw-w64-build:
+ image: fedora:latest
+ stage: build
+ script:
+ - export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
+ - export PREFIX="$(pwd)/prefix-$BUILD_ID"
+ - export BUILDDIR="$(pwd)/build-$BUILD_ID"
+ - meson --prefix="$PREFIX" "$BUILDDIR" --cross-file .gitlab-ci/linux-mingw-w64-64bit.txt
+ - ninja -C "$BUILDDIR"
+ - ninja -C "$BUILDDIR" test
+ # install doesn't work, fccache problems, but autotools ci doesn't do that either
+ # - ninja -C "$BUILDDIR" install
+ artifacts:
+ name: fontconfig-$CI_COMMIT_SHA-$CI_JOB_ID
+ when: always
+ paths:
+ - build-*/meson-logs/*txt
+ - prefix-*
+
+# FIXME: fontconfig should probably get its own image
+.build meson windows:
+ image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v10'
+ stage: 'build'
+ tags:
+ - 'docker'
+ - 'windows'
+ - '1809'
+ variables:
+ # Make sure any failure in PowerShell scripts is fatal
+ ErrorActionPreference: 'Stop'
+ WarningPreference: 'Stop'
+ # Uncomment the following key if need to pass custom args, as well with the
+ # $env:MESON_ARGS line in the `script:` blocks
+ # MESON_ARGS: >-
+ # -Dfoo=enabled
+ # -Dbar=disabled
+ before_script:
+ # Make sure meson is up to date, so we don't need to rebuild the image with each release
+ - pip3 install -U meson
+ script:
+ # For some reason, options are separated by newline instead of space, so we
+ # have to replace them first.
+ # - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
+ # Gitlab executes PowerShell in docker, but VsDevCmd.bat is a batch script.
+ # Environment variables substitutions is done by PowerShell before calling
+ # cmd.exe, that's why we use $env:FOO instead of %FOO%
+ - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
+ meson build $env:MESON_ARGS &&
+ ninja -C build &&
+ ninja -C build test"
+
+meson vs2017 amd64:
+ extends: '.build meson windows'
+ variables:
+ ARCH: 'amd64'
+
+meson vs2017 x86:
+ extends: '.build meson windows'
+ variables:
+ ARCH: 'x86'
+
+meson macos:
+ stage: 'build'
+ tags:
+ - gst-macos-10.15
+ artifacts:
+ name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
+ expire_in: '5 days'
+ when: 'always'
+ paths:
+ - "build/meson-logs/*txt"
+ before_script:
+ - pip3 install --upgrade pip
+ # Make sure meson is up to date
+ - pip3 install -U meson
+ # Need to install certificates for python
+ - pip3 install --upgrade certifi
+ # Anther way t install certificates
+ - open /Applications/Python\ 3.8/Install\ Certificates.command
+ # Get ninja
+ - curl -L -o ninja-mac.zip https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-mac.zip
+ - unzip ninja-mac.zip
+ - sudo cp ninja /usr/local/bin
+ script:
+ - CERT_PATH=$(python3 -m certifi) && export SSL_CERT_FILE=${CERT_PATH} && export REQUESTS_CA_BUNDLE=${CERT_PATH} && meson build
+ - ninja -C build
+ - ninja -C build test
+
+# msys infrastructure is a bit broken, disable for now
+meson msys2:
+ extends: '.build meson windows'
+ when: 'manual'
+ allow_failure: true
+ script:
+ # For some reason, options are separated by newline instead of space, so we
+ # have to replace them first.
+ # - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
+
+ - $env:PATH += ";C:\msys64\usr\bin;C:\msys64\mingw64/bin;C:\msys64\mingw32/bin"
+ # XXX: Copied from https://gitlab.freedesktop.org/gstreamer/gst-ci/blob/master/gitlab/ci_template.yml#L487
+ # For some reason docker build hangs if this is included in the image, needs more troubleshooting
+ - C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"
+ - C:\msys64\usr\bin\bash -c "pacman -Syuu --noconfirm"
+ - C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"
+ - C:\msys64\usr\bin\bash -c "meson build $env:MESON_ARGS &&
+ ninja -C build &&
+ ninja -C build test"