Skip to content

Commit 0a871bc

Browse files
committed
ci:add rocky linux build
1 parent 3d6f00b commit 0a871bc

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/rockybuild.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: ubuntu build workflows
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
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
20+
21+
steps:
22+
# 检出您的主仓库代码
23+
- name: Checkout main repository code
24+
uses: actions/checkout@v4
25+
26+
# 检出依赖的xengine仓库到指定的xengine目录
27+
- name: Checkout dependency repository (xengine)
28+
uses: actions/checkout@v4
29+
with:
30+
repository: libxengine/libxengine
31+
path: libxengine
32+
33+
- name: sub module checkout (opensource)
34+
run: |
35+
git submodule init
36+
git submodule update
37+
38+
# 设置依赖库的环境变量
39+
- name: Set up Dependency rocky linux Environment
40+
run: |
41+
cd libxengine
42+
chmod 777 *
43+
sudo ./XEngine_LINEnv.sh -i 3
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_RockyLinux_9_x86-64.zip
47+
unzip ./XEngine_RockyLinux_9_x86-64.zip -d ./XEngine_RockyLinux_9_x86-64
48+
cd XEngine_RockyLinux_9_x86-64
49+
50+
sudo cp -rf ./XEngine_Include /usr/local/include
51+
sudo find ./XEngine_Linux -name "*.so" -exec cp {} /usr/local/lib \;
52+
sudo ldconfig
53+
#编译
54+
- name: make
55+
run: |
56+
cd XEngine_Source
57+
make
58+
make FLAGS=InstallAll
59+
make FLAGS=CleanAll
60+
61+
make RELEASE=1
62+
make FLAGS=InstallAll
63+
make FLAGS=CleanAll
64+
cd ..
65+
- name: test
66+
run: |
67+
cd XEngine_Release
68+
./XEngine_CenterApp -t
69+
./XEngine_Http2App -t
70+
./XEngine_HttpApp -t
71+
./XEngine_SimpleApp -t
72+
./XEngine_WebSocketApp -t

0 commit comments

Comments
 (0)