Skip to content

Commit a6a05ba

Browse files
authored
Merge pull request #45 from libxengine/develop
V3.15.0.1001 Merge
2 parents a87737e + 2470bfd commit a6a05ba

Some content is hidden

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

61 files changed

+2101
-131
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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+
cp -rf ./XEngine_Include /usr/local/include
58+
find ./XEngine_Linux -name "*.so" -exec cp {} /usr/lib64 \;
59+
ldconfig
60+
cd ..
61+
62+
cd XEngine_Source
63+
make ARCH=Arm64 RELEASE=1
64+
make FLAGS=InstallAll
65+
make FLAGS=CleanAll
66+
cd ..
67+
68+
cd XEngine_Release
69+
./XEngine_MQServiceApp -t
70+
chown -R $(id -u):$(id -g) .
71+
chmod -R a+r . '
72+
73+
- name: Upload folder as artifact with RockyLinux
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: XEngine_MQServiceApp-RockyLinux_9_Arm64
77+
path: XEngine_Release/
78+
retention-days: 1
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
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+
- name: install xengine library
52+
run: |
53+
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
54+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_9_x86-64.zip
55+
unzip ./XEngine_RockyLinux_9_x86-64.zip -d ./XEngine_RockyLinux_9_x86-64
56+
cd XEngine_RockyLinux_9_x86-64
57+
58+
cp -rf ./XEngine_Include /usr/local/include
59+
find ./XEngine_Linux -name "*.so" -exec cp {} /usr/lib64 \;
60+
ldconfig
61+
62+
- name: make
63+
run: |
64+
cd XEngine_Source
65+
make
66+
make FLAGS=InstallAll
67+
make FLAGS=CleanAll
68+
69+
make RELEASE=1
70+
make FLAGS=InstallAll
71+
make FLAGS=CleanAll
72+
73+
- name: test
74+
run: |
75+
cd XEngine_Release
76+
./XEngine_MQServiceApp -t
77+
78+
- name: Upload folder as artifact with RockyLinux
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: XEngine_MQServiceApp-RockyLinux_9_x86_64
82+
path: XEngine_Release/
83+
retention-days: 1
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
41+
git config --global --add safe.directory /workspace
42+
git submodule init
43+
git submodule update
44+
45+
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
46+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_UBuntu_24.04_Arm64.zip
47+
unzip ./XEngine_UBuntu_24.04_Arm64.zip -d ./XEngine_UBuntu_24.04_Arm64
48+
cd XEngine_UBuntu_24.04_Arm64
49+
50+
chmod 777 ./XEngine_LINEnv.sh
51+
./XEngine_LINEnv.sh -i 0
52+
53+
cp -rf ./XEngine_Include /usr/local/include
54+
find ./XEngine_Linux -name "*.so" -exec cp {} /usr/local/lib \;
55+
ldconfig
56+
cd ..
57+
58+
cd XEngine_Source
59+
make ARCH=Arm64 RELEASE=1
60+
make FLAGS=InstallAll
61+
make FLAGS=CleanAll
62+
cd ..
63+
64+
cd XEngine_Release
65+
./XEngine_MQServiceApp -t
66+
chown -R $(id -u):$(id -g) .
67+
chmod -R a+r . '
68+
69+
- name: Upload folder as artifact with ubuntu Arm64
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: XEngine_MQServiceApp-Ubuntu_24.04_Arm64
73+
path: XEngine_Release/
74+
retention-days: 1
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ubuntu build workflows
1+
name: ubuntu x86_64 build workflows
22

33
on:
44
push:
@@ -78,11 +78,13 @@ jobs:
7878
if: matrix.os == 'ubuntu-22.04'
7979
uses: actions/upload-artifact@v4
8080
with:
81-
name: XEngine_MQServiceApp-x86_64-Ubuntu-22.04
81+
name: XEngine_MQServiceApp-Ubuntu_22.04_x86_64
8282
path: XEngine_Release/
83+
retention-days: 1
8384
- name: Upload folder as artifact with ubuntu24.04
8485
if: matrix.os == 'ubuntu-24.04'
8586
uses: actions/upload-artifact@v4
8687
with:
87-
name: XEngine_MQServiceApp-x86_64-Ubuntu-24.04
88-
path: XEngine_Release/
88+
name: XEngine_MQServiceApp-Ubuntu_24.04_x86_64
89+
path: XEngine_Release/
90+
retention-days: 1

.github/workflows/macbuild.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,13 @@ jobs:
8383
if: matrix.os == 'macos-13'
8484
uses: actions/upload-artifact@v4
8585
with:
86-
name: XEngine_MQServiceApp-x86_64-Mac
86+
name: XEngine_MQServiceApp-Mac_x86_64
8787
path: XEngine_Release/
88+
retention-days: 1
8889
- name: Upload folder as artifact with mac arm
8990
if: matrix.os == 'macos-14'
9091
uses: actions/upload-artifact@v4
9192
with:
92-
name: XEngine_MQServiceApp-Arm64-Mac
93-
path: XEngine_Release/
93+
name: XEngine_MQServiceApp-Mac_Arm64
94+
path: XEngine_Release/
95+
retention-days: 1

.github/workflows/msbuild.yml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
configuration: [Debug ,Release]
18-
platform: [x86 ,x64]
18+
platform: [x86 ,x64 ,ARM64]
1919

2020
runs-on: windows-latest
2121

@@ -57,6 +57,20 @@ jobs:
5757
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
5858
echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
5959
shell: pwsh
60+
- name: Set up Dependency ARM64 Environment
61+
if: matrix.platform == 'ARM64'
62+
run: |
63+
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
64+
$latest_tag = $response.tag_name
65+
Write-Host "Latest Tag: $latest_tag"
66+
67+
$url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_Arm64.zip"
68+
Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_Arm64.zip"
69+
Expand-Archive -Path ./XEngine_Windows_Arm64.zip -DestinationPath ./XEngine_Windows -Force
70+
71+
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
72+
echo "XENGINE_LibArm64=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
73+
shell: pwsh
6074

6175
- name: Setup MSBuild
6276
uses: microsoft/setup-msbuild@v2
@@ -83,17 +97,34 @@ jobs:
8397
cd XEngine_Release
8498
./VSCopy_x64.bat
8599
shell: pwsh
100+
- name: Conditional Step for Arm64 Release
101+
if: matrix.configuration == 'Release' && matrix.platform == 'Arm64'
102+
run: |
103+
cp -r XEngine_Source/ARM64/Release/*.dll XEngine_Release/
104+
cp -r XEngine_Source/ARM64/Release/*.exe XEngine_Release/
105+
cp -r XEngine_Source/VSCopy_Arm64.bat XEngine_Release/
106+
cd XEngine_Release
107+
./VSCopy_Arm64.bat
108+
shell: pwsh
86109

87110
- name: Upload folder as artifact with x86
88111
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
89112
uses: actions/upload-artifact@v4
90113
with:
91-
name: XEngine_MQServiceApp-x86_32-Windows
114+
name: XEngine_MQServiceApp-Windows_x86_32
92115
path: XEngine_Release/
93-
116+
retention-days: 1
94117
- name: Upload folder as artifact with x64
95118
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
96119
uses: actions/upload-artifact@v4
97120
with:
98-
name: XEngine_MQServiceApp-x86_64-Windows
99-
path: XEngine_Release/
121+
name: XEngine_MQServiceApp-Windows_x86_64
122+
path: XEngine_Release/
123+
retention-days: 1
124+
- name: Upload folder as artifact with Arm64
125+
if: matrix.configuration == 'Release' && matrix.platform == 'Arm64'
126+
uses: actions/upload-artifact@v4
127+
with:
128+
name: XEngine_MQServiceApp-Windows_Arm64
129+
path: XEngine_Release/
130+
retention-days: 1

.github/workflows/release.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,37 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818

19-
- name: Download ubuntubuild
19+
- name: Download ubuntubuild x86_64
2020
uses: dawidd6/action-download-artifact@v6
2121
with:
22-
workflow: ubuntubuild.yml
22+
workflow: UbuntuX86_64_build.yml
23+
workflow_conclusion: success
24+
check_artifacts: false
25+
skip_unpack: true
26+
if_no_artifact_found: fail
27+
path: ./XRelease/
28+
- name: Download ubuntubuild Arm64
29+
uses: dawidd6/action-download-artifact@v6
30+
with:
31+
workflow: UbuntuArm64_build.yml
32+
workflow_conclusion: success
33+
check_artifacts: false
34+
skip_unpack: true
35+
if_no_artifact_found: fail
36+
path: ./XRelease/
37+
- name: Download Rockylinux Arm64
38+
uses: dawidd6/action-download-artifact@v6
39+
with:
40+
workflow: RockyArm64_build.yml
41+
workflow_conclusion: success
42+
check_artifacts: false
43+
skip_unpack: true
44+
if_no_artifact_found: fail
45+
path: ./XRelease/
46+
- name: Download Rockylinux x86_64
47+
uses: dawidd6/action-download-artifact@v6
48+
with:
49+
workflow: RockyX86_64_build.yml
2350
workflow_conclusion: success
2451
check_artifacts: false
2552
skip_unpack: true

0 commit comments

Comments
 (0)