From: Jordan Petridis Date: Thu, 11 Jul 2019 04:48:08 +0000 (+0300) Subject: Add Windows CI for msvc 2017 and msys2 X-Git-Tag: orc-0.4.33~140 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e5daea518a5d34e4c2477aa33fc7f7e1298e69c;p=platform%2Fupstream%2Forc.git Add Windows CI for msvc 2017 and msys2 Currently the container is based upon a windows 1607 image and requires a runner with a server/hyper-v 1607 host to be able to execute. There are plan on moving the runner to a 1807 later. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ddfe46..693f110 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,3 +20,54 @@ debian sid: artifacts: paths: - build/meson-logs/ + +.build windows: + image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v6' + stage: 'build' + tags: + - 'docker' + - 'windows' + - '1607' + 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" + +vs2017 amd64: + extends: '.build windows' + variables: + ARCH: 'amd64' + +vs2017 x86: + extends: '.build windows' + variables: + ARCH: 'x86' + +msys2: + extends: '.build windows' + 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" + - C:\msys64\usr\bin\bash -c "meson build $env:MESON_ARGS && + ninja -C build" \ No newline at end of file