mirror of https://github.com/OpenIPC/firmware.git
[no ci] Workflow: consolidate build steps
parent
0400735587
commit
803fe63497
|
@ -7,9 +7,7 @@ on:
|
||||||
- opened
|
- opened
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- master
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -46,28 +46,22 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Determine toolchain
|
- name: Build toolchain
|
||||||
run: |
|
run: |
|
||||||
echo "8.8.8.8 invisible-mirror.net" | sudo tee -a /etc/hosts
|
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}
|
echo GCC=${GCC} >> ${GITHUB_ENV}
|
||||||
URL=https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAG_NAME}/${GCC}.tgz
|
URL=https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAG_NAME}/${GCC}.tgz
|
||||||
echo ${URL}
|
echo ${URL}
|
||||||
if ! wget --spider ${URL} 2> /dev/null; then
|
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
|
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
|
- name: Upload toolchain
|
||||||
if: env.BUILD
|
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
tag_name: ${{env.TAG_NAME}}
|
tag_name: ${{env.TAG_NAME}}
|
||||||
|
|
Loading…
Reference in New Issue