diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2022-09-09 21:09:30 +0200 |
---|---|---|
committer | Josef Schlehofer <pepe.schlehofer@gmail.com> | 2022-12-04 16:26:59 +0100 |
commit | 8dc0a963a80b94bc53251202f5deafdbfcab575a (patch) | |
tree | 0c9166cbe169a3c355e0b1a231ea5b3f612ae01c /.github | |
parent | 5978ab409c6be3190f4d1c053dfe31cdea387754 (diff) | |
download | upstream-8dc0a963a80b94bc53251202f5deafdbfcab575a.tar.gz upstream-8dc0a963a80b94bc53251202f5deafdbfcab575a.tar.bz2 upstream-8dc0a963a80b94bc53251202f5deafdbfcab575a.zip |
CI: kernel: Cache external toolchain
Cache external toolchain for each target to remove load from openwrt cdn
server and make the external toolchain setup quicker.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit f522c27385d6f94e5dbcc3e84968f0e38609ff1c)
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/kernel.yml | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml index 05bc6ed8ee..43f843b256 100644 --- a/.github/workflows/kernel.yml +++ b/.github/workflows/kernel.yml @@ -102,12 +102,23 @@ jobs: - name: Parse toolchain file working-directory: openwrt run: | - TOOLCHAIN_FILE=$(curl "https://downloads.cdn.openwrt.org/snapshots/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/sha256sums" \ - | sed -n -e 's/.*\(openwrt-toolchain.*\).tar.xz/\1/p') + TOOLCHAIN_STRING="$(curl "https://downloads.cdn.openwrt.org/snapshots/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/sha256sums" \ + | grep ".*openwrt-toolchain.*tar.xz")" + TOOLCHAIN_FILE=$(echo "$TOOLCHAIN_STRING" | sed -n -e 's/.*\(openwrt-toolchain.*\).tar.xz/\1/p') + TOOLCHAIN_SHA256=$(echo "$TOOLCHAIN_STRING" | cut -d ' ' -f 1) echo "TOOLCHAIN_FILE=$TOOLCHAIN_FILE" >> "$GITHUB_ENV" + echo "TOOLCHAIN_SHA256=$TOOLCHAIN_SHA256" >> "$GITHUB_ENV" + + - name: Cache external toolchain + id: cache-external-toolchain + uses: actions/cache@v3 + with: + path: openwrt/${{ env.TOOLCHAIN_FILE }} + key: ${{ env.TOOLCHAIN_FILE }}-${{ env.TOOLCHAIN_SHA256 }} - name: Download external toolchain + if: ${{ steps.cache-external-toolchain.outputs.cache-hit != 'true' }} shell: su buildbot -c "sh -e {0}" working-directory: openwrt run: | |