CI: usability improvements for tools
authorPaul Spooren <mail@aparcar.org>
Wed, 30 Mar 2022 00:43:17 +0000 (01:43 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Sun, 4 Dec 2022 16:36:52 +0000 (17:36 +0100)
* Always store build logs
* Store .config as an artifact
* Rename job to `tools-{ os }` for log archive without spaces
* Run CI job on changes to the CI file itself

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 80f79beb952dcb87d967a130d326cb1dd5a077ed)

.github/workflows/tools.yml

index e089e26193d4fe14de9a44ed76b3f8cbb5447c0f..4e423fdd6292c3346cca44804040f65699224d44 100644 (file)
@@ -4,13 +4,14 @@ on:
   pull_request:
     paths:
       - 'tools/**'
+      - '.github/workflows/tools.yml'
 
 permissions:
   contents: read
 
 jobs:
   build:
-    name: Build tools on ${{ matrix.os }}
+    name: tools-${{ matrix.os }}
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: False
@@ -125,13 +126,22 @@ jobs:
           make tools/install -j$(nproc) BUILD_LOG=1
 
       - name: Move logs to GITHUB_WORKSPACE
-        if: failure()
+        if: always()
         run: |
           cp -r "$WORKPATH/logs" "$GITHUB_WORKSPACE"
+          cp -r "$WORKPATH/.config" "$GITHUB_WORKSPACE/config"
+
 
       - name: Upload logs
-        if: failure()
+        if: always()
         uses: actions/upload-artifact@v2
         with:
           name: ${{ matrix.os }}-logs
           path: "logs"
+
+      - name: Upload config
+        if: always()
+        uses: actions/upload-artifact@v2
+        with:
+          name: ${{ matrix.os }}-config
+          path: "config"