CI: use tools:latest container to speedup kernel workflow
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 5 Sep 2022 21:18:00 +0000 (23:18 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Sat, 1 Oct 2022 00:13:49 +0000 (02:13 +0200)
Use tools:latest container with prebuilt host tools to speedup kernel
compilation in kernel workflow.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
.github/workflows/kernel.yml

index 5afd546394dce2cbde24b78f0c581a43471c3074..5589610d08e1b0975f8a31a1c274c19eb43d7b3d 100644 (file)
@@ -53,7 +53,11 @@ jobs:
        matrix:
          target: ${{fromJson(needs.determine_targets.outputs.target)}}
 
-    container: registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1
+    container: ghcr.io/${{ github.repository_owner }}/tools:latest
+
+    permissions:
+      contents: read
+      packages: read
 
     steps:
       - name: Checkout master directory
@@ -129,19 +133,24 @@ jobs:
           wget -O - https://downloads.cdn.openwrt.org/snapshots/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/${TOOLCHAIN_FILE}.tar.xz \
             | tar --xz -xf -
 
+      - name: Extract prebuilt tools
+        shell: su buildbot -c "sh -e {0}"
+        working-directory: openwrt
+        run: ./scripts/ext-tools.sh --tools /tools.tar
+
       - name: Configure external toolchain
         shell: su buildbot -c "sh -e {0}"
         working-directory: openwrt
         run: |
           echo CONFIG_ALL_KMODS=y >> .config
+          echo CONFIG_DEVEL=y >> .config
+          echo CONFIG_AUTOREMOVE=y >> .config
 
           ./scripts/ext-toolchain.sh \
             --toolchain ${{ env.TOOLCHAIN_FILE }}/toolchain-* \
             --overwrite-config \
             --config ${{ env.TARGET }}/${{ env.SUBTARGET }}
 
-          make defconfig
-
       - name: Show configuration
         shell: su buildbot -c "sh -e {0}"
         working-directory: openwrt