Skip to content

Commit cc63f6c

Browse files
committed
ci:add rockylinux build
1 parent 0e741ab commit cc63f6c

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

.github/workflows/rockybuild.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: rocky 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+
52+
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
53+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_9_x86-64.zip
54+
unzip ./XEngine_RockyLinux_9_x86-64.zip -d ./XEngine_RockyLinux_9_x86-64
55+
cd XEngine_RockyLinux_9_x86-64
56+
57+
cp -rf ./XEngine_Include /usr/local/include
58+
find ./XEngine_Linux -name "*.so" -exec cp {} /usr/local/lib \;
59+
ldconfig
60+
#编译
61+
- name: make
62+
run: |
63+
cd XEngine_Source
64+
make
65+
make FLAGS=InstallAll
66+
make FLAGS=CleanAll
67+
68+
make RELEASE=1
69+
make FLAGS=InstallAll
70+
make FLAGS=CleanAll
71+
72+
- name: test
73+
run: |
74+
cd XEngine_Release
75+
./XEngine_AuthorizeService -t
76+
77+
- name: Upload folder as artifact with RockyLinux
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: XEngine_AuthorizeService-x86_64-RockyLinux-9
81+
path: XEngine_Release/
82+
retention-days: 1

0 commit comments

Comments
 (0)