CI: move logs/ to GITHUB_WORKSPACE
authorPaul Spooren <mail@aparcar.org>
Wed, 9 Mar 2022 12:30:21 +0000 (13:30 +0100)
committerPaul Spooren <mail@aparcar.org>
Wed, 9 Mar 2022 13:24:49 +0000 (14:24 +0100)
Artifacts can only be uploaded from inside the GITHUB_WORKSPACE. While
the Linux CI jobs run inside that per default, a special case-sensitive
mount outside the GITHUB_WORKSPACE is used for macOS builds.

To make log artifacts work for both macOS and Linux, move logs/ folder
to GITHUB_WORKSPACE on failures.

Signed-off-by: Paul Spooren <mail@aparcar.org>
.github/workflows/tools.yml

index 153db73625a403ba82553d5381de203d66564e37..76cbd30db7e75d9ad70d304a2ffedf5f84c35e89 100644 (file)
@@ -121,9 +121,14 @@ jobs:
           cd "$WORKPATH"
           make tools/install -j$(nproc) BUILD_LOG=1
 
+      - name: Move logs to GITHUB_WORKSPACE
+        if: failure()
+        run: |
+          cp -r "$WORKPATH/logs" "$GITHUB_WORKSPACE"
+
       - name: Upload logs
         if: failure()
         uses: actions/upload-artifact@v2
         with:
           name: ${{ matrix.os }}-logs
-          path: "$WORKPATH/logs"
+          path: "logs"