Skip to content

Commit 9d3a02c

Browse files
committed
fixed:build error
1 parent a6f91e7 commit 9d3a02c

File tree

2 files changed

+159
-0
lines changed

2 files changed

+159
-0
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: rocky x86_64 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: ubuntu-latest
18+
container:
19+
image: rockylinux/rockylinux:9.5
20+
21+
steps:
22+
# 检出您的主仓库代码
23+
- name: Checkout main repository code
24+
uses: actions/checkout@v4
25+
with:
26+
ref: 'develop'
27+
28+
# 检出依赖的xengine仓库到指定的xengine目录
29+
- name: Checkout dependency repository (xengine)
30+
uses: actions/checkout@v4
31+
with:
32+
repository: libxengine/libxengine
33+
path: libxengine
34+
35+
- name: sub module checkout (opensource)
36+
uses: actions/checkout@v4
37+
with:
38+
repository: libxengine/XEngine_OPenSource
39+
path: XEngine_Source/XEngine_Depend
40+
41+
- name: install system package
42+
run: |
43+
dnf update -y
44+
dnf install gcc g++ make git jq unzip -y
45+
dnf install libsrtp-devel libsrt-devel -y
46+
# 设置依赖库的环境变量
47+
- name: Set up Dependency rocky linux Environment
48+
run: |
49+
cd libxengine
50+
chmod 777 *
51+
./XEngine_LINEnv.sh -i 0
52+
- name: install xengine library
53+
run: |
54+
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
55+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_9_x86-64.zip
56+
unzip ./XEngine_RockyLinux_9_x86-64.zip -d ./XEngine_RockyLinux_9_x86-64
57+
cd XEngine_RockyLinux_9_x86-64
58+
59+
cp -rf ./XEngine_Include /usr/local/include
60+
find ./XEngine_Linux -name "*.so" -exec cp {} /usr/lib64 \;
61+
ldconfig
62+
63+
- name: make
64+
run: |
65+
cd XEngine_Source
66+
make
67+
make FLAGS=InstallAll
68+
make FLAGS=CleanAll
69+
70+
make RELEASE=1
71+
make FLAGS=InstallAll
72+
make FLAGS=CleanAll
73+
74+
- name: test
75+
run: |
76+
cd XEngine_Release
77+
./XEngine_StreamMediaApp -t
78+
79+
- name: Upload folder as artifact with RockyLinux
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: XEngine_StreamMediaApp-RockyLinux_9_x86_64
83+
path: XEngine_Release/
84+
retention-days: 1
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: ubuntu Arm64 build workflows
2+
3+
on:
4+
push:
5+
branches:
6+
- 'develop'
7+
paths:
8+
- 'XEngine_Source/**'
9+
- 'XEngine_Release/**'
10+
- '.github/**'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-24.04
15+
env:
16+
IMAGE_NAME: ubuntu:24.04
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
arch: [linux/arm64]
22+
23+
steps:
24+
- name: Checkout main repository code
25+
uses: actions/checkout@v4
26+
with:
27+
ref: 'develop'
28+
29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@v3
31+
32+
- name: Build ${{ matrix.arch }}
33+
run: |
34+
docker run --platform ${{ matrix.arch }} --rm \
35+
-v ${{ github.workspace }}:/workspace \
36+
-w /workspace ${{ env.IMAGE_NAME }} /bin/sh -c '
37+
set -e
38+
apt update -y
39+
apt install git make g++ wget curl jq unzip -y
40+
apt install libsrt-gnutls-dev libsrtp2-dev -y
41+
42+
git config --global --add safe.directory /workspace
43+
git submodule init
44+
git submodule update
45+
46+
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
47+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_UBuntu_24.04_Arm64.zip
48+
unzip ./XEngine_UBuntu_24.04_Arm64.zip -d ./XEngine_UBuntu_24.04_Arm64
49+
cd XEngine_UBuntu_24.04_Arm64
50+
51+
chmod 777 ./XEngine_LINEnv.sh
52+
./XEngine_LINEnv.sh -i 0
53+
54+
cp -rf ./XEngine_Include /usr/local/include
55+
find ./XEngine_Linux -name "*.so" -exec cp {} /usr/local/lib \;
56+
ldconfig
57+
cd ..
58+
59+
cd XEngine_Source
60+
make ARCH=Arm64 RELEASE=1
61+
make FLAGS=InstallAll
62+
make FLAGS=CleanAll
63+
cd ..
64+
65+
cd XEngine_Release
66+
./XEngine_StreamMediaApp -t
67+
chown -R $(id -u):$(id -g) .
68+
chmod -R a+r . '
69+
70+
- name: Upload folder as artifact with ubuntu Arm64
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: XEngine_StreamMediaApp-Ubuntu_24.04_Arm64
74+
path: XEngine_Release/
75+
retention-days: 1

0 commit comments

Comments
 (0)