windows: Migrate to windows 1809 base
authorJordan Petridis <jordan@centricular.com>
Mon, 2 Dec 2019 16:23:27 +0000 (18:23 +0200)
committerJordan Petridis <jordan@centricular.com>
Wed, 4 Dec 2019 16:45:22 +0000 (18:45 +0200)
Rebuild the windows docker image against the current ltsc [1]
of server 2019. This requires moving some of the msys setup
to the runner job cause it causes docker build to hang

Switch the job tags so they now use the 1809 runner, instead
of 1607.

Tweak the PATHs in the msys job so bash doesn't complain about
slashes..

Lastly, increase the timeout of the windows jobs, as msys2
installs its deps at runtime

[1] https://docs.microsoft.com/en-us/windows-server/get-started-19/servicing-channels-19

docker/windows/Dockerfile
docker/windows/install_toolchain.ps1
gitlab/ci_template.yml

index e0b8244..e843060 100644 (file)
@@ -1,6 +1,6 @@
 # escape=`
 
-FROM 'mcr.microsoft.com/windows/servercore:1607'
+FROM 'mcr.microsoft.com/windows/servercore:1809'
 
 # Make sure any failure in PowerShell scripts is fatal
 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
@@ -9,4 +9,4 @@ COPY install_toolchain.ps1 prepare_gst_env.ps1 C:\
 
 RUN C:\install_toolchain.ps1
 
-RUN C:\prepare_gst_env.ps1
\ No newline at end of file
+RUN C:\prepare_gst_env.ps1
index 6c224e0..2d4260e 100644 (file)
@@ -44,9 +44,7 @@ Write-Host "Installing git-lfs"
 choco install -y git-lfs
 refreshenv
 
-$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"
-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"
-
+Write-Host "Installing Meson"
 pip install meson
+
+Write-Host "Complete"
index e516024..7466700 100644 (file)
@@ -12,7 +12,7 @@ variables:
   FEDORA_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2019-10-23-793478'
   INDENT_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/gst-indent:6f7e01e1e30a73efa880acdc8e911f1f20c58dbb'
   MANIFEST_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/build-manifest:2019-10-23-793475'
-  WINDOWS_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v7'
+  WINDOWS_IMAGE: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v8'
 
   # Branch to track for modules that have no ref specified in the manifest
   GST_UPSTREAM_BRANCH: 'master'
@@ -411,8 +411,8 @@ valgrind ges:
   tags:
     - 'docker'
     - 'windows'
-    - '1607'
-  timeout: '15min'
+    - '1809'
+  timeout: '45min'
   variables:
     MESON_ARGS: >
       ${DEFAULT_MESON_ARGS}
@@ -424,6 +424,8 @@ valgrind ges:
     - git clone https://gitlab.freedesktop.org/gstreamer/gst-build.git $env:CI_PROJECT_DIR/gst-build
     - cd $env:CI_PROJECT_DIR/gst-build
     - cp -r C:/subprojects/* subprojects/
+    # Run the git-update script and feed it the manifest to setup the environment
+    - cd $env:CI_PROJECT_DIR/gst-build && python git-update --no-interaction --manifest=$env:CI_PROJECT_DIR/manifest.xml
     # 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"," ")
@@ -431,7 +433,6 @@ valgrind ges:
     # 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 &&
-        python git-update --no-interaction --manifest=$env:CI_PROJECT_DIR/manifest.xml &&
         meson build $env:MESON_ARGS &&
         ninja -C build"
   # FIXME: extract builddir for tests
@@ -463,16 +464,24 @@ build vs2017 x86:
 build msys2 :
   extends: '.build windows'
   script:
-    - git clone https://gitlab.freedesktop.org/gstreamer/gst-build.git $env:CI_PROJECT_DIR/gst-build
-    - cd $env:CI_PROJECT_DIR/gst-build
-    - cp -r C:/subprojects/* subprojects/
-
-    - $env:PATH += ";C:\msys64\usr\bin;C:\msys64\mingw64/bin;C:\msys64\mingw32/bin"
+    # For some reason docker build hangs if this is included in the image, needs more troubleshooting
+    - $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 "pacman -Syuu --noconfirm"
+    - C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"
+
+    - git clone https://gitlab.freedesktop.org/gstreamer/gst-build.git $env:CI_PROJECT_DIR\gst-build
+    - cd $env:CI_PROJECT_DIR\gst-build
+    - cp -r C:\subprojects\* subprojects\
+
+    # Run the git-update script and feed it the manifest to setup the environment
+    - cd $env:CI_PROJECT_DIR/gst-build && python git-update --no-interaction --manifest=$env:CI_PROJECT_DIR/manifest.xml
     # 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"," ")
-    - C:\msys64\usr\bin\bash -c "cd $env:CI_PROJECT_DIR/gst-build &&
-        python git-update --no-interaction --manifest=$env:CI_PROJECT_DIR/manifest.xml &&
+    # Replace forward slashes with backwards so bash doesn't complain
+    - $env:_PROJECT_DIR = $env:CI_PROJECT_DIR.replace('\','/')
+    - C:\msys64\usr\bin\bash -c "cd $env:_PROJECT_DIR/gst-build &&
         meson build $env:MESON_ARGS &&
         ninja -C build"