Skip to content

Commit 33e4082

Browse files
authored
Merge pull request #34 from libxengine/develop
V1.11.0.1001 Merge
2 parents f868bb2 + 72b37a2 commit 33e4082

File tree

61 files changed

+1120
-210
lines changed

Some content is hidden

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

61 files changed

+1120
-210
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/macbuild.yml

Lines changed: 33 additions & 11 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:
@@ -30,7 +30,6 @@ jobs:
3030
with:
3131
repository: libxengine/libxengine
3232
path: libxengine
33-
ref: 'master'
3433

3534
- name: sub module checkout (opensource)
3635
run: |
@@ -40,14 +39,30 @@ jobs:
4039
- name: brew install
4140
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
4241

43-
# 设置依赖库的环境变量
44-
- name: Set up Dependency Environment Variables
42+
- name: Set up Dependency x86_64 Environment
43+
if: matrix.os == 'macos-13'
4544
run: |
4645
cd libxengine
4746
chmod 777 *
4847
./XEngine_LINEnv.sh -i 3
49-
cd ..
50-
#编译
48+
- name: Set up Dependency Arm64 Environment
49+
if: matrix.os == 'macos-14'
50+
run: |
51+
cd libxengine
52+
chmod 777 *
53+
./XEngine_LINEnv.sh -i 0
54+
55+
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)
56+
57+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Mac_Arm64.zip
58+
unzip ./XEngine_Mac_Arm64.zip -d ./XEngine_Mac_Arm64
59+
cd XEngine_Mac_Arm64
60+
61+
sudo mkdir -p /usr/local/include
62+
sudo mkdir -p /usr/local/lib
63+
sudo cp -rf ./XEngine_Include /usr/local/include
64+
sudo find ./XEngine_Mac -name "*.dylib" -exec cp {} /usr/local/lib \;
65+
5166
- name: make debug
5267
run: |
5368
cd XEngine_Source
@@ -65,8 +80,15 @@ jobs:
6580
cd XEngine_Release
6681
./XEngine_ProxyServiceApp -t
6782
68-
- name: Upload folder as artifact with mac
83+
- name: Upload folder as artifact with mac x64
84+
if: matrix.os == 'macos-13'
85+
uses: actions/upload-artifact@v4
86+
with:
87+
name: XEngine_ProxyServiceApp-x86_64-Mac
88+
path: XEngine_Release/
89+
- name: Upload folder as artifact with mac arm
90+
if: matrix.os == 'macos-14'
6991
uses: actions/upload-artifact@v4
7092
with:
71-
name: XEngine_ProxyServiceApp-x64-Mac
93+
name: XEngine_ProxyServiceApp-Arm64-Mac
7294
path: XEngine_Release/

.github/workflows/msbuild.yml

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@ 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-
permissions:
10-
contents: read
10+
- '.github/**'
1111

1212
jobs:
1313
build:
1414
strategy:
15-
# 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.
1615
fail-fast: false
1716
matrix:
1817
configuration: [Debug ,Release]
@@ -32,29 +31,41 @@ jobs:
3231
uses: actions/checkout@v4
3332
with:
3433
repository: libxengine/libxengine
35-
path: xengine
34+
path: libxengine
3635

3736
- name: sub module checkout (opensource)
3837
run: |
3938
git submodule init
4039
git submodule update
4140
shell: pwsh
4241

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

51-
# 配置 MSBuild 的路径,准备构建 VC++ 项目
5263
- name: Setup MSBuild
5364
uses: microsoft/setup-msbuild@v2
54-
#编译
65+
5566
- name: Build Solution
5667
run: msbuild XEngine_Source/XEngine.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
57-
#测试
68+
5869
- name: Conditional Step for x86 Release
5970
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
6071
run: |
@@ -74,18 +85,17 @@ jobs:
7485
cd XEngine_Release
7586
./VSCopy_x64.bat
7687
shell: pwsh
77-
78-
#将文件夹打包为 artifact
88+
7989
- name: Upload folder as artifact with x86
80-
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
90+
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
8191
uses: actions/upload-artifact@v4
8292
with:
83-
name: XEngine_ProxyServiceApp-x86-Windows
93+
name: XEngine_ProxyServiceApp-x86_32-Windows
8494
path: XEngine_Release/
8595

8696
- name: Upload folder as artifact with x64
8797
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
8898
uses: actions/upload-artifact@v4
8999
with:
90-
name: XEngine_ProxyServiceApp-x64-Windows
100+
name: XEngine_ProxyServiceApp-x86_64-Windows
91101
path: XEngine_Release/

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
ref: 'develop'
1818
fetch-depth: 0
1919

20-
- name: Download linuxbuild
20+
- name: Download ubuntubuild
2121
uses: dawidd6/action-download-artifact@v6
2222
with:
23-
workflow: linuxbuild.yml
23+
workflow: ubuntubuild.yml
2424
workflow_conclusion: success
2525
check_artifacts: false
2626
skip_unpack: true
Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@ name: ubuntu build workflows
22

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

1212
jobs:
1313
build:
1414
strategy:
15-
# 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.
1615
fail-fast: false
1716
matrix:
1817
include:
1918
- os: ubuntu-22.04
20-
#- os: ubuntu-24.04
19+
- os: ubuntu-24.04
2120
runs-on: ${{ matrix.os }}
2221

2322
steps:
@@ -39,14 +38,28 @@ jobs:
3938
git submodule init
4039
git submodule update
4140
42-
# 设置依赖库的环境变量
43-
- name: Set up Dependency Environment Variables
41+
- name: Set up Dependency ubuntu24.04 Environment
42+
if: matrix.os == 'ubuntu-24.04'
4443
run: |
4544
cd libxengine
4645
chmod 777 *
4746
sudo ./XEngine_LINEnv.sh -i 3
48-
cd ..
49-
#编译
47+
- name: Set up Dependency ubuntu22.04 Environment
48+
if: matrix.os == 'ubuntu-22.04'
49+
run: |
50+
cd libxengine
51+
chmod 777 *
52+
sudo ./XEngine_LINEnv.sh -i 0
53+
54+
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
55+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_UBuntu_22.04_x86-64.zip
56+
unzip ./XEngine_UBuntu_22.04_x86-64.zip -d ./XEngine_UBuntu_22.04_x86-64
57+
cd XEngine_UBuntu_22.04_x86-64
58+
59+
sudo cp -rf ./XEngine_Include /usr/local/include
60+
sudo find ./XEngine_Linux -name "*.so" -exec cp {} /usr/local/lib \;
61+
sudo ldconfig
62+
5063
- name: make
5164
run: |
5265
cd XEngine_Source
@@ -63,8 +76,15 @@ jobs:
6376
cd XEngine_Release
6477
./XEngine_ProxyServiceApp -t
6578
66-
- name: Upload folder as artifact with ubuntu
79+
- name: Upload folder as artifact with ubuntu22.04
80+
if: matrix.os == 'ubuntu-22.04'
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: XEngine_ProxyServiceApp-x86_64-Ubuntu-22.04
84+
path: XEngine_Release/
85+
- name: Upload folder as artifact with ubuntu24.04
86+
if: matrix.os == 'ubuntu-24.04'
6787
uses: actions/upload-artifact@v4
6888
with:
69-
name: XEngine_ProxyServiceApp-x64-Ubuntu
89+
name: XEngine_ProxyServiceApp-x86_64-Ubuntu-24.04
7090
path: XEngine_Release/

0 commit comments

Comments
 (0)