-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.gitlab-ci.yml
67 lines (61 loc) · 2.54 KB
/
.gitlab-ci.yml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
stages:
- build
variables:
MESON_ARGS: --werror --fatal-meson-warnings
.build windows:
image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v11-master'
stage: 'build'
tags:
- 'docker'
- 'windows'
- '1809'
- 'gstreamer-windows'
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 ninja
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 setup build $env:MESON_ARGS &&
meson compile --verbose -C build &&
meson test -C build &&
meson test -C build --benchmark"
vs2017 amd64:
extends: '.build windows'
variables:
ARCH: 'amd64'
msys2:
extends: '.build windows'
when: 'manual'
allow_failure: true
script:
# XXX: Copied from https://gitlab.freedesktop.org/gstreamer/gst-ci/blob/master/gitlab/ci_template.yml#L487
- $env:PATH += ";C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin"
- C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"
- C:\msys64\usr\bin\bash -c "sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf"
- echo "Updating MSYS2"
- C:\msys64\usr\bin\bash -c "pacman -Syuu --noconfirm || echo Update failed, ignoring"
- echo "Killing all MSYS2 processes"
- taskkill /F /FI "MODULES eq msys-2.0.dll"
- echo "Completing MSYS2 update"
- C:\msys64\usr\bin\bash -c "pacman -Suu --noconfirm"
- echo "Installing needed MSYS2 packages"
- C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"
- C:\msys64\usr\bin\bash -c "meson setup build $env:MESON_ARGS &&
meson compile --verbose -C build &&
meson test -C build &&
meson test -C build --benchmark"