]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
CI: Upgrade GitHub upload-artifact action to v4 (#1852)
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 27 Jun 2024 22:12:40 +0000 (22:12 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 29 Jun 2024 08:43:06 +0000 (08:43 +0000)
    The following artifacts were uploaded using a version of
    actions/upload-artifact that is scheduled for deprecation:
    "build-logs-macos-14-Object", "build-logs-ubuntu-22.04-Object",
    "test-logs".

This change finishes GitHub actions upgrade started in recent commit
8805c474 and removes all remaining GitHub Actions upgrade warnings.

Upgrading to actions/upload-artifact@v4 is not trivial because the new
action version uses "immutable (unless deleted)" artifacts: One GitHub
Actions job cannot add artifacts to a container created by another job.
We now add build layer dimension to the container name created inside
"build-tests" matrix, so that all layer logs are uploaded, with one
artifact container per matrix job.

Also fixed the compiler component in build-tests artifact names: Recent
commit 5a7811af intended to add "compiler dimension to avoid name
clashes" but only added a constant "-Object" suffix, resulting in log
name clashes on Ubuntu runners that test using two compilers.

.github/workflows/default.yaml

index d9db83abb29d77f69f336971812e5c851fdf3386..f3da5e41e72ab6d0f7bc284156046df53044dc57 100644 (file)
@@ -58,7 +58,7 @@ jobs:
 
       - name: Publish test logs
         if: success() || failure()
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: test-logs
           path: |
@@ -163,9 +163,9 @@ jobs:
 
       - name: Publish build logs
         if: success() || failure()
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
-          name: build-logs-${{ matrix.os }}-${{ matrix.compiler }}
+          name: build-logs-${{ matrix.os }}-${{ matrix.compiler.CC }}-${{ matrix.layer.nick }}
           path: btlayer-*.log
 
   CodeQL-tests: