diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-01-27 11:25:53 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-01-28 02:01:39 +0530 |
commit | 673b7427512d3af498d49ed4792174c74e00f0ab (patch) | |
tree | 8c896b76ba13401653137ddff656a9dffb50fa96 /ci | |
parent | 72bd408c392afe143b8d1fb69428eff060d295fb (diff) | |
download | gstreamer-673b7427512d3af498d49ed4792174c74e00f0ab.tar.gz |
ci: Add a Windows native cross-arm64 job with a new image
Needed an update to the windows Dockerfile to:
1. Install the 'UniversalBuildTools' workload for Cerbero
2. Install ARM and ARM64 workloads for cross-uwp-universal in Cerbero
3. Install VS 2019 since we need that for ARM64 NEON support in Opus
We can't test UWP in gstreamer.git because glib needs custom patches
for that. It will be tested in Cerbero.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1570>
Diffstat (limited to 'ci')
-rw-r--r-- | ci/docker/windows/Dockerfile | 15 | ||||
-rw-r--r-- | ci/docker/windows/Install.cmd | 7 | ||||
-rw-r--r-- | ci/meson/vs2019-arm64-cross-file.txt | 23 | ||||
-rw-r--r-- | ci/meson/vs2019-x64-native-file.txt | 38 |
4 files changed, 77 insertions, 6 deletions
diff --git a/ci/docker/windows/Dockerfile b/ci/docker/windows/Dockerfile index fbaa6e0f00..59ebf79984 100644 --- a/ci/docker/windows/Dockerfile +++ b/ci/docker/windows/Dockerfile @@ -25,17 +25,24 @@ RUN c:\msys64\usr\bin\bash -lc 'pacman -S --noconfirm mingw-w64-ucrt-x86_64-tool COPY Install.cmd C:\TEMP\ ADD https://aka.ms/vscollect.exe C:\TEMP\collect.exe # Download channel for fixed install. -ARG CHANNEL_URL=https://aka.ms/vs/15/release/channel +ARG CHANNEL_URL=https://aka.ms/vs/16/release/channel ADD ${CHANNEL_URL} C:\TEMP\VisualStudio.chman # Download and install Build Tools for Visual Studio 2017 for native desktop workload. -ADD https://aka.ms/vs/15/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe +ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache ` --channelUri C:\TEMP\VisualStudio.chman ` --installChannelUri C:\TEMP\VisualStudio.chman ` - --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended` + --add Microsoft.VisualStudio.Workload.VCTools ` + --add Microsoft.VisualStudio.Workload.UniversalBuildTools ` + --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ` + --add Microsoft.VisualStudio.Component.VC.Tools.ARM ` + --add Microsoft.VisualStudio.Component.UWP.VC.ARM64 ` + --includeRecommended ` --installPath C:\BuildTools RUN Get-ChildItem C:\BuildTools +RUN Get-ChildItem C:\BuildTools\VC\Tools\MSVC +RUN Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\lib' RUN pip3 install meson @@ -50,4 +57,4 @@ COPY prepare_gst_env.ps1 C:\ RUN C:\prepare_gst_env.ps1 COPY prepare_cerbero_env.sh C:\ -RUN C:\MinGW\msys\1.0\bin\bash.exe --login -c "C:/prepare_cerbero_env.sh"
\ No newline at end of file +RUN C:\MinGW\msys\1.0\bin\bash.exe --login -c "C:/prepare_cerbero_env.sh" diff --git a/ci/docker/windows/Install.cmd b/ci/docker/windows/Install.cmd index f3b73d0df7..8b5af12a50 100644 --- a/ci/docker/windows/Install.cmd +++ b/ci/docker/windows/Install.cmd @@ -25,8 +25,11 @@ if "%ERRORLEVEL%"=="3010" ( ) else ( if not "%ERRORLEVEL%"=="0" ( set ERR=%ERRORLEVEL% - call C:\TEMP\collect.exe -zip:C:\vslogs.zip - + if "%CI_PROJECT_PATH%"=="" ( + call C:\TEMP\collect.exe -zip:C:\vslogs.zip + ) else ( + call C:\TEMP\collect.exe -zip:%CI_PROJECT_PATH%\vslogs.zip + ) exit /b !ERR! ) ) diff --git a/ci/meson/vs2019-arm64-cross-file.txt b/ci/meson/vs2019-arm64-cross-file.txt new file mode 100644 index 0000000000..21b05dbb4d --- /dev/null +++ b/ci/meson/vs2019-arm64-cross-file.txt @@ -0,0 +1,23 @@ +[constants] +vs_path = 'C:\BuildTools' +msvc_version = '14.29.30133' +msvc_version_dir = vs_path / 'VC\Tools\MSVC' / msvc_version +msvc_arm64_bindir = msvc_version_dir / 'bin\Hostx64\arm64' +msvc_arm64_libdir = msvc_version_dir / 'lib\arm64' + +[host_machine] +system = 'windows' +cpu_family = 'aarch64' +cpu = 'aarch64' +endian = 'little' + +[properties] +needs_exe_wrapper = true + +[binaries] +lib = msvc_arm64_bindir / 'lib.exe' +c = msvc_arm64_bindir / 'cl.exe' +c_ld = msvc_arm64_bindir / 'link.exe' +cpp = msvc_arm64_bindir / 'cl.exe' +cpp_ld = msvc_arm64_bindir / 'link.exe' +pkgconfig = 'false' diff --git a/ci/meson/vs2019-x64-native-file.txt b/ci/meson/vs2019-x64-native-file.txt new file mode 100644 index 0000000000..f4568d75a6 --- /dev/null +++ b/ci/meson/vs2019-x64-native-file.txt @@ -0,0 +1,38 @@ +[constants] +vs_path = 'C:\BuildTools' +msvc_version = '14.29.30133' +msvc_version_dir = vs_path / 'VC\Tools\MSVC' / msvc_version +msvc_x64_bindir = msvc_version_dir / 'bin\Hostx64\x64' +msvc_x64_libdir = msvc_version_dir / 'lib\x64' +wk_path = 'C:\Program Files (x86)\Windows Kits' +wk_version = '10.0.19041.0' +wk_x64_libdir = wk_path / '10\lib' / wk_version / 'um\x64' +wk_x64_crt_libdir = wk_path / '10\lib' / wk_version / 'ucrt\x64' +# Forcibly link to x64 libs when using native linker, otherwise the LIB +# variable in the env will cause link.exe to pick up libs from the cross +# msvc libdir. A better fix might be to use a wrapper script that calls +# link.exe inside the correct VS environment for x64. +msvc_x64_libs = [msvc_x64_libdir / 'msvcrt.lib', msvc_x64_libdir / 'msvcrtd.lib', msvc_x64_libdir / 'vcruntime.lib', msvc_x64_libdir / 'oldnames.lib', wk_x64_crt_libdir / 'ucrt.lib'] + +[host_machine] +system = 'windows' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' + +[properties] +needs_exe_wrapper = true + +[built-in options] +# Ensure that x64 libs are used for linking even when we're inside, say, an +# arm64 VS environment +c_link_args = ['/LIBPATH:' + wk_x64_libdir] + msvc_x64_libs +cpp_link_args = ['/LIBPATH:' + wk_x64_libdir] + msvc_x64_libs + +[binaries] +lib = msvc_x64_bindir / 'lib.exe' +c = msvc_x64_bindir / 'cl.exe' +c_ld = msvc_x64_bindir / 'link.exe' +cpp = msvc_x64_bindir / 'cl.exe' +cpp_ld = msvc_x64_bindir / 'link.exe' +pkgconfig = 'false' |