Skip to content

Commit c1906f0

Browse files
committed
added:new ci release system supported
1 parent 9d11f89 commit c1906f0

8 files changed

Lines changed: 236 additions & 11 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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_AuthorizeService -t '
70+
71+
- name: Upload folder as artifact with RockyLinux
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: XEngine_AuthorizeService-RockyLinux-9-Arm64
75+
path: XEngine_Release/
76+
retention-days: 1
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: rocky build workflows
1+
name: rocky x86_64 build workflows
22

33
on:
44
push:
@@ -78,6 +78,6 @@ jobs:
7878
- name: Upload folder as artifact with RockyLinux
7979
uses: actions/upload-artifact@v4
8080
with:
81-
name: XEngine_AuthorizeService-x86_64-RockyLinux-9
81+
name: XEngine_AuthorizeService-RockyLinux-9-x86_64
8282
path: XEngine_Release/
8383
retention-days: 1
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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_AuthorizeService -t '
66+
67+
- name: Upload folder as artifact with ubuntu Arm64
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: XEngine_AuthorizeService-Ubuntu-24.04-Arm64
71+
path: XEngine_Release/
72+
retention-days: 1
Lines changed: 2 additions & 2 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:
@@ -86,6 +86,6 @@ jobs:
8686
if: matrix.os == 'ubuntu-24.04'
8787
uses: actions/upload-artifact@v4
8888
with:
89-
name: XEngine_AuthorizeService-x86_64-Ubuntu-24.04
89+
name: XEngine_AuthorizeService-Ubuntu-24.04-x86_64
9090
path: XEngine_Release/
9191
retention-days: 1

.github/workflows/macbuild.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,6 @@ jobs:
9191
if: matrix.os == 'macos-14'
9292
uses: actions/upload-artifact@v4
9393
with:
94-
name: XEngine_AuthorizeService-Arm64-Mac
94+
name: XEngine_AuthorizeService-Mac-Arm64
9595
path: XEngine_Release/
9696
retention-days: 1

.github/workflows/msbuild.yml

Lines changed: 34 additions & 4 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 # 最新的 Windows 环境
2121

@@ -59,7 +59,21 @@ jobs:
5959
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
6060
echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
6161
shell: pwsh
62-
62+
- name: Set up Dependency ARM64 Environment
63+
if: matrix.platform == 'ARM64'
64+
run: |
65+
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
66+
$latest_tag = $response.tag_name
67+
Write-Host "Latest Tag: $latest_tag"
68+
69+
$url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_Arm64.zip"
70+
Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_Arm64.zip"
71+
Expand-Archive -Path ./XEngine_Windows_Arm64.zip -DestinationPath ./XEngine_Windows -Force
72+
73+
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
74+
echo "XENGINE_LibArm64=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
75+
shell: pwsh
76+
6377
- name: Setup MSBuild
6478
uses: microsoft/setup-msbuild@v2
6579

@@ -85,18 +99,34 @@ jobs:
8599
cd XEngine_Release
86100
./VSCopy_x64.bat
87101
shell: pwsh
102+
- name: Conditional Step for Arm64 Release
103+
if: matrix.configuration == 'Release' && matrix.platform == 'Arm64'
104+
run: |
105+
cp -r XEngine_Source/ARM64/Release/*.dll XEngine_Release/
106+
cp -r XEngine_Source/ARM64/Release/*.exe XEngine_Release/
107+
cp -r XEngine_Source/VSCopy_Arm64.bat XEngine_Release/
108+
cd XEngine_Release
109+
./VSCopy_Arm64.bat
110+
shell: pwsh
88111

89112
- name: Upload folder as artifact with x86
90113
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
91114
uses: actions/upload-artifact@v4
92115
with:
93-
name: XEngine_AuthorizeService-x86_32-Windows
116+
name: XEngine_AuthorizeService-Windows-x86_32
94117
path: XEngine_Release/
95118
retention-days: 1
96119
- name: Upload folder as artifact with x64
97120
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
98121
uses: actions/upload-artifact@v4
99122
with:
100-
name: XEngine_AuthorizeService-x86_64-Windows
123+
name: XEngine_AuthorizeService-Windows-x86_64
124+
path: XEngine_Release/
125+
retention-days: 1
126+
- name: Upload folder as artifact with Arm64
127+
if: matrix.configuration == 'Release' && matrix.platform == 'Arm64'
128+
uses: actions/upload-artifact@v4
129+
with:
130+
name: XEngine_AuthorizeService-Windows-Arm64
101131
path: XEngine_Release/
102132
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 Ubuntu x86_64 build
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 Ubuntu Arm64 build
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 x86_64 build
38+
uses: dawidd6/action-download-artifact@v6
39+
with:
40+
workflow: RockyX86_64_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 Arm64 build
47+
uses: dawidd6/action-download-artifact@v6
48+
with:
49+
workflow: RockyArm64_build.yml
2350
workflow_conclusion: success
2451
check_artifacts: false
2552
skip_unpack: true

XEngine_Source/VSCopy_Arm64.bat

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_BaseLib.dll" "./"
2+
copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_BaseSafe.dll" "./"
3+
copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_Algorithm.dll" "./"
4+
copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_Core.dll" "./"
5+
copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_ManagePool.dll" "./"
6+
copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_Cryption.dll" "./"
7+
8+
copy /y "%XEngine_Lib64%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./"
9+
copy /y "%XEngine_Lib64%\XEngine_NetHelp\NetHelp_APIAddr.dll" "./"
10+
11+
copy /y "%XEngine_Lib64%\XEngine_HelpComponents\HelpComponents_DataBase.dll" "./"
12+
copy /y "%XEngine_Lib64%\XEngine_HelpComponents\HelpComponents_Packets.dll" "./"
13+
copy /y "%XEngine_Lib64%\XEngine_HelpComponents\HelpComponents_XLog.dll" "./"
14+
15+
copy /y "%XEngine_Lib64%\XEngine_RfcComponents\RfcComponents_WSProtocol.dll" "./"
16+
copy /y "%XEngine_Lib64%\XEngine_RfcComponents\RfcComponents_HttpProtocol.dll" "./"
17+
18+
copy /y "%XEngine_Lib64%\XEngine_Client\XClient_APIHelp.dll" "./"
19+
copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
20+
copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemConfig.dll" "./"

0 commit comments

Comments
 (0)