]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
scripts: Fix GHA matrix job detection in cijobs.pl
authorDan Fandrich <dan@coneharvesters.com>
Mon, 1 May 2023 18:57:54 +0000 (11:57 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Tue, 30 May 2023 23:54:13 +0000 (16:54 -0700)
The parsing is pretty brittle and it broke detecting some jobs at some
point. Also, detect if Windows is used in GHA.

scripts/cijobs.pl

index 21c750d6d4c0eb6b2ff612ede9684e5ce61097f3..a73b3f5bf5702db18914e9b29a2e7031ced8f890 100755 (executable)
@@ -71,13 +71,16 @@ sub githubactions {
                 elsif($r =~ /macos/) {
                     $os = "macos";
                 }
+                elsif($r =~ /windows/) {
+                    $os = "windows";
+                }
 
                 # commit previously counted jobs
                 $c += $j;
                 # non-matrix job
                 $j = 1;
             }
-            elsif($_ =~ /matrix:/) {
+            elsif($_ =~ /^\s*matrix:/) {
                 # switch to matrix mode
                 $m = 0;
                 $j = 0;
@@ -125,7 +128,7 @@ sub githubactions {
                     push @cc, $1;
                     $m++;
                 }
-                elsif($_ =~ /steps:/) {
+                elsif($_ =~ /^\s*steps:/) {
                     # disable matrix mode
                     $m = -1;
                 }