id: parse-toolchain
working-directory: openwrt
run: |
+ if [ -d /external-toolchain/ ]; then
+ echo "toolchain-type=external_container" >> $GITHUB_OUTPUT
+ exit 0
+ fi
+
TOOLCHAIN_PATH=snapshots
if [ -n "${{ github.base_ref }}" ]; then
ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-
- name: Download external toolchain/sdk
- if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type != 'internal'
+ if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type != 'internal' && steps.parse-toolchain.outputs.toolchain-type != 'external_container'
shell: su buildbot -c "sh -e {0}"
working-directory: openwrt
run: |
echo CONFIG_TARGET_PER_DEVICE_ROOTFS=y >> .config
echo CONFIG_TARGET_ALL_PROFILES=y >> .config
+ - name: Configure external toolchain in container
+ if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_container'
+ 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
+
+ ./scripts/ext-toolchain.sh \
+ --toolchain /external-toolchain/$(ls /external-toolchain/ | grep openwrt-toolchain)/toolchain-* \
+ --overwrite-config \
+ --config ${{ inputs.target }}/${{ inputs.subtarget }}
+
- name: Configure external toolchain
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_toolchain'
shell: su buildbot -c "sh -e {0}"
include: ${{fromJson(needs.determine_targets.outputs.targets_subtargets)}}
uses: ./.github/workflows/build.yml
with:
+ container_name: toolchain
target: ${{ matrix.target }}
subtarget: ${{ matrix.subtarget }}
build_kernel: true