summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-08-06 06:53:05 +0100
committerSam James <sam@gentoo.org>2024-08-06 08:29:03 +0100
commita5211a15207a2e6e30e213c5530a5d1bf5c2531c (patch)
tree9b3ae6f590e30da86d30f1c664dd9d337e360d01 /ci
parent29176464defade51f18a316a5d0b0c9642e0931e (diff)
downloadmeson-a5211a15207a2e6e30e213c5530a5d1bf5c2531c.tar.gz
ci: fix dub tests on Windows
This fixes a pesky failure in vs2019 vc2019x64ninja for d/11 dub: ``` Searching in DUB cache for compatible urld.lib WARNING: No such cache folder: C:\Users\VssAdministrator\AppData\Local\dub\packages\urld-2.1.1\urld\.dub\build ERROR: urld@2.1.1 not found You may try the following command to install the necessary DUB libraries: dub run --yes dub-build-deep -- urld --arch=x86_64 --compiler=dmd --build=debug Run-time dependency urld found: NO test cases\d\11 dub\meson.build:13:11: ERROR: Dependency "urld" not found ``` Follow dub's advice by installing urld in ci/run.ps1 before the testsuite; we were already doing this for ubuntu, opensuse, and even recommending it in our docs before now: * ci/ciimage/ubuntu-rolling/install.sh * ci/ciimage/opensuse/install.sh * docs/markdown/Dependencies.md We also bump to 'ci4' which has newer D added (from the cidata repo).
Diffstat (limited to 'ci')
-rw-r--r--ci/run.ps140
1 files changed, 39 insertions, 1 deletions
diff --git a/ci/run.ps1 b/ci/run.ps1
index 596253fe2..3fc06fdaf 100644
--- a/ci/run.ps1
+++ b/ci/run.ps1
@@ -50,7 +50,7 @@ function DownloadFile([String] $Source, [String] $Destination) {
if (($env:backend -eq 'ninja') -and ($env:arch -ne 'arm64')) { $dmd = $true } else { $dmd = $false }
-DownloadFile -Source https://github.com/mesonbuild/cidata/releases/download/ci3/ci_data.zip -Destination $env:AGENT_WORKFOLDER\ci_data.zip
+DownloadFile -Source https://github.com/mesonbuild/cidata/releases/download/ci4/ci_data.zip -Destination $env:AGENT_WORKFOLDER\ci_data.zip
echo "Extracting ci_data.zip"
Expand-Archive $env:AGENT_WORKFOLDER\ci_data.zip -DestinationPath $env:AGENT_WORKFOLDER\ci_data
& "$env:AGENT_WORKFOLDER\ci_data\install.ps1" -Arch $env:arch -Compiler $env:compiler -Boost $true -DMD $dmd
@@ -87,6 +87,44 @@ if ($env:backend -eq 'ninja') {
MSBuild /version
}
+# This mirrors the D logic in cidata/build_win32.sh
+if ($dmd) {
+ if ($Arch -eq "x64") {
+ $dmdArch = "x86_64"
+ } else {
+ $dmdArch = "x86_mscoff"
+ }
+
+ $ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path
+ $env:Path = "$ScriptDir;$env:Path"
+ $dmd_bin = Join-Path $ScriptDir "dmd2\windows\bin"
+ $env:Path = $env:Path + ";" + $dmd_bin
+
+ $i = 1
+ while ($i -le 5) {
+ # Needed for d/11 dub to use the 'urld' library
+ dub run --yes dub-build-deep -- urld --arch=$dmdArch --compiler=dmd --build=debug
+ if ($LastExitCode -eq 0) {
+ break
+ }
+
+ $i = $i + 1
+ Start-Sleep -Seconds 2
+ }
+
+ $i = 1
+ while ($i -le 5) {
+ # XXX: Sometimes (?) we need this older version when the whole testsuite is run
+ dub run --yes dub-build-deep -- urld@2.1.1 --arch=$dmdArch --compiler=dmd --build=debug
+ if ($LastExitCode -eq 0) {
+ break
+ }
+
+ $i = $i + 1
+ Start-Sleep -Seconds 2
+ }
+}
+
echo ""
echo "Python version:"
python --version