Skip to content

Commit eb7e2bd

Browse files
committed
Add github workflow
1 parent 2f19f32 commit eb7e2bd

File tree

4 files changed

+43
-12
lines changed

4 files changed

+43
-12
lines changed

.github/workflows/build.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout source
16+
uses: actions/checkout@v4
17+
18+
- name: Build source
19+
run: |
20+
bash build.sh osd-goke
21+
bash build.sh osd-hisi
22+
bash build.sh osd-star
23+
24+
- name: Upload files
25+
uses: softprops/action-gh-release@v2
26+
with:
27+
tag_name: latest
28+
files: |
29+
osd/osd-goke
30+
osd/osd-hisi
31+
osd/osd-star

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
/firmware/
2-
/osd/osd
3-
/toolchain/
1+
/firmware
2+
/toolchain
3+
/osd/osd*

build.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
DL="https://github.com/openipc/firmware/releases/download/latest"
33

4-
if [[ "$1" = *-sst6 ]]; then
4+
if [ "$1" = "osd-star" ]; then
55
CC=cortex_a7_thumb2_hf-gcc13-glibc-4_9
66
else
77
CC=cortex_a7_thumb2-gcc13-musl-4_9
@@ -10,7 +10,7 @@ fi
1010
GCC=$PWD/toolchain/$CC/bin/arm-linux-gcc
1111

1212
if [ ! -e toolchain/$CC ]; then
13-
wget -c -nv --show-progress $DL/$CC.tgz -P $PWD
13+
wget -c -q --show-progress $DL/$CC.tgz -P $PWD
1414
mkdir -p toolchain/$CC
1515
tar -xf $CC.tgz -C toolchain/$CC --strip-components=1 || exit 1
1616
rm -f $CC.tgz
@@ -26,10 +26,10 @@ if [ "$1" = "osd-goke" ]; then
2626
elif [ "$1" = "osd-hisi" ]; then
2727
DRV=$PWD/firmware/general/package/hisilicon-osdrv-hi3516ev200/files/lib
2828
make -C osd -B CC=$GCC DRV=$DRV $1
29-
elif [ "$1" = "osd-sst6" ]; then
29+
elif [ "$1" = "osd-star" ]; then
3030
DRV=$PWD/firmware/general/package/sigmastar-osdrv-infinity6e/files/lib
3131
make -C osd -B CC=$GCC DRV=$DRV $1
3232
else
33-
echo "Usage: $0 [osd-goke|osd-hisi|osd-sst6]"
33+
echo "Usage: $0 [osd-goke|osd-hisi|osd-star]"
3434
exit 1
3535
fi

osd/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
SRCS := lib/schrift.c compat.c bitmap.c net.c region.c text.c main.c
2-
BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(LIB) -Os -s -o osd
2+
BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(LIB) -Os -s
33

44
osd-goke:
55
$(eval SDK = ../sdk/gk7205v300)
66
$(eval LIB = -lhi_mpi -lgk_api -ldnvqe -lupvqe -lvoice_engine -lsecurec)
7-
$(BUILD)
7+
$(BUILD) -o $@
88

99
osd-hisi:
1010
$(eval SDK = ../sdk/hi3516ev300)
1111
$(eval LIB = -lmpi -ldnvqe -lupvqe -lVoiceEngine -lsecurec)
12-
$(BUILD)
12+
$(BUILD) -o $@
1313

14-
osd-sst6:
14+
osd-star:
1515
$(eval SDK = ../sdk/infinity6)
1616
$(eval LIB = -D__SIGMASTAR__ -lcam_os_wrapper -lm -lmi_rgn -lmi_sys)
17-
$(BUILD)
17+
$(BUILD) -o $@

0 commit comments

Comments
 (0)