mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 22:47:56 +00:00
CI: build: package external toolchain after build
Package external toolchain after correct build.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit ce2e7c52f8
)
This commit is contained in:
parent
6420851c0c
commit
b98b3d4296
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
@ -47,6 +47,10 @@ on:
|
|||||||
mbedtls
|
mbedtls
|
||||||
wolfssl
|
wolfssl
|
||||||
openssl
|
openssl
|
||||||
|
build_external_toolchain:
|
||||||
|
type: boolean
|
||||||
|
upload_external_toolchain:
|
||||||
|
type: boolean
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@ -368,6 +372,12 @@ jobs:
|
|||||||
working-directory: openwrt
|
working-directory: openwrt
|
||||||
run: make -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
run: make -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||||
|
|
||||||
|
- name: Build external toolchain
|
||||||
|
if: inputs.build_external_toolchain == true
|
||||||
|
shell: su buildbot -c "sh -e {0}"
|
||||||
|
working-directory: openwrt
|
||||||
|
run: make target/toolchain/compile -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
||||||
|
|
||||||
- name: Coverity prepare toolchain
|
- name: Coverity prepare toolchain
|
||||||
if: inputs.coverity_check_packages != ''
|
if: inputs.coverity_check_packages != ''
|
||||||
shell: su buildbot -c "sh -e {0}"
|
shell: su buildbot -c "sh -e {0}"
|
||||||
@ -425,3 +435,19 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ inputs.target }}-${{ inputs.subtarget }}-logs
|
name: ${{ inputs.target }}-${{ inputs.subtarget }}-logs
|
||||||
path: "openwrt/logs"
|
path: "openwrt/logs"
|
||||||
|
|
||||||
|
- name: Find external toolchain name
|
||||||
|
id: get-toolchain-name
|
||||||
|
if: inputs.upload_external_toolchain == true
|
||||||
|
working-directory: openwrt
|
||||||
|
run: |
|
||||||
|
TOOLCHAIN_NAME=$(ls bin/targets/${{inputs.target }}/${{ inputs.subtarget }} | grep toolchain)
|
||||||
|
echo "toolchain-name=$TOOLCHAIN_NAME" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Upload prebuilt toolchain
|
||||||
|
if: inputs.upload_external_toolchain == true
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.target }}-${{ inputs.subtarget }}-external-toolchain
|
||||||
|
path: openwrt/bin/targets/${{ inputs.target }}/${{ inputs.subtarget }}/${{ steps.get-toolchain-name.outputs.toolchain-name }}
|
||||||
|
retention-days: 1
|
||||||
|
Loading…
Reference in New Issue
Block a user