mirror of https://github.com/OpenIPC/firmware.git
Migrate everything viable to new CI (#395)
parent
d52f70537b
commit
c623d17f02
|
@ -1,152 +0,0 @@
|
|||
name: "Hi3516Av300 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3516Av300
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3516Av300 firmware
|
||||
id: build-hi3516av300-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3516av300-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_hi3516av300_openipc all
|
||||
# [[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... HI3516AV300" >> $GITHUB_ENV && exit 1
|
||||
# [[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... HI3516AV300" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.hi3516av300
|
||||
mv rootfs.squashfs rootfs.squashfs.hi3516av300
|
||||
md5sum rootfs.squashfs.hi3516av300 > rootfs.squashfs.hi3516av300.md5sum
|
||||
md5sum uImage.hi3516av300 > uImage.hi3516av300.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *hi3516av300*
|
||||
|
||||
- name: Build Hi3516Av300 SDK
|
||||
id: build-hi3516av300-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-gnueabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3516av300-firmware.outcome != 'success' || steps.build-hi3516av300-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... HI3516AV300}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3516av300-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-hi3516av300-linux-gnueabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "Hi3516Cv100 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3516Cv100
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3516Cv100 firmware
|
||||
id: build-hi3516cv100-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3516cv100-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_hi3516cv100_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... HI3516CV100" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... HI3516CV100" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.hi3516cv100
|
||||
mv rootfs.squashfs rootfs.squashfs.hi3516cv100
|
||||
md5sum rootfs.squashfs.hi3516cv100 > rootfs.squashfs.hi3516cv100.md5sum
|
||||
md5sum uImage.hi3516cv100 > uImage.hi3516cv100.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *hi3516cv100*
|
||||
|
||||
- name: Build Hi3516Cv100 SDK
|
||||
id: build-hi3516cv100-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3516cv100-firmware.outcome != 'success' || steps.build-hi3516cv100-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... HI3516CV100}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3516cv100-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-hi3516cv100-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "Hi3516Cv200 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3516Cv200
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3516Cv200 firmware
|
||||
id: build-hi3516cv200-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3516cv200-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_hi3516cv200_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... HI3516CV200" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... HI3516CV200" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.hi3516cv200
|
||||
mv rootfs.squashfs rootfs.squashfs.hi3516cv200
|
||||
md5sum rootfs.squashfs.hi3516cv200 > rootfs.squashfs.hi3516cv200.md5sum
|
||||
md5sum uImage.hi3516cv200 > uImage.hi3516cv200.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *hi3516cv200*
|
||||
|
||||
- name: Build Hi3516Cv200 SDK
|
||||
id: build-hi3516cv200-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3516cv200-firmware.outcome != 'success' || steps.build-hi3516cv200-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... HI3516CV200}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3516cv200-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-hi3516cv200-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "Hi3516Cv300 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3516Cv300
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3516Cv300 firmware
|
||||
id: build-hi3516cv300-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3516cv300-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_hi3516cv300_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... HI3516CV300" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... HI3516CV300" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.hi3516cv300
|
||||
mv rootfs.squashfs rootfs.squashfs.hi3516cv300
|
||||
md5sum rootfs.squashfs.hi3516cv300 > rootfs.squashfs.hi3516cv300.md5sum
|
||||
md5sum uImage.hi3516cv300 > uImage.hi3516cv300.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *hi3516cv300*
|
||||
|
||||
- name: Build Hi3516Cv300 SDK
|
||||
id: build-hi3516cv300-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3516cv300-firmware.outcome != 'success' || steps.build-hi3516cv300-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... HI3516CV300}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3516cv300-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-hi3516cv300-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,151 +0,0 @@
|
|||
name: "Hi3516Cv300 (ultimate)"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3516Cv300 (ultimate)
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
echo "BOARD=hi3516cv300" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3516Cv300 (ultimate) firmware
|
||||
id: build-hi3516cv300-ultimate-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.${BOARD}-ultimate-br.tgz"
|
||||
ARCHIVE_FW_NAND="${GITHUB_WORKSPACE}/output/images/openipc.${BOARD}-nand-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
echo "ARCHIVE_FW_NAND=$ARCHIVE_FW_NAND" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_${BOARD}_ultimate all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 3145728 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) ... ${BOARD} (ultimate)" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 10485760 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 10485760... ${BOARD} (ultimate)" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.${BOARD}
|
||||
mv rootfs.squashfs rootfs.squashfs.${BOARD}
|
||||
mv rootfs.ubi rootfs.ubi.${BOARD}
|
||||
mv rootfs.ubifs rootfs.ubifs.${BOARD}
|
||||
md5sum rootfs.squashfs.${BOARD} > rootfs.squashfs.${BOARD}.md5sum
|
||||
md5sum uImage.${BOARD} > uImage.${BOARD}.md5sum
|
||||
md5sum rootfs.ubifs.${BOARD} > rootfs.ubifs.${BOARD}.md5sum
|
||||
md5sum uImage.${BOARD} > uImage.${BOARD}.md5sum
|
||||
tar -cvzf $ARCHIVE_FW uImage* *rootfs.squashfs.${BOARD}*
|
||||
tar -cvzf $ARCHIVE_FW_NAND uImage* *rootfs.ubi*.${BOARD}*
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3516cv300-ultimate-firmware.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... ${BOARD} (ultimate)}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: openipc.${{ env.BOARD }}-ultimate-br.tgz
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload NAND FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW_NAND }}
|
||||
asset_name: openipc.${{ env.BOARD }}-nand-br.tgz
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "Hi3516Cv500 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3516Cv500
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3516Cv500 firmware
|
||||
id: build-hi3516cv500-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3516cv500-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_hi3516cv500_openipc all
|
||||
# [[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... HI3516CV500" >> $GITHUB_ENV && exit 1
|
||||
# [[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... HI3516CV500" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.hi3516cv500
|
||||
mv rootfs.squashfs rootfs.squashfs.hi3516cv500
|
||||
md5sum rootfs.squashfs.hi3516cv500 > rootfs.squashfs.hi3516cv500.md5sum
|
||||
md5sum uImage.hi3516cv500 > uImage.hi3516cv500.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *hi3516cv500*
|
||||
|
||||
- name: Build Hi3516Cv500 SDK
|
||||
id: build-hi3516cv500-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-gnueabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3516cv500-firmware.outcome != 'success' || steps.build-hi3516cv500-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... HI3516CV500}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3516cv500-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-hi3516cv500-linux-gnueabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "Hi3516Dv300 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3516Dv300
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3516Dv300 firmware
|
||||
id: build-hi3516dv300-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3516dv300-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_hi3516dv300_openipc all
|
||||
# [[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... HI3516DV300" >> $GITHUB_ENV && exit 1
|
||||
# [[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... HI3516DV300" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.hi3516dv300
|
||||
mv rootfs.squashfs rootfs.squashfs.hi3516dv300
|
||||
md5sum rootfs.squashfs.hi3516dv300 > rootfs.squashfs.hi3516dv300.md5sum
|
||||
md5sum uImage.hi3516dv300 > uImage.hi3516dv300.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *hi3516dv300*
|
||||
|
||||
- name: Build Hi3516Dv300 SDK
|
||||
id: build-hi3516dv300-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-gnueabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3516dv300-firmware.outcome != 'success' || steps.build-hi3516dv300-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... HI3516DV300}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3516dv300-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-hi3516dv300-linux-gnueabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "Hi3516Ev100 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3516Ev100
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3516Ev100 firmware
|
||||
id: build-hi3516ev100-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3516ev100-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_hi3516ev100_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... HI3516EV100" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... HI3516EV100" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.hi3516ev100
|
||||
mv rootfs.squashfs rootfs.squashfs.hi3516ev100
|
||||
md5sum rootfs.squashfs.hi3516ev100 > rootfs.squashfs.hi3516ev100.md5sum
|
||||
md5sum uImage.hi3516ev100 > uImage.hi3516ev100.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *hi3516ev100*
|
||||
|
||||
- name: Build Hi3516Ev100 SDK
|
||||
id: build-hi3516ev100-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3516ev100-firmware.outcome != 'success' || steps.build-hi3516ev100-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... HI3516EV100}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3516ev100-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-hi3516ev100-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "Hi3518Cv100 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3518Cv100
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3518Cv100 firmware
|
||||
id: build-hi3518cv100-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3518cv100-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_hi3518cv100_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... HI3518CV100" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... HI3518CV100" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.hi3518cv100
|
||||
mv rootfs.squashfs rootfs.squashfs.hi3518cv100
|
||||
md5sum rootfs.squashfs.hi3518cv100 > rootfs.squashfs.hi3518cv100.md5sum
|
||||
md5sum uImage.hi3518cv100 > uImage.hi3518cv100.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *hi3518cv100*
|
||||
|
||||
- name: Build Hi3518Cv100 SDK
|
||||
id: build-hi3518cv100-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3518cv100-firmware.outcome != 'success' || steps.build-hi3518cv100-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... HI3518CV100}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3518cv100-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-hi3518cv100-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "Hi3518Ev100 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3518Ev100
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3518Ev100 firmware
|
||||
id: build-hi3518ev100-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3518ev100-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_hi3518ev100_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... HI3518EV100" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... HI3518EV100" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.hi3518ev100
|
||||
mv rootfs.squashfs rootfs.squashfs.hi3518ev100
|
||||
md5sum rootfs.squashfs.hi3518ev100 > rootfs.squashfs.hi3518ev100.md5sum
|
||||
md5sum uImage.hi3518ev100 > uImage.hi3518ev100.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *hi3518ev100*
|
||||
|
||||
- name: Build Hi3518Ev100 SDK
|
||||
id: build-hi3518ev100-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3518ev100-firmware.outcome != 'success' || steps.build-hi3518ev100-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... HI3518EV100}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3518ev100-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-hi3518ev100-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "Hi3518Ev200 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3518Ev200
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3518Ev200 firmware
|
||||
id: build-hi3518ev200-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3518ev200-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_hi3518ev200_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... HI3518EV200" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... HI3518EV200" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.hi3518ev200
|
||||
mv rootfs.squashfs rootfs.squashfs.hi3518ev200
|
||||
md5sum rootfs.squashfs.hi3518ev200 > rootfs.squashfs.hi3518ev200.md5sum
|
||||
md5sum uImage.hi3518ev200 > uImage.hi3518ev200.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *hi3518ev200*
|
||||
|
||||
- name: Build Hi3518Ev200 SDK
|
||||
id: build-hi3518ev200-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3518ev200-firmware.outcome != 'success' || steps.build-hi3518ev200-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... HI3518EV200}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3518ev200-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-hi3518ev200-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,151 +0,0 @@
|
|||
name: "Hi3518Ev200 (ultimate)"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3518Ev200 (ultimate)
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
echo "BOARD=hi3518ev200" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3518Ev200 (ultimate) firmware
|
||||
id: build-hi3518ev200-ultimate-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.${BOARD}-ultimate-br.tgz"
|
||||
ARCHIVE_FW_NAND="${GITHUB_WORKSPACE}/output/images/openipc.${BOARD}-nand-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
echo "ARCHIVE_FW_NAND=$ARCHIVE_FW_NAND" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_${BOARD}_ultimate all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 3145728 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) ... ${BOARD} (ultimate)" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 10485760 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 10485760... ${BOARD} (ultimate)" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.${BOARD}
|
||||
mv rootfs.squashfs rootfs.squashfs.${BOARD}
|
||||
mv rootfs.ubi rootfs.ubi.${BOARD}
|
||||
mv rootfs.ubifs rootfs.ubifs.${BOARD}
|
||||
md5sum rootfs.squashfs.${BOARD} > rootfs.squashfs.${BOARD}.md5sum
|
||||
md5sum uImage.${BOARD} > uImage.${BOARD}.md5sum
|
||||
md5sum rootfs.ubifs.${BOARD} > rootfs.ubifs.${BOARD}.md5sum
|
||||
md5sum uImage.${BOARD} > uImage.${BOARD}.md5sum
|
||||
tar -cvzf $ARCHIVE_FW uImage* *rootfs.squashfs.${BOARD}*
|
||||
tar -cvzf $ARCHIVE_FW_NAND uImage* *rootfs.ubi*.${BOARD}*
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3518ev200-ultimate-firmware.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... ${BOARD} (ultimate)}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: openipc.${{ env.BOARD }}-ultimate-br.tgz
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload NAND FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW_NAND }}
|
||||
asset_name: openipc.${{ env.BOARD }}-nand-br.tgz
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "Hi3536Cv100 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3536Cv100
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3536Cv100 firmware
|
||||
id: build-hi3536cv100-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3536cv100-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_hi3536cv100_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... Hi3536Cv100" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... Hi3536Cv100" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.hi3536cv100
|
||||
mv rootfs.squashfs rootfs.squashfs.hi3536cv100
|
||||
md5sum rootfs.squashfs.hi3536cv100 > rootfs.squashfs.hi3536cv100.md5sum
|
||||
md5sum uImage.hi3536cv100 > uImage.hi3536cv100.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *hi3536cv100*
|
||||
|
||||
- name: Build Hi3536Cv100 SDK
|
||||
id: build-hi3536cv100-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3536cv100-firmware.outcome != 'success' || steps.build-hi3536cv100-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... Hi3536Cv100}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3536cv100-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-hi3536cv100-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "Hi3536Dv100 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 03 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for Hi3536Dv100
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3536Dv100 firmware
|
||||
id: build-hi3536dv100-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3536dv100-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=hisilicon BOARD=unknown_unknown_hi3536dv100_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... Hi3536Dv100" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... Hi3536Dv100" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.hi3536dv100
|
||||
mv rootfs.squashfs rootfs.squashfs.hi3536dv100
|
||||
md5sum rootfs.squashfs.hi3536dv100 > rootfs.squashfs.hi3536dv100.md5sum
|
||||
md5sum uImage.hi3536dv100 > uImage.hi3536dv100.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *hi3536dv100*
|
||||
|
||||
- name: Build Hi3536Dv100 SDK
|
||||
id: build-hi3536dv100-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3536dv100-firmware.outcome != 'success' || steps.build-hi3536dv100-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... Hi3536Dv100}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3536dv100-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-hi3536dv100-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -28,14 +28,18 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- hi3516av100
|
||||
- ak3918ev300
|
||||
- gk7102
|
||||
- hi3516cv100
|
||||
- hi3516cv200
|
||||
- hi3519v101
|
||||
- hi3516cv300
|
||||
- hi3516cv500
|
||||
- hi3516ev200
|
||||
- ak3918ev300
|
||||
- gk7102
|
||||
- hi3519v101
|
||||
- hi3536cv100
|
||||
- t31
|
||||
- xm510
|
||||
- xm530
|
||||
|
||||
steps:
|
||||
|
||||
|
@ -144,13 +148,26 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- hi3516cv100
|
||||
- hi3518cv100
|
||||
- hi3518ev100
|
||||
- hi3516av100
|
||||
- hi3516dv100
|
||||
- hi3516cv200
|
||||
- hi3518ev200
|
||||
- hi3519v101
|
||||
- hi3516av200
|
||||
- hi3516cv300
|
||||
- hi3516ev100
|
||||
- hi3516cv500
|
||||
- hi3516dv300
|
||||
- hi3516av300
|
||||
- hi3516ev200
|
||||
- hi3516ev300
|
||||
- hi3518ev300
|
||||
- hi3516dv200
|
||||
- hi3536cv100
|
||||
- hi3536dv100
|
||||
- gk7205v200
|
||||
- gk7205v210
|
||||
- gk7205v300
|
||||
|
@ -162,8 +179,6 @@ jobs:
|
|||
include:
|
||||
- platform: hi3518ev200
|
||||
release: mini
|
||||
- platform: hi3519v101
|
||||
release: lite
|
||||
- platform: hi3516cv300
|
||||
release: mini
|
||||
- platform: hi3516ev200
|
||||
|
@ -175,26 +190,64 @@ jobs:
|
|||
- platform: gk7205v300
|
||||
release: fpv
|
||||
|
||||
# MVP
|
||||
- platform: t10
|
||||
release: lite
|
||||
- platform: t20
|
||||
release: lite
|
||||
- platform: t21
|
||||
release: lite
|
||||
- platform: t31
|
||||
release: lite
|
||||
- platform: xm510
|
||||
release: lite
|
||||
- platform: xm530
|
||||
release: lite
|
||||
- platform: xm550
|
||||
release: lite
|
||||
|
||||
# TODO
|
||||
- platform: ak3916ev300
|
||||
release: lite
|
||||
todo: true
|
||||
nosave: nosave
|
||||
- platform: ak3918ev200
|
||||
release: lite
|
||||
todo: true
|
||||
nosave: nosave
|
||||
- platform: ak3918ev300
|
||||
release: lite
|
||||
todo: true
|
||||
nosave: nosave
|
||||
- platform: gk7102
|
||||
release: lite
|
||||
todo: true
|
||||
nosave: nosave
|
||||
- platform: gk7102s
|
||||
release: lite
|
||||
todo: true
|
||||
nosave: nosave
|
||||
|
||||
exclude:
|
||||
- platform: hi3516cv100
|
||||
release: ultimate
|
||||
- platform: hi3518cv100
|
||||
release: ultimate
|
||||
- platform: hi3518ev100
|
||||
release: ultimate
|
||||
- platform: hi3516cv200
|
||||
release: ultimate
|
||||
- platform: hi3519v101
|
||||
release: ultimate
|
||||
- platform: hi3516ev100
|
||||
release: ultimate
|
||||
- platform: hi3516cv500
|
||||
release: ultimate
|
||||
- platform: hi3516dv300
|
||||
release: ultimate
|
||||
- platform: hi3516av300
|
||||
release: ultimate
|
||||
- platform: hi3516dv200
|
||||
release: ultimate
|
||||
- platform: hi3536cv100
|
||||
release: ultimate
|
||||
- platform: hi3536dv100
|
||||
release: ultimate
|
||||
- platform: gk7605v100
|
||||
release: ultimate
|
||||
- platform: gk7205v210
|
||||
|
@ -294,14 +347,26 @@ jobs:
|
|||
echo "BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED=y" >> $CONF_PATH
|
||||
echo "BR2_TOOLCHAIN_EXTERNAL_PATH=\"/tmp/extsdk\"" >> $CONF_PATH
|
||||
|
||||
SOC=$(echo $TOOLNAME | cut -d '-' -f 1)
|
||||
ABI=""
|
||||
case "$SOC" in
|
||||
arm*|cortex*)
|
||||
PREFIX=arm
|
||||
ABI="eabi"
|
||||
;;
|
||||
mips_xburst)
|
||||
PREFIX=mipsel
|
||||
;;
|
||||
esac
|
||||
PREFIX="${PREFIX}-openipc-linux-"
|
||||
|
||||
LIBC=$(echo $TOOLNAME | cut -d '-' -f 3)
|
||||
PREFIX="arm-openipc-linux-"
|
||||
case "$LIBC" in
|
||||
musl|uclibc)
|
||||
PREFIX="${PREFIX}${LIBC}eabi"
|
||||
PREFIX="${PREFIX}${LIBC}${ABI}"
|
||||
;;
|
||||
glibc)
|
||||
PREFIX="${PREFIX}gnueabi"
|
||||
PREFIX="${PREFIX}gnu${ABI}"
|
||||
;;
|
||||
esac
|
||||
echo "BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX=\"${PREFIX}\"" >> $CONF_PATH
|
||||
|
@ -355,7 +420,7 @@ jobs:
|
|||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT && github.event_name != 'pull_request' && !matrix.todo }}
|
||||
if: ${{ !env.ACT && github.event_name != 'pull_request' && matrix.nosave != 'nosave' }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
|
@ -367,7 +432,7 @@ jobs:
|
|||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT && github.event_name != 'pull_request' && !matrix.todo }}
|
||||
if: ${{ !env.ACT && github.event_name != 'pull_request' && matrix.nosave != 'nosave' }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -377,7 +442,7 @@ jobs:
|
|||
overwrite: true
|
||||
|
||||
- name: Upload NAND FW to release
|
||||
if: ${{ !env.ACT && github.event_name != 'pull_request' && env.HAS_NAND == 'y' && !matrix.todo }}
|
||||
if: ${{ !env.ACT && github.event_name != 'pull_request' && matrix.nosave != 'nosave' && env.HAS_NAND == 'y' }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -387,7 +452,7 @@ jobs:
|
|||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT && github.event_name != 'pull_request' && !matrix.todo }}
|
||||
if: ${{ !env.ACT && github.event_name != 'pull_request' && matrix.nosave != 'nosave' }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
|
|
|
@ -1,152 +0,0 @@
|
|||
name: "T10"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 02 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for T10
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build T10 firmware
|
||||
id: build-t10-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.t10-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=ingenic BOARD=unknown_unknown_t10_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... T10" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... T10" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.t10
|
||||
mv rootfs.squashfs rootfs.squashfs.t10
|
||||
md5sum rootfs.squashfs.t10 > rootfs.squashfs.t10.md5sum
|
||||
md5sum uImage.t10 > uImage.t10.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *t10*
|
||||
|
||||
- name: Build T10 SDK
|
||||
id: build-t10-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/mipsel-openipc-linux-musl_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-t10-firmware.outcome != 'success' || steps.build-t10-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... T10}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.t10-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "mipsel-openipc-t10-linux-musl_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "T20"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 02 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for T20
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build T20 firmware
|
||||
id: build-t20-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.t20-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=ingenic BOARD=unknown_unknown_t20_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... T20" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... T20" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.t20
|
||||
mv rootfs.squashfs rootfs.squashfs.t20
|
||||
md5sum rootfs.squashfs.t20 > rootfs.squashfs.t20.md5sum
|
||||
md5sum uImage.t20 > uImage.t20.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *t20*
|
||||
|
||||
- name: Build T20 SDK
|
||||
id: build-t20-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/mipsel-openipc-linux-musl_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-t20-firmware.outcome != 'success' || steps.build-t20-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... T20}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.t20-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "mipsel-openipc-t20-linux-musl_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "T21"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 02 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for T21
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build T21 firmware
|
||||
id: build-t21-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.t21-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=ingenic BOARD=unknown_unknown_t21_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... T21" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... T21" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.t21
|
||||
mv rootfs.squashfs rootfs.squashfs.t21
|
||||
md5sum rootfs.squashfs.t21 > rootfs.squashfs.t21.md5sum
|
||||
md5sum uImage.t21 > uImage.t21.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *t21*
|
||||
|
||||
- name: Build T21 SDK
|
||||
id: build-t21-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/mipsel-openipc-linux-musl_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-t21-firmware.outcome != 'success' || steps.build-t21-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... T21}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.t21-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "mipsel-openipc-t21-linux-musl_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "T31 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 02 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for T31
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build T31 firmware
|
||||
id: build-t31-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.t31-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=ingenic BOARD=unknown_unknown_t31_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... T31" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... T31" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.t31
|
||||
mv rootfs.squashfs rootfs.squashfs.t31
|
||||
md5sum rootfs.squashfs.t31 > rootfs.squashfs.t31.md5sum
|
||||
md5sum uImage.t31 > uImage.t31.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *t31*
|
||||
|
||||
- name: Build T31 SDK
|
||||
id: build-t31-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/mipsel-openipc-linux-musl_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-t31-firmware.outcome != 'success' || steps.build-t31-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... T31}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.t31-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "mipsel-openipc-t31-linux-musl_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "XM510 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 01 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for XM510
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build XM510 firmware
|
||||
id: build-xm510-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.xm510-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=xiongmai BOARD=unknown_unknown_xm510_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... XM510" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... XM510" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.xm510
|
||||
mv rootfs.squashfs rootfs.squashfs.xm510
|
||||
md5sum rootfs.squashfs.xm510 > rootfs.squashfs.xm510.md5sum
|
||||
md5sum uImage.xm510 > uImage.xm510.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *xm510*
|
||||
|
||||
- name: Build XM510 SDK
|
||||
id: build-xm510-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-xm510-firmware.outcome != 'success' || steps.build-xm510-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... XM510}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.xm510-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-xm510-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "XM530 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 01 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for XM530
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build XM530 firmware
|
||||
id: build-xm530-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.xm530-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=xiongmai BOARD=unknown_unknown_xm530_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... XM530" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... XM530" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.xm530
|
||||
mv rootfs.squashfs rootfs.squashfs.xm530
|
||||
md5sum rootfs.squashfs.xm530 > rootfs.squashfs.xm530.md5sum
|
||||
md5sum uImage.xm530 > uImage.xm530.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *xm530*
|
||||
|
||||
- name: Build XM530 SDK
|
||||
id: build-xm530-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-xm530-firmware.outcome != 'success' || steps.build-xm530-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... XM530}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.xm530-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-xm530-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
|
@ -1,152 +0,0 @@
|
|||
name: "XM550 "
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "00 01 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC firmware for XM550
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
if [ ! -z "$ACT" ]; then
|
||||
apt install -y cpio rsync bc
|
||||
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
|
||||
# Mitigate #325 issue
|
||||
apt install -y pip && pip install cmake
|
||||
else
|
||||
# https://github.com/actions/runner-images/issues/2577
|
||||
echo "1.1.1.1 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||
fi
|
||||
|
||||
- name: Free disk space
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build XM550 firmware
|
||||
id: build-xm550-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.xm550-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make PLATFORM=xiongmai BOARD=unknown_unknown_xm550_openipc all
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) -gt 2097152 ]] && echo "TG_NOTIFY=Warning, kernel size exceeded : $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/uImage) vs 2097152... XM550" >> $GITHUB_ENV && exit 1
|
||||
[[ $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) -gt 5242880 ]] && echo "TG_NOTIFY=Warning, rootfs size exceeded - $(stat --printf="%s" ${GITHUB_WORKSPACE}/output/images/rootfs.squashfs) vs 5242880... XM550" >> $GITHUB_ENV && exit 1
|
||||
cd ${GITHUB_WORKSPACE}/output/images
|
||||
mv uImage uImage.xm550
|
||||
mv rootfs.squashfs rootfs.squashfs.xm550
|
||||
md5sum rootfs.squashfs.xm550 > rootfs.squashfs.xm550.md5sum
|
||||
md5sum uImage.xm550 > uImage.xm550.md5sum
|
||||
tar -cvzf $ARCHIVE_FW *xm550*
|
||||
|
||||
- name: Build XM550 SDK
|
||||
id: build-xm550-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send error message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-xm550-firmware.outcome != 'success' || steps.build-xm550-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_NOTIFY="${TG_NOTIFY:=Warning, Buildroot compiling error... XM550}"
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
exit 2
|
||||
|
||||
- name: Create release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload NOR FW to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.xm550-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
if: ${{ !env.ACT }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-xm550-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
if: ${{ !env.ACT }}
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 30 --max-time 30"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
Loading…
Reference in New Issue