mirror of https://github.com/OpenIPC/firmware.git
[no ci] Workflow: consolidate build steps
parent
0400735587
commit
803fe63497
|
@ -7,9 +7,7 @@ on:
|
|||
- opened
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
tags:
|
||||
- 'v*'
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
|
|
|
@ -46,28 +46,22 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Determine toolchain
|
||||
- name: Build toolchain
|
||||
run: |
|
||||
echo "8.8.8.8 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
GCC=$(make BOARD=${{matrix.platform}}_lite toolname)
|
||||
CONFIG=$(find br-ext-chip-* -name ${{matrix.platform}}_lite_defconfig)
|
||||
GCC=$(make BOARD=${CONFIG} toolname)
|
||||
echo GCC=${GCC} >> ${GITHUB_ENV}
|
||||
URL=https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAG_NAME}/${GCC}.tgz
|
||||
echo ${URL}
|
||||
if ! wget --spider ${URL} 2> /dev/null; then
|
||||
echo BUILD=true >> ${GITHUB_ENV}
|
||||
sed -i "s|EXTERNAL=y|EXTERNAL=n|g" ${CONFIG}
|
||||
make BOARD=${CONFIG} br-sdk
|
||||
SDK=$(find output/images -name *_sdk-buildroot.tar.gz)
|
||||
mv ${SDK} ${GCC}.tgz
|
||||
fi
|
||||
|
||||
- name: Build toolchain
|
||||
if: env.BUILD
|
||||
run: |
|
||||
CONFIG=$(find br-ext-chip-* -name ${{matrix.platform}}_lite_defconfig)
|
||||
sed -i "s|EXTERNAL=y|EXTERNAL=n|g" ${CONFIG}
|
||||
make BOARD=${CONFIG} br-sdk
|
||||
SDK=$(find output/images -name *_sdk-buildroot.tar.gz)
|
||||
mv ${SDK} ${GCC}.tgz
|
||||
|
||||
- name: Upload toolchain
|
||||
if: env.BUILD
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{env.TAG_NAME}}
|
||||
|
|
Loading…
Reference in New Issue