This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mingw64 ci: install a fresh mingw64 and use it
authorTony Cook <tony@develop-help.com>
Wed, 5 Jul 2023 04:31:42 +0000 (14:31 +1000)
committerYves Orton <demerphq@gmail.com>
Sun, 16 Jul 2023 12:45:38 +0000 (14:45 +0200)
This is far from perfect but should let us become less accustomed to
red crosses due to mingw64.

The installation of mingw64 is slow, hopefully a future change will
let us use the github workflow caching mechanism.

.github/workflows/testsuite.yml

index 7d24761..d1bb4cc 100644 (file)
@@ -521,27 +521,18 @@ jobs:
     steps:
       - run: git config --global core.autocrlf false
       - uses: actions/checkout@v3
-      - name: Set up Perl build environment
-        run: |
-          # skip installing perl if it is already installed.
-          if (!(Test-Path "C:\strawberry\perl\bin")) {
-            choco install strawberryperl
-          }
-          echo @"
-          C:\strawberry\c\bin
-          C:\strawberry\perl\site\bin
-          C:\strawberry\perl\bin
-          "@ |
-            Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
+      - name: Install mingw-64
+        uses: egor-tensin/setup-mingw@v2
       - name: Host perl -V
-        run: perl -V
+        run: |
+          perl -V
       - name: gcc --version
         run: gcc --version
       - name: Build
         shell: cmd
         run: |
           cd win32
-          gmake CCHOME=C:\strawberry\c CFG=Debug -f GNUMakefile -j2
+          gmake CCHOME=C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64 CFG=Debug -f GNUMakefile -j2
       - name: Show Config
         shell: cmd
         run: |
@@ -552,7 +543,7 @@ jobs:
         run: |
           cd win32
           set HARNESS_OPTIONS=j2
-          gmake CCHOME=C:\strawberry\c CFG=Debug -f GNUMakefile test
+          gmake CCHOME=C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64 CFG=Debug -f GNUMakefile test
 
   #                            _
   #   ___ _   _  __ ___      _(_)_ __