aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2022-11-05 14:27:11 +0100
committerChristian Marangi <ansuelsmth@gmail.com>2022-12-04 17:37:00 +0100
commit31fb360f572904989171421a7603f14f6ba9e927 (patch)
treeea8f0ea6128239fc9fd149453409645dc172b275 /.github
parente74479d559aba1ee7bc39a742212aa9c63946d9c (diff)
downloadupstream-31fb360f572904989171421a7603f14f6ba9e927.tar.gz
upstream-31fb360f572904989171421a7603f14f6ba9e927.tar.bz2
upstream-31fb360f572904989171421a7603f14f6ba9e927.zip
CI: Allow building with internal toolchain
This adds an option to build with internal toolchain. This can be used to build targets which are currently not build by the OpenWrt build bots and which needs their own toolchain build for every build. Building the toolchain takes about 30 minutes compared to using the external toolchain which takes some seconds. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 08f5283392674fe874c7f441128319263ce0d171)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml21
1 files changed, 20 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4cc1116d58..b29698a774 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -6,6 +6,8 @@ on:
target:
required: true
type: string
+ build_toolchain:
+ type: boolean
include_feeds:
type: boolean
build_full:
@@ -109,6 +111,7 @@ jobs:
./scripts/feeds install -a
- name: Parse toolchain file
+ if: inputs.build_toolchain == false
working-directory: openwrt
run: |
TOOLCHAIN_STRING="$(curl "https://downloads.cdn.openwrt.org/snapshots/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/sha256sums" \
@@ -120,6 +123,7 @@ jobs:
echo "TOOLCHAIN_SHA256=$TOOLCHAIN_SHA256" >> "$GITHUB_ENV"
- name: Cache external toolchain
+ if: inputs.build_toolchain == false
id: cache-external-toolchain
uses: actions/cache@v3
with:
@@ -135,7 +139,7 @@ jobs:
ccache-kernel-${{ env.TARGET }}/${{ env.SUBTARGET }}-
- name: Download external toolchain
- if: steps.cache-external-toolchain.outputs.cache-hit != 'true'
+ if: inputs.build_toolchain == false && steps.cache-external-toolchain.outputs.cache-hit != 'true'
shell: su buildbot -c "sh -e {0}"
working-directory: openwrt
run: |
@@ -162,6 +166,7 @@ jobs:
echo CONFIG_ALL=y >> .config
- name: Configure external toolchain
+ if: inputs.build_toolchain == false
shell: su buildbot -c "sh -e {0}"
working-directory: openwrt
run: |
@@ -174,6 +179,20 @@ jobs:
--overwrite-config \
--config ${{ env.TARGET }}/${{ env.SUBTARGET }}
+ - name: Configure internal toolchain
+ if: inputs.build_toolchain == true
+ shell: su buildbot -c "sh -e {0}"
+ working-directory: openwrt
+ run: |
+ echo CONFIG_DEVEL=y >> .config
+ echo CONFIG_AUTOREMOVE=y >> .config
+ echo CONFIG_CCACHE=y >> .config
+
+ echo "CONFIG_TARGET_${{ env.TARGET }}=y" >> .config
+ echo "CONFIG_TARGET_${{ env.TARGET }}_${{ env.SUBTARGET }}=y" >> .config
+
+ make defconfig
+
- name: Show configuration
shell: su buildbot -c "sh -e {0}"
working-directory: openwrt