Skip to content

Commit

Permalink
try actions
Browse files Browse the repository at this point in the history
  • Loading branch information
henkwiedig committed Nov 3, 2024
1 parent 2298981 commit ec70a24
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 18 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build
on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build
run: |
sudo apt-get update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get -y install git make wget gcc libevent-dev libcsfml-dev file g++ cpio unzip rsync bc bzip2
./build.sh goke
./build.sh hisi
./build.sh star6b0
./build.sh star6e
./build.sh x86
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: build-results
path: |
msposd_goke
msposd_hisi
msposd_star6b0
msposd_star6e
msposd_x86
- name: Versioned release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
msposd_goke
msposd_hisi
msposd_star6b0
msposd_star6e
msposd_x86
- name: Upload latest
if: github.event_name != 'pull_request' && startsWith(github.ref, 'main')
uses: softprops/action-gh-release@v2
with:
tag_name: latest
files: |
msposd_goke
msposd_hisi
msposd_star6b0
msposd_star6e
msposd_x86
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ toolchain/
majestic.yaml
/msposd
firmware/

msposd_goke
msposd_hisi
msposd_star6b0
msposd_star6e
msposd_x86
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ CFLAGS += -Wno-address-of-packed-member -DVERSION_STRING="\"$(VERSION_STRING)\""

SRCS := compat.c msposd.c bmp/bitmap.c bmp/region.c bmp/lib/schrift.c bmp/text.c osd/net/network.c osd/msp/msp.c osd/msp/msp_displayport.c libpng/lodepng.c osd/util/interface.c osd/util/settings.c osd/util/ini_parser.c osd/msp/vtxmenu.c
OUTPUT ?= $(PWD)
BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(CFLAGS) $(LIB) -levent_core -Os -s $(CFLAGS) -o $(OUTPUT)/msposd
BUILD = $(CC) $(SRCS) -I $(SDK)/include -I$(TOOLCHAIN)/usr/include -L$(DRV) $(CFLAGS) $(LIB) -levent_core -Os -s $(CFLAGS) -o $(OUTPUT)

clean:
rm -f *.o x86 goke hisi star6b0 star6e msposd
rm -f *.o msposd_x86 msposd_goke msposd_hisi msposd_star6b0 msposd_star6e

goke:
$(eval SDK = ./sdk/gk7205v300)
$(eval CFLAGS += -D__GOKE__)
$(eval LIB = -ldl -ldnvqe -lgk_api -lhi_mpi -lsecurec -lupvqe -lvoice_engine -ldnvqe)
$(eval LIB = -shared -ldl -ldnvqe -lgk_api -lhi_mpi -lsecurec -lupvqe -lvoice_engine -ldnvqe)
$(BUILD)

hisi:
$(eval SDK = ./sdk/hi3516ev300)
$(eval CFLAGS += -D__GOKE__)
$(eval LIB = -ldnvqe -lmpi -lsecurec -lupvqe -lVoiceEngine)
$(eval LIB = -shared -ldnvqe -lmpi -lsecurec -lupvqe -lVoiceEngine)
$(BUILD)

star6b0:
Expand All @@ -39,5 +39,5 @@ x86:
$(eval CFLAGS += -D_x86)
$(eval LIB = -lcsfml-graphics -lcsfml-window -lcsfml-system `pkg-config --libs cairo x11` -lm)

$(eval BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(CFLAGS) $(LIB) -levent_core -O0 -g -o $(OUTPUT)/msposd)
$(eval BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(CFLAGS) $(LIB) -levent_core -O0 -g -o $(OUTPUT))
$(BUILD)
11 changes: 5 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ elif [[ "$1" == *"hisi" ]]; then
fi

GCC=$PWD/toolchain/$CC/bin/arm-linux-gcc
OUT=$PWD/release/$1
mkdir -p $OUT
OUT=msposd_$1

if [ ! -e toolchain/$CC ]; then
wget -c -q --show-progress $DL/$CC.tgz -P $PWD
Expand All @@ -28,16 +27,16 @@ fi

if [ "$1" = "goke" ]; then
DRV=$PWD/firmware/general/package/goke-osdrv-gk7205v200/files/lib
make -B CC=$GCC DRV=$DRV OUTPUT=$OUT $1
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
elif [ "$1" = "hisi" ]; then
DRV=$PWD/firmware/general/package/hisilicon-osdrv-hi3516ev200/files/lib
make -B CC=$GCC DRV=$DRV OUTPUT=$OUT $1
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
elif [ "$1" = "star6b0" ]; then
DRV=$PWD/firmware/general/package/sigmastar-osdrv-infinity6b0/files/lib
make -B CC=$GCC DRV=$DRV OUTPUT=$OUT $1
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
elif [ "$1" = "star6e" ]; then
DRV=$PWD/firmware/general/package/sigmastar-osdrv-infinity6e/files/lib
make -B CC=$GCC DRV=$DRV OUTPUT=$OUT $1
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
elif [ "$1" = "x86" ]; then
DRV=$PWD
make DRV=$DRV OUTPUT=$OUT $1
Expand Down
4 changes: 1 addition & 3 deletions osd/util/interface.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if __SIGMASTAR__
#include <bits/stdint-uintn.h>
#endif
#include <stdint.h>
#include "interface.h"

#define BUFFER_SIZE 1024
Expand Down
4 changes: 1 addition & 3 deletions osd/util/interface.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#pragma once
#if __SIGMASTAR__
#include <bits/stdint-uintn.h>
#endif
#include <stdint.h>
#include "../msp/msp.h"

#define MAX_ENTRIES 100 // Maximum number of frequency-channel pairs to store
Expand Down
Binary file removed release/goke/msposd
Binary file not shown.
Binary file removed release/hisi/msposd
Binary file not shown.
Binary file removed release/star6e/msposd
Binary file not shown.
Binary file removed release/x86/msposd
Binary file not shown.

0 comments on commit ec70a24

Please sign in to comment.