From a426d7c2643eaa472fc01b5cc5f0bc89e7ac917b Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 23 Jun 2021 06:40:21 +0200 Subject: [PATCH] ci/windows: enable msvc builds of zink This depends on both the Vulkan SDK and the Vulkan Runtime, so let's install those first. Reviewed-by: Jesse Natalie Reviewed-by: Daniel Stone Acked-by: Mike Blumenkrantz Part-of: --- .gitlab-ci.yml | 2 +- .gitlab-ci/test-source-dep.yml | 23 +++++++++++++---------- .gitlab-ci/windows/mesa_build.ps1 | 2 +- .gitlab-ci/windows/mesa_deps.ps1 | 13 ++++++++++++- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eaddba7..8745b58 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -545,7 +545,7 @@ arm_test: variables: MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}" MESA_IMAGE_PATH: "windows/x64_build" - MESA_IMAGE_TAG: "2021-04-14-radv" + MESA_IMAGE_TAG: "2021-06-24-zink-msvc" MESA_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MESA_IMAGE_PATH:${MESA_IMAGE_TAG}" windows_build_vs2019: diff --git a/.gitlab-ci/test-source-dep.yml b/.gitlab-ci/test-source-dep.yml index e665895..c739838 100644 --- a/.gitlab-ci/test-source-dep.yml +++ b/.gitlab-ci/test-source-dep.yml @@ -410,10 +410,11 @@ when: on_success - when: never -.windows-test-rules: +.zink-rules: + stage: layered-backends rules: - *ignore_scheduled_pipelines - - changes: + - changes: *mesa_core_file_list when: on_success - changes: @@ -422,15 +423,12 @@ - changes: *lavapipe_file_list when: on_success - - changes: - *vulkan_file_list - when: on_success - - changes: *d3d12_file_list + - changes: &zink_file_list + - src/gallium/drivers/zink/**/* when: on_success - when: never -.zink-rules: - stage: layered-backends +.windows-test-rules: rules: - *ignore_scheduled_pipelines - changes: @@ -442,8 +440,13 @@ - changes: *lavapipe_file_list when: on_success - - changes: &zink_file_list - - src/gallium/drivers/zink/**/* + - changes: + *vulkan_file_list + when: on_success + - changes: *d3d12_file_list + when: on_success + - changes: + *zink_file_list when: on_success - when: never diff --git a/.gitlab-ci/windows/mesa_build.ps1 b/.gitlab-ci/windows/mesa_build.ps1 index 40008c5..128e81a 100644 --- a/.gitlab-ci/windows/mesa_build.ps1 +++ b/.gitlab-ci/windows/mesa_build.ps1 @@ -9,7 +9,7 @@ Write-Host "Compiling Mesa" $builddir = New-Item -ItemType Directory -Name "_build" $installdir = New-Item -ItemType Directory -Name "_install" Push-Location $builddir.FullName -cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && meson --default-library=shared -Dzlib:default_library=static --buildtype=release -Db_ndebug=false -Dc_std=c17 -Dcpp_std=vc++latest -Db_vscrt=mt --cmake-prefix-path=`"C:\llvm-10`" --pkg-config-path=`"C:\llvm-10\lib\pkgconfig;C:\llvm-10\share\pkgconfig;C:\spirv-tools\lib\pkgconfig`" --prefix=`"$installdir`" -Dllvm=enabled -Dshared-llvm=disabled -Dvulkan-drivers=swrast,amd -Dgallium-drivers=swrast,d3d12 -Dmicrosoft-clc=enabled -Dstatic-libclc=all -Dbuild-tests=true -Dwerror=true -Dwarning_level=2 -Dzlib:warning_level=1 -Dlibelf:warning_level=1 && ninja -j32 install && meson test --num-processes 32" +cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && meson --default-library=shared -Dzlib:default_library=static --buildtype=release -Db_ndebug=false -Dc_std=c17 -Dcpp_std=vc++latest -Db_vscrt=mt --cmake-prefix-path=`"C:\llvm-10`" --pkg-config-path=`"C:\llvm-10\lib\pkgconfig;C:\llvm-10\share\pkgconfig;C:\spirv-tools\lib\pkgconfig`" --prefix=`"$installdir`" -Dllvm=enabled -Dshared-llvm=disabled -Dvulkan-drivers=swrast,amd -Dgallium-drivers=swrast,d3d12,zink -Dmicrosoft-clc=enabled -Dstatic-libclc=all -Dbuild-tests=true -Dwerror=true -Dwarning_level=2 -Dzlib:warning_level=1 -Dlibelf:warning_level=1 && ninja -j32 install && meson test --num-processes 32" $buildstatus = $? Pop-Location diff --git a/.gitlab-ci/windows/mesa_deps.ps1 b/.gitlab-ci/windows/mesa_deps.ps1 index 24317ed..1e5e78d 100644 --- a/.gitlab-ci/windows/mesa_deps.ps1 +++ b/.gitlab-ci/windows/mesa_deps.ps1 @@ -21,7 +21,7 @@ Write-Host "Installing Chocolatey packages" For ($i = 0; $i -lt 5; $i++) { choco install -y python3 --params="/InstallDir:C:\python3" $python_install = $? - choco install --allow-empty-checksums -y cmake git git-lfs ninja pkgconfiglite winflexbison --installargs "ADD_CMAKE_TO_PATH=System" + choco install --allow-empty-checksums -y cmake git git-lfs ninja pkgconfiglite winflexbison vulkan-sdk --installargs "ADD_CMAKE_TO_PATH=System" $other_install = $? $choco_installed = $other_install -and $python_install if ($choco_installed) { @@ -130,6 +130,17 @@ if (!$buildstatus) { } Get-Date +Write-Host "Downloading Vulkan-Runtime" +Invoke-WebRequest -Uri 'https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-runtime.exe' -OutFile 'C:\vulkan-runtime.exe' | Out-Null +Write-Host "Installing Vulkan-Runtime" +Start-Process -NoNewWindow -Wait C:\vulkan-runtime.exe -ArgumentList '/S' +if (!$?) { + Write-Host "Failed to install Vulkan-Runtime" + Exit 1 +} +Remove-Item C:\vulkan-runtime.exe -Force + +Get-Date Write-Host "Downloading Freeglut" $freeglut_zip = 'freeglut-MSVC.zip' -- 2.7.4