Update build.sh #141
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Build venc/vdec | |
run: | | |
bash build.sh vdec | |
bash build.sh venc-goke | |
mv venc/venc venc/venc-goke | |
bash build.sh venc-hisi | |
mv venc/venc venc/venc-hisi | |
- name: Build sample | |
run: | | |
sudo apt-get update | |
sudo apt-get install musl-dev | |
x86_64-linux-musl-gcc sample/vdec-sample.c -o vdec-sample -s -static | |
- name: Build osd | |
run: | | |
bash build.sh osd | |
- name: Upload binaries | |
if: github.event_name != 'pull_request' | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: latest | |
files: | | |
vdec-sample | |
vdec/vdec | |
venc/venc-goke | |
venc/venc-hisi | |
osd/build/osd | |
- name: Send binaries | |
if: github.event_name != 'pull_request' | |
run: | | |
TG1=${{secrets.TELEGRAM_TOKEN_BOT_OPENIPC}} | |
TG2=${{secrets.TELEGRAM_CHANNEL_OPENIPC_DEV}} | |
SHA=$(git rev-parse --short ${GITHUB_SHA}) | |
TGM="Commit: ${SHA}\nBranch: ${GITHUB_REF_NAME}\n\n\xE2\x9C\x85 GitHub Actions" | |
CMD="https://api.telegram.org/bot${TG1}/sendDocument -F chat_id=${TG2}" | |
curl ${CMD} -F caption="$(echo -e ${TGM})" -F document=@vdec/vdec | |
curl ${CMD} -F caption="$(echo -e ${TGM})" -F document=@venc/venc-goke | |
curl ${CMD} -F caption="$(echo -e ${TGM})" -F document=@venc/venc-hisi | |
curl ${CMD} -F caption="$(echo -e ${TGM})" -F document=@osd/build/osd |