Skip to content

Commit 55897e7

Browse files
committed
ci:add centos build support
1 parent d04cbb7 commit 55897e7

File tree

3 files changed

+113
-2
lines changed

3 files changed

+113
-2
lines changed

.github/workflows/Centos_build.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: centos 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: ${{ matrix.runner }}
18+
container:
19+
image: quay.io/centos/centos:${{ matrix.stream }}
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+
version: 9
29+
stream: stream9
30+
- arch: amd64
31+
runner: ubuntu-24.04
32+
platform: linux/amd64
33+
artifact: x86-64
34+
version: 10
35+
stream: stream10
36+
- arch: arm64
37+
runner: ubuntu-24.04-arm
38+
platform: linux/arm64
39+
artifact: Arm64
40+
version: 9
41+
stream: stream9
42+
- arch: arm64
43+
runner: ubuntu-24.04-arm
44+
platform: linux/arm64
45+
artifact: Arm64
46+
version: 10
47+
stream: stream10
48+
49+
steps:
50+
- name: Checkout main repository code
51+
uses: actions/checkout@v4
52+
53+
- name: Checkout dependency repository (xengine)
54+
uses: actions/checkout@v4
55+
with:
56+
repository: libxengine/libxengine
57+
path: libxengine
58+
59+
- name: sub module checkout (opensource)
60+
uses: actions/checkout@v4
61+
with:
62+
repository: libxengine/XEngine_OPenSource
63+
path: XEngine_Source/XEngine_DependLibrary
64+
65+
- name: install system package
66+
run: |
67+
dnf update -y
68+
dnf install gcc g++ make git jq unzip wget -y
69+
70+
- name: Set TERM variable
71+
run: echo "TERM=xterm" >> $GITHUB_ENV
72+
73+
- name: install xengine library
74+
run: |
75+
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
76+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}.zip
77+
unzip ./XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}.zip -d ./XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
78+
cd XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
79+
80+
chmod 777 *
81+
./XEngine_LINEnv.sh -i 3
82+
- name: make
83+
run: |
84+
cd XEngine_Source
85+
make
86+
make FLAGS=InstallAll
87+
make FLAGS=CleanAll
88+
89+
make RELEASE=1
90+
make FLAGS=InstallAll
91+
make FLAGS=CleanAll
92+
- name: test
93+
run: |
94+
cd XEngine_Release
95+
./XEngine_MQServiceApp -t
96+
97+
- name: Upload folder as artifact with CentOS
98+
uses: actions/upload-artifact@v4
99+
with:
100+
name: XEngine_MQServiceApp-RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
101+
path: XEngine_Release/
102+
retention-days: 1

.github/workflows/Rocky_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ jobs:
9494
cd XEngine_Release
9595
./XEngine_MQServiceApp -t
9696
97-
- name: Upload folder as artifact with RockyLinux
97+
- name: Upload folder as artifact with CentOS
9898
uses: actions/upload-artifact@v4
9999
with:
100-
name: XEngine_MQServiceApp-RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
100+
name: XEngine_MQServiceApp-CentOS_${{ matrix.version }}_${{ matrix.artifact }}
101101
path: XEngine_Release/
102102
retention-days: 1

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ jobs:
5252
skip_unpack: true
5353
if_no_artifact_found: fail
5454
path: ./XRelease/
55+
- name: Download CentOS
56+
uses: dawidd6/action-download-artifact@v6
57+
with:
58+
workflow: Centos_build.yml
59+
workflow_conclusion: success
60+
check_artifacts: false
61+
skip_unpack: true
62+
if_no_artifact_found: fail
63+
path: ./XRelease/
5564
- name: Download macbuild
5665
uses: dawidd6/action-download-artifact@v6
5766
with:

0 commit comments

Comments
 (0)