CI: use tools:latest container to speedup kernel workflow

Use tools:latest container with prebuilt host tools to speedup kernel
compilation in kernel workflow.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2022-09-05 23:18:00 +02:00
parent 5428bdc2df
commit 5d09118f8e
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
1 changed files with 12 additions and 3 deletions

View File

@ -53,7 +53,11 @@ jobs:
matrix: matrix:
target: ${{fromJson(needs.determine_targets.outputs.target)}} 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: steps:
- name: Checkout master directory - 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 \ wget -O - https://downloads.cdn.openwrt.org/snapshots/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/${TOOLCHAIN_FILE}.tar.xz \
| tar --xz -xf - | 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 - name: Configure external toolchain
shell: su buildbot -c "sh -e {0}" shell: su buildbot -c "sh -e {0}"
working-directory: openwrt working-directory: openwrt
run: | run: |
echo CONFIG_ALL_KMODS=y >> .config echo CONFIG_ALL_KMODS=y >> .config
echo CONFIG_DEVEL=y >> .config
echo CONFIG_AUTOREMOVE=y >> .config
./scripts/ext-toolchain.sh \ ./scripts/ext-toolchain.sh \
--toolchain ${{ env.TOOLCHAIN_FILE }}/toolchain-* \ --toolchain ${{ env.TOOLCHAIN_FILE }}/toolchain-* \
--overwrite-config \ --overwrite-config \
--config ${{ env.TARGET }}/${{ env.SUBTARGET }} --config ${{ env.TARGET }}/${{ env.SUBTARGET }}
make defconfig
- name: Show configuration - name: Show configuration
shell: su buildbot -c "sh -e {0}" shell: su buildbot -c "sh -e {0}"
working-directory: openwrt working-directory: openwrt