Skip to content

Commit 219f8e9

Browse files
committed
ci:add debian and fedora system support
ci:improved build
1 parent fd6ec6a commit 219f8e9

File tree

9 files changed

+262
-203
lines changed

9 files changed

+262
-203
lines changed

.github/workflows/RockyArm64_build.yml

Lines changed: 0 additions & 80 deletions
This file was deleted.
Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: rocky x86_64 build workflows
1+
name: rocky build workflows
22

33
on:
44
push:
@@ -14,18 +14,28 @@ permissions:
1414

1515
jobs:
1616
build:
17-
runs-on: ubuntu-latest
17+
runs-on: ${{ matrix.runner }}
1818
container:
1919
image: rockylinux/rockylinux:9.5
20+
options: --platform ${{ matrix.platform }}
21+
strategy:
22+
matrix:
23+
include:
24+
- arch: amd64
25+
runner: ubuntu-24.04
26+
platform: linux/amd64
27+
artifact: x86-64
28+
- arch: arm64
29+
runner: ubuntu-24.04-arm
30+
platform: linux/arm64
31+
artifact: Arm64
2032

2133
steps:
22-
# 检出您的主仓库代码
2334
- name: Checkout main repository code
2435
uses: actions/checkout@v4
2536
with:
2637
ref: 'develop'
2738

28-
# 检出依赖的xengine仓库到指定的xengine目录
2939
- name: Checkout dependency repository (xengine)
3040
uses: actions/checkout@v4
3141
with:
@@ -38,29 +48,23 @@ jobs:
3848
repository: libxengine/XEngine_OPenSource
3949
path: XEngine_Source/XEngine_Depend
4050

51+
- name: Set TERM variable
52+
run: echo "TERM=xterm" >> $GITHUB_ENV
53+
4154
- name: install system package
4255
run: |
4356
dnf update -y
44-
dnf install gcc g++ make git jq unzip -y
45-
# 设置依赖库的环境变量
46-
- name: Set up Dependency rocky linux Environment
47-
run: |
48-
cd libxengine
49-
chmod 777 *
50-
./XEngine_LINEnv.sh -i 0
57+
dnf install gcc g++ make git jq unzip wget -y
5158
dnf install libsrtp-devel srt-devel -y
52-
5359
- name: install xengine library
54-
run: |
60+
run: |
5561
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
56-
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_9_x86-64.zip
57-
unzip ./XEngine_RockyLinux_9_x86-64.zip -d ./XEngine_RockyLinux_9_x86-64
58-
cd XEngine_RockyLinux_9_x86-64
62+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_9_${{ matrix.artifact }}.zip
63+
unzip ./XEngine_RockyLinux_9_${{ matrix.artifact }}.zip -d ./XEngine_RockyLinux_9_${{ matrix.artifact }}
64+
cd XEngine_RockyLinux_9_${{ matrix.artifact }}
5965
60-
cp -rf ./XEngine_Include /usr/local/include
61-
find ./XEngine_Linux -name "*.so" -exec cp {} /usr/lib64 \;
62-
ldconfig
63-
66+
chmod 777 *
67+
./XEngine_LINEnv.sh -i 3
6468
- name: make
6569
run: |
6670
cd XEngine_Source
@@ -80,6 +84,6 @@ jobs:
8084
- name: Upload folder as artifact with RockyLinux
8185
uses: actions/upload-artifact@v4
8286
with:
83-
name: XEngine_StreamMediaApp-RockyLinux_9_x86_64
87+
name: XEngine_StreamMediaApp-RockyLinux_9_${{ matrix.artifact }}
8488
path: XEngine_Release/
8589
retention-days: 1

.github/workflows/UbuntuArm64_build.yml

Lines changed: 0 additions & 75 deletions
This file was deleted.

.github/workflows/codeql.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ jobs:
4040
git submodule init
4141
git submodule update
4242
43+
- name: Set TERM variable
44+
run: echo "TERM=xterm" >> $GITHUB_ENV
45+
4346
- name: Set up Dependency Environment
4447
run: |
4548
cd libxengine

.github/workflows/debian_build.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: debian build workflows
2+
3+
on:
4+
push:
5+
branches:
6+
- 'develop'
7+
paths:
8+
- 'XEngine_Source/**'
9+
- 'XEngine_Release/**'
10+
- '.github/**'
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
runs-on: ${{ matrix.runner }}
18+
container:
19+
image: debian:bookworm
20+
options: --platform ${{ matrix.platform }}
21+
strategy:
22+
matrix:
23+
include:
24+
- arch: amd64
25+
runner: ubuntu-24.04
26+
platform: linux/amd64
27+
artifact: x86-64
28+
29+
steps:
30+
- name: Checkout main repository code
31+
uses: actions/checkout@v4
32+
with:
33+
ref: 'develop'
34+
35+
- name: Checkout dependency repository (xengine)
36+
uses: actions/checkout@v4
37+
with:
38+
repository: libxengine/libxengine
39+
path: libxengine
40+
41+
- name: sub module checkout (opensource)
42+
uses: actions/checkout@v4
43+
with:
44+
repository: libxengine/XEngine_OPenSource
45+
path: XEngine_Source/XEngine_Depend
46+
47+
- name: Set TERM variable
48+
run: echo "TERM=xterm" >> $GITHUB_ENV
49+
50+
- name: install system package
51+
run: |
52+
apt update -y
53+
apt install gcc g++ make git jq unzip curl wget -y
54+
apt install libsrt-gnutls-dev libsrtp2-dev -y
55+
56+
- name: install xengine library
57+
run: |
58+
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
59+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Debian_12_${{ matrix.artifact }}.zip
60+
unzip ./XEngine_Debian_12_${{ matrix.artifact }}.zip -d ./XEngine_Debian_12_${{ matrix.artifact }}
61+
cd XEngine_Debian_12_${{ matrix.artifact }}
62+
63+
chmod 777 *
64+
./XEngine_LINEnv.sh -i 3
65+
- name: make
66+
run: |
67+
cd XEngine_Source
68+
make
69+
make FLAGS=InstallAll
70+
make FLAGS=CleanAll
71+
72+
make RELEASE=1
73+
make FLAGS=InstallAll
74+
make FLAGS=CleanAll
75+
cd ..
76+
- name: test
77+
run: |
78+
cd XEngine_Release
79+
./XEngine_StreamMediaApp -t
80+
81+
- name: Upload folder as artifact
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: XEngine_StreamMediaApp-Debian_12_x86-64
85+
path: XEngine_Release/
86+
retention-days: 1

0 commit comments

Comments
 (0)