@@ -433,9 +433,6 @@ jobs:
433433 runs-on : windows-latest
434434 timeout-minutes : 120
435435 continue-on-error : true
436- env :
437- STRAWBERRY_URL : https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54051_64bit/strawberry-perl-5.40.5.1-64bit-portable.zip
438- STRAWBERRY_SHA256 : 6619fe7eeef921ccddb4aac3972fb602a0c690a3074205b863ade998d7bc79a6
439436 steps :
440437 # LF in the checkout: fixtures and shell scripts must not get CRLF.
441438 - run : git config --global core.autocrlf false
@@ -504,67 +501,74 @@ jobs:
504501 shell : msys2 {0}
505502 run : packaging/windows/bundle-shell.sh "$PWD/stage/ecce" "$(cygpath -m /)"
506503
507- - name : Strawberry Perl (portable)
508- id : perl
504+ # MinGW runtime DLLs and the broker, then Perl and Python, so the tree
505+ # runs with no MSYS2 on the machine.
506+ - name : Bundle the runtime
507+ shell : msys2 {0}
508+ run : |
509+ packaging/windows/bundle-runtime.sh "$PWD/stage/ecce"
510+ cp packaging/windows/ecce.cmd packaging/windows/make-shortcuts.ps1 stage/ecce/
511+
512+ - name : Download cache (Strawberry Perl, Python, wxPython)
509513 uses : actions/cache@v4
510514 with :
511- path : ${{ runner.temp }}/strawberry
512- key : strawberry-5.40.5.1-${{ env.STRAWBERRY_SHA256 }}
515+ path : ${{ runner.temp }}/ecce-dl
516+ key : windows-tools-${{ hashFiles('packaging/windows/bundle-tools.ps1') }}
517+
518+ - name : Bundle Perl and Python
519+ shell : pwsh
520+ run : packaging/windows/bundle-tools.ps1 -Install stage\ecce -Cache "$env:RUNNER_TEMP\ecce-dl"
513521
514- - name : Download Strawberry Perl
515- if : steps.perl.outputs.cache-hit != 'true'
522+ - name : Zip the install tree
516523 shell : pwsh
517524 run : |
518- $zip = "$env:RUNNER_TEMP\strawberry.zip"
519- Invoke-WebRequest $env:STRAWBERRY_URL -OutFile $zip
520- $h = (Get-FileHash $zip -Algorithm SHA256).Hash.ToLower()
521- if ($h -ne $env:STRAWBERRY_SHA256) { throw "sha256 $h" }
522- Expand-Archive $zip "$env:RUNNER_TEMP\strawberry"
523-
524- # Local job end to end with the bundled shell and a PATH that has no
525- # MSYS2 usr\bin (tests/windows/launch_local.py).
525+ $v = (Get-Content data/client/config/Version -TotalCount 1).Trim()
526+ New-Item -ItemType Directory -Force dist | Out-Null
527+ Compress-Archive -Path stage\ecce -DestinationPath "dist\ECCE-windows-$v.zip"
528+ Get-ChildItem dist | Format-Table Name, Length
529+ $d = "$env:RUNNER_TEMP\unpacked"
530+ Remove-Item -Recurse -Force $d -ErrorAction SilentlyContinue
531+ Expand-Archive "dist\ECCE-windows-$v.zip" $d
532+ "unpacked: $((Get-ChildItem $d -Recurse -File | Measure-Object Length -Sum).Sum / 1MB) MB" | Tee-Object -Append $env:GITHUB_STEP_SUMMARY
533+ Get-ChildItem "$d\ecce" | Format-Table Name
534+ # launchjob is a test driver, not part of the package.
535+ Copy-Item build\launchjob.exe "$d\ecce\bin\"
536+
537+ # Local job end to end from the unpacked zip, with System32 as the only
538+ # PATH outside it (tests/windows/launch_local.py): no MSYS2 involved.
526539 - name : Local jobs (complete, cancel)
527540 id : localjobs
528541 shell : pwsh
529542 continue-on-error : true
530543 run : |
531- $msys = (msys2 -c 'cygpath -m /' 2>$null)
532- if (-not $msys) { $msys = "$env:RUNNER_TEMP\msys64" }
533- $msys = $msys -replace '/', '\'
544+ $r = "$env:RUNNER_TEMP\unpacked\ecce"
534545 New-Item -ItemType Directory -Force localjobs | Out-Null
535- $sb = "$env:RUNNER_TEMP\strawberry"
536- $env:WINTEST_HOME = "$PWD\stage\ecce"
537- $env:WINTEST_BASE_PATH = "$msys\ucrt64\bin;$sb\perl\site\bin;$sb\perl\bin;$sb\c\bin;C:\Windows\System32;C:\Windows"
546+ $sys = "$env:SystemRoot\System32;$env:SystemRoot"
547+ $env:Path = $sys
548+ $env:WINTEST_HOME = $r
549+ $env:WINTEST_BASE_PATH = "$r\bin;$r\usr\bin;$r\python;$r\strawberry\perl\site\bin;$r\strawberry\perl\bin;$r\strawberry\c\bin;$sys"
538550 $rc = 0
539551 foreach ($c in "complete", "cancel") {
540- & "$msys\ucrt64\bin\ python3.exe" tests/windows/launch_local.py $c --build "$PWD\build " --state "$PWD\localjobs\state-$c" 2>&1 | Tee-Object "localjobs\$c.log"
552+ & "$r\python\ python3.exe" tests/windows/launch_local.py $c --build "$r\bin " --state "$PWD\localjobs\state-$c" 2>&1 | Tee-Object "localjobs\$c.log"
541553 "$c rc=$LASTEXITCODE" | Tee-Object -Append localjobs\summary.txt
542554 if ($LASTEXITCODE -ne 0) { $rc = 1 }
543555 }
544556 Get-Content localjobs\summary.txt >> $env:GITHUB_STEP_SUMMARY
545557 exit $rc
546558
547- # Does it run? (#133) Starts the installed apps on the runner's desktop
548- # and screenshots them. Allowed to fail; see summary.txt.
559+ # Does it run? (#133) Starts the unpacked apps on the runner's desktop
560+ # (PATH: the package and System32 only) and screenshots them. Allowed
561+ # to fail; see summary.txt.
549562 - name : Start the apps
550563 id : apps
551564 shell : pwsh
552565 continue-on-error : true
553566 timeout-minutes : 20
554567 run : |
555- $msys = (msys2 -c 'cygpath -m /' 2>$null) -replace '/', '\'
556- tests\windows\ci-run.ps1 -Stage stage -Out windows-run -Msys $msys -Strawberry "$env:RUNNER_TEMP\strawberry"
568+ $env:Path = "$env:SystemRoot\System32;$env:SystemRoot"
569+ tests\windows\ci-run.ps1 -Stage "$env:RUNNER_TEMP\unpacked" -Out windows-run
557570 Get-Content windows-run\summary.txt >> $env:GITHUB_STEP_SUMMARY
558571
559- - name : Zip the install tree
560- if : always()
561- shell : pwsh
562- run : |
563- $v = (Get-Content data/client/config/Version -TotalCount 1).Trim()
564- New-Item -ItemType Directory -Force dist | Out-Null
565- Compress-Archive -Path stage\ecce -DestinationPath "dist\ECCE-windows-$v.zip"
566- Get-ChildItem dist | Format-Table Name, Length
567-
568572 - uses : actions/upload-artifact@v4
569573 if : always()
570574 with :
0 commit comments