Skip to content

Commit 5764d47

Browse files
authored
Merge pull request #29 from libxengine/develop
Merge V2.11.0.1001
2 parents 5571c0c + 2f8966f commit 5764d47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

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

.github/workflows/macbuild.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ jobs:
8080
make PLATFORM=mac FLAGS=InstallAll
8181
make PLATFORM=mac FLAGS=CleanAll
8282
83-
- name: test (srt bug on macos-arm64,not run)
84-
if: matrix.os == 'macos-13'
83+
- name: test (srt bug on macos,not run)
8584
run: |
8685
cd XEngine_Release
8786
./XEngine_StreamMediaApp -t
@@ -90,13 +89,13 @@ jobs:
9089
if: matrix.os == 'macos-13'
9190
uses: actions/upload-artifact@v4
9291
with:
93-
name: XEngine_StreamMediaApp-x86_64-Mac
92+
name: XEngine_StreamMediaApp-Mac_x86_64
9493
path: XEngine_Release/
95-
retention-days: 3
94+
retention-days: 1
9695
- name: Upload folder as artifact with mac arm
9796
if: matrix.os == 'macos-14'
9897
uses: actions/upload-artifact@v4
9998
with:
100-
name: XEngine_StreamMediaApp-Arm64-Mac
99+
name: XEngine_StreamMediaApp-Mac_Arm64
101100
path: XEngine_Release/
102-
retention-days: 3
101+
retention-days: 1

.github/workflows/msbuild.yml

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
configuration: [Debug ,Release]
21-
platform: [x86 ,x64]
21+
platform: [x86 ,x64 ,ARM64]
2222

2323
runs-on: windows-latest
2424

@@ -62,6 +62,14 @@ jobs:
6262
./vcpkg.exe install libsrt:x64-windows libsrtp:x64-windows
6363
./vcpkg.exe integrate install
6464
shell: pwsh
65+
- name: vcpkg install (ARM64)
66+
if: matrix.platform == 'ARM64'
67+
run: |
68+
cd vcpkg
69+
./bootstrap-vcpkg.bat
70+
./vcpkg.exe install libsrt:Arm64-windows libsrtp:Arm64-windows
71+
./vcpkg.exe integrate install
72+
shell: pwsh
6573

6674
- name: Set up Dependency x86_64 Environment
6775
if: matrix.platform == 'x64'
@@ -83,6 +91,20 @@ jobs:
8391
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
8492
echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
8593
shell: pwsh
94+
- name: Set up Dependency ARM64 Environment
95+
if: matrix.platform == 'ARM64'
96+
run: |
97+
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
98+
$latest_tag = $response.tag_name
99+
Write-Host "Latest Tag: $latest_tag"
100+
101+
$url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_Arm64.zip"
102+
Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_Arm64.zip"
103+
Expand-Archive -Path ./XEngine_Windows_Arm64.zip -DestinationPath ./XEngine_Windows -Force
104+
105+
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
106+
echo "XENGINE_LIBARM64=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
107+
shell: pwsh
86108

87109
- name: Setup MSBuild
88110
uses: microsoft/setup-msbuild@v2
@@ -109,19 +131,35 @@ jobs:
109131
cd XEngine_Release
110132
.\VSCopy_x64.bat
111133
shell: pwsh
134+
- name: Conditional Step for ARM64 Release
135+
if: matrix.configuration == 'Release' && matrix.platform == 'ARM64'
136+
run: |
137+
cp -r XEngine_Source/ARM64/Release/*.dll XEngine_Release/
138+
cp -r XEngine_Source/ARM64/Release/*.exe XEngine_Release/
139+
cp -r XEngine_Source/VSCopy_Arm64.bat XEngine_Release/
140+
cd XEngine_Release
141+
.\VSCopy_Arm64.bat
142+
shell: pwsh
112143

113144
- name: Upload folder as artifact with x86
114145
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
115146
uses: actions/upload-artifact@v4
116147
with:
117-
name: XEngine_StreamMediaApp-x86_32-Windows
148+
name: XEngine_StreamMediaApp-Windows_x86_32
118149
path: XEngine_Release/
119-
retention-days: 3
150+
retention-days: 1
120151

121152
- name: Upload folder as artifact with x64
122153
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
123154
uses: actions/upload-artifact@v4
124155
with:
125-
name: XEngine_StreamMediaApp-x86_64-Windows
156+
name: XEngine_StreamMediaApp-Windows_x86_64
157+
path: XEngine_Release/
158+
retention-days: 1
159+
- name: Upload folder as artifact with ARM64
160+
if: matrix.configuration == 'Release' && matrix.platform == 'ARM64'
161+
uses: actions/upload-artifact@v4
162+
with:
163+
name: XEngine_StreamMediaApp-Windows_Arm64
126164
path: XEngine_Release/
127-
retention-days: 3
165+
retention-days: 1

0 commit comments

Comments
 (0)