mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-14 00:06:46 +00:00
CI: build: Add support to use container included external toolchain
Add support to use container included external toolchain and skip redownloading external sdk for each test. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
e1370cdd49
commit
0fe5776f4a
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
@ -206,6 +206,11 @@ jobs:
|
|||||||
id: parse-toolchain
|
id: parse-toolchain
|
||||||
working-directory: openwrt
|
working-directory: openwrt
|
||||||
run: |
|
run: |
|
||||||
|
if [ -d /external-toolchain/ ]; then
|
||||||
|
echo "toolchain-type=external_container" >> $GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
TOOLCHAIN_PATH=snapshots
|
TOOLCHAIN_PATH=snapshots
|
||||||
|
|
||||||
if [ -n "${{ github.base_ref }}" ]; then
|
if [ -n "${{ github.base_ref }}" ]; then
|
||||||
@ -259,7 +264,7 @@ jobs:
|
|||||||
ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-
|
ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-
|
||||||
|
|
||||||
- name: Download external toolchain/sdk
|
- 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}"
|
shell: su buildbot -c "sh -e {0}"
|
||||||
working-directory: openwrt
|
working-directory: openwrt
|
||||||
run: |
|
run: |
|
||||||
@ -296,6 +301,20 @@ jobs:
|
|||||||
echo CONFIG_TARGET_PER_DEVICE_ROOTFS=y >> .config
|
echo CONFIG_TARGET_PER_DEVICE_ROOTFS=y >> .config
|
||||||
echo CONFIG_TARGET_ALL_PROFILES=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
|
- name: Configure external toolchain
|
||||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_toolchain'
|
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_toolchain'
|
||||||
shell: su buildbot -c "sh -e {0}"
|
shell: su buildbot -c "sh -e {0}"
|
||||||
|
1
.github/workflows/coverity.yml
vendored
1
.github/workflows/coverity.yml
vendored
@ -17,6 +17,7 @@ jobs:
|
|||||||
packages: read
|
packages: read
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
|
container_name: toolchain
|
||||||
target: x86
|
target: x86
|
||||||
subtarget: 64
|
subtarget: 64
|
||||||
build_full: true
|
build_full: true
|
||||||
|
1
.github/workflows/kernel.yml
vendored
1
.github/workflows/kernel.yml
vendored
@ -109,6 +109,7 @@ jobs:
|
|||||||
include: ${{fromJson(needs.determine_targets.outputs.targets_subtargets)}}
|
include: ${{fromJson(needs.determine_targets.outputs.targets_subtargets)}}
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
|
container_name: toolchain
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
subtarget: ${{ matrix.subtarget }}
|
subtarget: ${{ matrix.subtarget }}
|
||||||
build_kernel: true
|
build_kernel: true
|
||||||
|
1
.github/workflows/packages.yml
vendored
1
.github/workflows/packages.yml
vendored
@ -43,6 +43,7 @@ jobs:
|
|||||||
subtarget: 64
|
subtarget: 64
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
|
container_name: toolchain
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
subtarget: ${{ matrix.subtarget }}
|
subtarget: ${{ matrix.subtarget }}
|
||||||
build_kernel: true
|
build_kernel: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user