Skip to content

Commit 3c24cdd

Browse files
committed
ci:add rocky release support
1 parent c5bf757 commit 3c24cdd

File tree

3 files changed

+167
-2
lines changed

3 files changed

+167
-2
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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+
dnf install lua-devel opencv-devel qrencode-devel leptonica-devel tesseract-devel -y
58+
59+
cp -rf ./XEngine_Include /usr/local/include
60+
find ./XEngine_Linux -name "*.so" -exec cp {} /usr/lib64 \;
61+
ldconfig
62+
cd ..
63+
64+
cd XEngine_Source
65+
make ARCH=Arm64 RELEASE=1
66+
make FLAGS=InstallAll
67+
make FLAGS=CleanAll
68+
cd ..
69+
70+
cd XEngine_Release
71+
./XEngine_APIServiceApp -t
72+
chown -R $(id -u):$(id -g) .
73+
chmod -R a+r . '
74+
75+
- name: Upload folder as artifact with RockyLinux
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: XEngine_APIServiceApp-RockyLinux_9_Arm64
79+
path: XEngine_Release/
80+
retention-days: 1
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: rocky x86_64 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+
dnf install lua-devel opencv-devel qrencode-devel leptonica-devel tesseract-devel -y
52+
53+
- name: install xengine library
54+
run: |
55+
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
56+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_9_x86-64.zip
57+
unzip ./XEngine_RockyLinux_9_x86-64.zip -d ./XEngine_RockyLinux_9_x86-64
58+
cd XEngine_RockyLinux_9_x86-64
59+
60+
cp -rf ./XEngine_Include /usr/local/include
61+
find ./XEngine_Linux -name "*.so" -exec cp {} /usr/lib64 \;
62+
ldconfig
63+
64+
- name: make
65+
run: |
66+
cd XEngine_Source
67+
make
68+
make FLAGS=InstallAll
69+
make FLAGS=CleanAll
70+
71+
make RELEASE=1
72+
make FLAGS=InstallAll
73+
make FLAGS=CleanAll
74+
75+
- name: test
76+
run: |
77+
cd XEngine_Release
78+
./XEngine_APIServiceApp -t
79+
80+
- name: Upload folder as artifact with RockyLinux
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: XEngine_APIServiceApp-RockyLinux_9_x86_64
84+
path: XEngine_Release/
85+
retention-days: 1

.github/workflows/Ubuntux86_64_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ jobs:
8989
if: matrix.os == 'ubuntu-22.04'
9090
uses: actions/upload-artifact@v4
9191
with:
92-
name: XEngine_APIServiceApp-x86_64_Ubuntu_22.04
92+
name: XEngine_APIServiceApp-Ubuntu_22.04_x86_64
9393
path: XEngine_Release/
9494
retention-days: 1
9595

9696
- name: Upload folder as artifact with ubuntu24.04
9797
if: matrix.os == 'ubuntu-24.04'
9898
uses: actions/upload-artifact@v4
9999
with:
100-
name: XEngine_APIServiceApp-x86_64_Ubuntu_24.04
100+
name: XEngine_APIServiceApp-Ubuntu_24.04_x86_64
101101
path: XEngine_Release/
102102
retention-days: 1

0 commit comments

Comments
 (0)