Skip to content

Commit a87737e

Browse files
authored
Merge pull request #43 from libxengine/develop
V3.14.0.1001 Merge
2 parents c879c85 + 0d8fe24 commit a87737e

File tree

71 files changed

+1219
-343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1219
-343
lines changed

.github/workflows/codeql.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CodeQL Advanced
2+
3+
on:
4+
push:
5+
branches:
6+
- 'develop'
7+
paths:
8+
- 'XEngine_Source/**'
9+
- 'XEngine_Release/**'
10+
- '.github/**'
11+
12+
jobs:
13+
analyze:
14+
runs-on: ubuntu-24.04
15+
permissions:
16+
security-events: write
17+
packages: read
18+
actions: read
19+
contents: read
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
include:
25+
- language: c-cpp
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
ref: 'develop'
31+
32+
- name: Checkout dependency repository (xengine)
33+
uses: actions/checkout@v4
34+
with:
35+
repository: libxengine/libxengine
36+
path: libxengine
37+
38+
- name: sub module checkout (opensource)
39+
run: |
40+
git submodule init
41+
git submodule update
42+
43+
- name: Set up Dependency Environment
44+
run: |
45+
cd libxengine
46+
chmod +x ./XEngine_LINEnv.sh
47+
sudo ./XEngine_LINEnv.sh -i 3
48+
49+
- name: Initialize CodeQL
50+
uses: github/codeql-action/init@v3
51+
with:
52+
languages: ${{ matrix.language }}
53+
54+
- name: make
55+
run: |
56+
cd XEngine_Source
57+
make
58+
59+
- name: Perform CodeQL Analysis
60+
uses: github/codeql-action/analyze@v3
61+
with:
62+
category: "/language:${{ matrix.language }}"

.github/workflows/cppcheck.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: cpp check 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+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout main repository code
18+
uses: actions/checkout@v4
19+
with:
20+
ref: 'develop'
21+
22+
- name: Create static_analysis directory
23+
run: mkdir -p static_analysis
24+
25+
- name: Run Cppcheck
26+
run: |
27+
sudo apt-get install -y cppcheck
28+
cppcheck --enable=all --language=c++ --std=c++20 ./XEngine_Source/ --output-file=static_analysis/log.xml --xml
29+
continue-on-error: true
30+
31+
- name: Upload Cppcheck Results
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: cppcheck_results
35+
path: static_analysis/log.xml

.github/workflows/linuxbuild.yml

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

.github/workflows/macbuild.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ name: macos build workflows
22

33
on:
44
push:
5-
branches: [ "develop" ]
5+
branches:
6+
- 'develop'
67
paths:
78
- 'XEngine_Source/**'
89
- 'XEngine_Release/**'
9-
10-
permissions:
11-
contents: read
10+
- '.github/**'
1211

1312
jobs:
1413
build:
1514
strategy:
1615
matrix:
1716
include:
1817
- os: macos-13
18+
- os: macos-14
1919
runs-on: ${{ matrix.os }}
2020

2121
steps:
@@ -24,7 +24,6 @@ jobs:
2424
with:
2525
ref: 'develop'
2626

27-
# 检出依赖的xengine仓库到指定的xengine目录
2827
- name: Checkout dependency repository (xengine)
2928
uses: actions/checkout@v4
3029
with:
@@ -39,14 +38,30 @@ jobs:
3938
- name: brew install
4039
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
4140

42-
# 设置依赖库的环境变量
43-
- name: Set up Dependency Environment Variables
41+
- name: Set up Dependency x86_64 Environment
42+
if: matrix.os == 'macos-13'
4443
run: |
4544
cd libxengine
4645
chmod 777 *
4746
./XEngine_LINEnv.sh -i 3
48-
cd ..
49-
#编译
47+
- name: Set up Dependency Arm64 Environment
48+
if: matrix.os == 'macos-14'
49+
run: |
50+
cd libxengine
51+
chmod 777 *
52+
./XEngine_LINEnv.sh -i 0
53+
54+
latest_tag=$(git ls-remote --tags --sort="v:refname" https://github.com/libxengine/libxengine.git | awk '{print $2}' | sed 's/refs\/tags\///' | tail -n 1)
55+
56+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Mac_Arm64.zip
57+
unzip ./XEngine_Mac_Arm64.zip -d ./XEngine_Mac_Arm64
58+
cd XEngine_Mac_Arm64
59+
60+
sudo mkdir -p /usr/local/include
61+
sudo mkdir -p /usr/local/lib
62+
sudo cp -rf ./XEngine_Include /usr/local/include
63+
sudo find ./XEngine_Mac -name "*.dylib" -exec cp {} /usr/local/lib \;
64+
5065
- name: make debug
5166
run: |
5267
cd XEngine_Source
@@ -64,8 +79,15 @@ jobs:
6479
cd XEngine_Release
6580
./XEngine_MQServiceApp -t
6681
67-
- name: Upload folder as artifact with mac
82+
- name: Upload folder as artifact with mac x64
83+
if: matrix.os == 'macos-13'
6884
uses: actions/upload-artifact@v4
6985
with:
7086
name: XEngine_MQServiceApp-x86_64-Mac
87+
path: XEngine_Release/
88+
- name: Upload folder as artifact with mac arm
89+
if: matrix.os == 'macos-14'
90+
uses: actions/upload-artifact@v4
91+
with:
92+
name: XEngine_MQServiceApp-Arm64-Mac
7193
path: XEngine_Release/

.github/workflows/msbuild.yml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,68 @@ name: windows build workflows
22

33
on:
44
push:
5-
branches: [ "develop" ]
5+
branches:
6+
- 'develop'
67
paths:
78
- 'XEngine_Source/**'
89
- 'XEngine_Release/**'
9-
10-
permissions:
11-
contents: read
10+
- '.github/**'
1211

1312
jobs:
1413
build:
1514
strategy:
16-
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
1715
fail-fast: false
1816
matrix:
1917
configuration: [Debug ,Release]
2018
platform: [x86 ,x64]
2119

22-
runs-on: windows-latest # 最新的 Windows 环境
20+
runs-on: windows-latest
2321

2422
steps:
25-
# 检出您的主仓库代码
2623
- name: Checkout main repository code
2724
uses: actions/checkout@v4
2825
with:
2926
ref: 'develop'
3027

31-
# 检出依赖的xengine仓库到指定的xengine目录
3228
- name: Checkout dependency repository (xengine)
3329
uses: actions/checkout@v4
3430
with:
3531
repository: libxengine/libxengine
36-
path: xengine
32+
path: libxengine
3733

3834
- name: sub module checkout (opensource)
3935
run: |
4036
git submodule init
4137
git submodule update
4238
shell: pwsh
4339

44-
# 设置依赖库的环境变量
45-
- name: Set up Dependency Environment Variables
40+
- name: Set up Dependency x86_64 Environment
41+
if: matrix.platform == 'x64'
42+
run: |
43+
echo "XENGINE_INCLUDE=${{ github.workspace }}/libxengine" | Out-File -FilePath $env:GITHUB_ENV -Append
44+
echo "XENGINE_LIB64=${{ github.workspace }}/libxengine/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
45+
shell: pwsh
46+
- name: Set up Dependency x86_32 Environment
47+
if: matrix.platform == 'x86'
4648
run: |
47-
echo "XENGINE_INCLUDE=${{ github.workspace }}/xengine" | Out-File -FilePath $env:GITHUB_ENV -Append
48-
echo "XENGINE_LIB32=${{ github.workspace }}/xengine/XEngine_Windows/x86" | Out-File -FilePath $env:GITHUB_ENV -Append
49-
echo "XENGINE_LIB64=${{ github.workspace }}/xengine/XEngine_Windows/x64" | Out-File -FilePath $env:GITHUB_ENV -Append
49+
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
50+
$latest_tag = $response.tag_name
51+
Write-Host "Latest Tag: $latest_tag"
52+
53+
$url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_x86-32.zip"
54+
Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_x86-32.zip"
55+
Expand-Archive -Path ./XEngine_Windows_x86-32.zip -DestinationPath ./XEngine_Windows -Force
56+
57+
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
58+
echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
5059
shell: pwsh
5160

52-
# 配置 MSBuild 的路径,准备构建 VC++ 项目
5361
- name: Setup MSBuild
5462
uses: microsoft/setup-msbuild@v2
55-
#编译
63+
5664
- name: Build Solution
5765
run: msbuild XEngine_Source/XEngine_MQServiceApp.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
58-
#测试
66+
5967
- name: Conditional Step for x86 Release
6068
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
6169
run: |
@@ -66,7 +74,7 @@ jobs:
6674
./VSCopy_x86.bat
6775
./XEngine_MQServiceApp.exe -t
6876
shell: pwsh
69-
- name: Conditional Step for x86 Debug
77+
- name: Conditional Step for x64 Release
7078
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
7179
run: |
7280
cp -r XEngine_Source/x64/Release/*.dll XEngine_Release/

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818

19-
- name: Download linuxbuild
19+
- name: Download ubuntubuild
2020
uses: dawidd6/action-download-artifact@v6
2121
with:
22-
workflow: linuxbuild.yml
22+
workflow: ubuntubuild.yml
2323
workflow_conclusion: success
2424
check_artifacts: false
2525
skip_unpack: true

0 commit comments

Comments
 (0)