Skip to content

Commit 51e8c3c

Browse files
committed
ci:more release build support
1 parent aa0a1d6 commit 51e8c3c

File tree

7 files changed

+248
-269
lines changed

7 files changed

+248
-269
lines changed

.github/workflows/RockyArm64_build.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.
Lines changed: 19 additions & 10 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:
@@ -42,18 +52,17 @@ jobs:
4252
run: |
4353
dnf update -y
4454
dnf install gcc g++ make git jq unzip -y
45-
# 设置依赖库的环境变量
4655
- name: Set up Dependency rocky linux Environment
4756
run: |
4857
cd libxengine
4958
chmod 777 *
5059
./XEngine_LINEnv.sh -i 0
5160
- name: install xengine library
52-
run: |
61+
run: |
5362
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
63+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_9_${{ matrix.artifact }}.zip
64+
unzip ./XEngine_RockyLinux_9_${{ matrix.artifact }}.zip -d ./XEngine_RockyLinux_9_${{ matrix.artifact }}
65+
cd XEngine_RockyLinux_9_${{ matrix.artifact }}
5766
5867
cp -rf ./XEngine_Include /usr/local/include
5968
find ./XEngine_Linux -name "*.so" -exec cp {} /usr/lib64 \;
@@ -78,6 +87,6 @@ jobs:
7887
- name: Upload folder as artifact with RockyLinux
7988
uses: actions/upload-artifact@v4
8089
with:
81-
name: XEngine_ProxyServiceApp-RockyLinux_9_x86_64
90+
name: XEngine_ProxyServiceApp-RockyLinux_9_${{ matrix.artifact }}
8291
path: XEngine_Release/
8392
retention-days: 1

.github/workflows/UbuntuArm64_build.yml

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

.github/workflows/Ubuntu_build.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
name: ubuntu 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+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- os: ubuntu-22.04
19+
- os: ubuntu-24.04
20+
- os: ubuntu-22.04-arm
21+
- os: ubuntu-24.04-arm
22+
runs-on: ${{ matrix.os }}
23+
24+
steps:
25+
- name: Checkout main repository code
26+
uses: actions/checkout@v4
27+
with:
28+
ref: 'develop'
29+
30+
- name: Checkout dependency repository (xengine)
31+
uses: actions/checkout@v4
32+
with:
33+
repository: libxengine/libxengine
34+
path: libxengine
35+
36+
- name: sub module checkout (opensource)
37+
run: |
38+
git submodule init
39+
git submodule update
40+
41+
- name: Set up Dependency ubuntu24.04 x86-64 Environment
42+
if: matrix.os == 'ubuntu-24.04'
43+
run: |
44+
cd libxengine
45+
chmod 777 *
46+
sudo ./XEngine_LINEnv.sh -i 3
47+
- name: Set up Dependency ubuntu22.04 x86-64 Environment
48+
if: matrix.os == 'ubuntu-22.04'
49+
run: |
50+
cd libxengine
51+
chmod 777 *
52+
sudo ./XEngine_LINEnv.sh -i 0
53+
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_UBuntu_22.04_x86-64.zip
56+
unzip ./XEngine_UBuntu_22.04_x86-64.zip -d ./XEngine_UBuntu_22.04_x86-64
57+
cd XEngine_UBuntu_22.04_x86-64
58+
59+
sudo cp -rf ./XEngine_Include /usr/local/include
60+
sudo find ./XEngine_Linux -name "*.so" -exec cp {} /usr/local/lib \;
61+
sudo ldconfig
62+
- name: Set up Dependency ubuntu22.04 arm Environment
63+
if: matrix.os == 'ubuntu-22.04-arm'
64+
run: |
65+
cd libxengine
66+
chmod 777 *
67+
sudo ./XEngine_LINEnv.sh -i 0
68+
69+
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
70+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_UBuntu_22.04_Arm64.zip
71+
unzip ./XEngine_UBuntu_22.04_Arm64.zip -d ./XEngine_UBuntu_22.04_Arm64
72+
cd XEngine_UBuntu_22.04_Arm64
73+
74+
sudo cp -rf ./XEngine_Include /usr/local/include
75+
sudo find ./XEngine_Linux -name "*.so" -exec cp {} /usr/local/lib \;
76+
sudo ldconfig
77+
- name: Set up Dependency ubuntu24.04 arm Environment
78+
if: matrix.os == 'ubuntu-24.04-arm'
79+
run: |
80+
cd libxengine
81+
chmod 777 *
82+
sudo ./XEngine_LINEnv.sh -i 0
83+
84+
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
85+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_UBuntu_24.04_Arm64.zip
86+
unzip ./XEngine_UBuntu_24.04_Arm64.zip -d ./XEngine_UBuntu_24.04_Arm64
87+
cd XEngine_UBuntu_24.04_Arm64
88+
89+
sudo cp -rf ./XEngine_Include /usr/local/include
90+
sudo find ./XEngine_Linux -name "*.so" -exec cp {} /usr/local/lib \;
91+
sudo ldconfig
92+
93+
- name: make
94+
run: |
95+
cd XEngine_Source
96+
make
97+
make FLAGS=InstallAll
98+
make FLAGS=CleanAll
99+
100+
make RELEASE=1
101+
make FLAGS=InstallAll
102+
make FLAGS=CleanAll
103+
cd ..
104+
- name: test
105+
run: |
106+
cd XEngine_Release
107+
./XEngine_ProxyServiceApp -t
108+
109+
- name: Upload folder as artifact with ubuntu22.04 x86-64
110+
if: matrix.os == 'ubuntu-22.04'
111+
uses: actions/upload-artifact@v4
112+
with:
113+
name: XEngine_ProxyServiceApp-Ubuntu_22.04_x86_64
114+
path: XEngine_Release/
115+
retention-days: 1
116+
- name: Upload folder as artifact with ubuntu24.04 x86-64
117+
if: matrix.os == 'ubuntu-24.04'
118+
uses: actions/upload-artifact@v4
119+
with:
120+
name: XEngine_ProxyServiceApp-Ubuntu_24.04_x86_64
121+
path: XEngine_Release/
122+
retention-days: 1
123+
- name: Upload folder as artifact with ubuntu22.04 Arm64
124+
if: matrix.os == 'ubuntu-22.04-arm'
125+
uses: actions/upload-artifact@v4
126+
with:
127+
name: XEngine_ProxyServiceApp-Ubuntu_22.04_Arm64
128+
path: XEngine_Release/
129+
retention-days: 1
130+
- name: Upload folder as artifact with ubuntu24.04 Arm64
131+
if: matrix.os == 'ubuntu-24.04-arm'
132+
uses: actions/upload-artifact@v4
133+
with:
134+
name: XEngine_ProxyServiceApp-Ubuntu_24.04_Arm64
135+
path: XEngine_Release/
136+
retention-days: 1

0 commit comments

Comments
 (0)