Skip to content

Commit 458801e

Browse files
committed
added:workflows for windows and linux and macos
fixed:make file build error on mac
1 parent e7fc284 commit 458801e

File tree

29 files changed

+416
-31
lines changed

29 files changed

+416
-31
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/linuxbuild.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: ubuntu build workflows
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
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.
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- os: ubuntu-22.04
20+
- os: ubuntu-24.04
21+
runs-on: ${{ matrix.os }}
22+
23+
steps:
24+
# 检出您的主仓库代码
25+
- name: Checkout main repository code
26+
uses: actions/checkout@v4
27+
with:
28+
ref: 'develop'
29+
30+
# 检出依赖的xengine仓库到指定的xengine目录
31+
- name: Checkout dependency repository (xengine)
32+
uses: actions/checkout@v4
33+
with:
34+
repository: libxengine/libxengine
35+
path: libxengine
36+
37+
- name: sub module checkout (opensource)
38+
run: |
39+
git submodule init
40+
git submodule update
41+
42+
# 设置依赖库的环境变量
43+
- name: Set up Dependency Environment Variables
44+
run: |
45+
cd libxengine
46+
chmod 777 *
47+
sudo ./XEngine_LINEnv.sh -i 3
48+
cd ..
49+
#编译
50+
- name: make
51+
run: |
52+
cd XEngine_Source
53+
make
54+
make FLAGS=InstallAll
55+
make FLAGS=CleanAll
56+
57+
make RELEASE=1
58+
make FLAGS=InstallAll
59+
make FLAGS=CleanAll
60+
cd ..
61+
- name: test
62+
run: |
63+
cd XEngine_Release
64+
./XEngine_CenterApp -t
65+
./XEngine_Http2App -t
66+
./XEngine_HttpApp -t
67+
./XEngine_SimpleApp -t
68+
./XEngine_WebSocketApp -t

.github/workflows/macbuild.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: macos build workflows
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
strategy:
15+
matrix:
16+
include:
17+
- os: macos-13
18+
runs-on: ${{ matrix.os }}
19+
20+
steps:
21+
- name: Checkout main repository code
22+
uses: actions/checkout@v4
23+
with:
24+
ref: 'develop'
25+
26+
# 检出依赖的xengine仓库到指定的xengine目录
27+
- name: Checkout dependency repository (xengine)
28+
uses: actions/checkout@v4
29+
with:
30+
repository: libxengine/libxengine
31+
path: libxengine
32+
33+
- name: sub module checkout (opensource)
34+
run: |
35+
git submodule init
36+
git submodule update
37+
38+
- name: brew install
39+
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
40+
41+
# 设置依赖库的环境变量
42+
- name: Set up Dependency Environment Variables
43+
run: |
44+
cd libxengine
45+
chmod 777 *
46+
./XEngine_LINEnv.sh -i 3
47+
cd ..
48+
#编译
49+
- name: make debug
50+
run: |
51+
cd XEngine_Source
52+
make PLATFORM=mac
53+
make PLATFORM=mac FLAGS=InstallAll
54+
make PLATFORM=mac FLAGS=CleanAll
55+
- name: make release
56+
run: |
57+
cd XEngine_Source
58+
make PLATFORM=mac RELEASE=1
59+
make PLATFORM=mac FLAGS=InstallAll
60+
make PLATFORM=mac FLAGS=CleanAll
61+
- name: test
62+
run: |
63+
cd XEngine_Release
64+
./XEngine_CenterApp -t
65+
./XEngine_Http2App -t
66+
./XEngine_HttpApp -t
67+
./XEngine_SimpleApp -t
68+
./XEngine_WebSocketApp -t

.github/workflows/msbuild.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: windows build workflows
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
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.
16+
fail-fast: false
17+
matrix:
18+
configuration: [Debug ,Release]
19+
platform: [x86 ,x64]
20+
21+
runs-on: windows-latest # 最新的 Windows 环境
22+
23+
steps:
24+
# 检出您的主仓库代码
25+
- name: Checkout main repository code
26+
uses: actions/checkout@v4
27+
with:
28+
ref: 'develop'
29+
30+
# 检出依赖的xengine仓库到指定的xengine目录
31+
- name: Checkout dependency repository (xengine)
32+
uses: actions/checkout@v4
33+
with:
34+
repository: libxengine/libxengine
35+
path: xengine
36+
37+
- name: sub module checkout (opensource)
38+
run: |
39+
git submodule init
40+
git submodule update
41+
shell: pwsh
42+
43+
# 设置依赖库的环境变量
44+
- name: Set up Dependency Environment Variables
45+
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
49+
shell: pwsh
50+
51+
# 配置 MSBuild 的路径,准备构建 VC++ 项目
52+
- name: Setup MSBuild
53+
uses: microsoft/[email protected]
54+
#编译
55+
- name: Build Solution
56+
run: msbuild XEngine_Source/XEngine.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}

XEngine_Source/XEngine_ModuleConfigure/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ ifeq ($(RELEASE),1)
1616
FLAGS = -c
1717
DEBUG =
1818
else
19-
FLAGS = -c -lc_p
20-
DEBUG = -g -pg
19+
ifeq ($(PLATFORM),mac)
20+
FLAGS = -c
21+
DEBUG = -g
22+
else
23+
FLAGS = -c -lc_p
24+
DEBUG = -g -pg
25+
endif
2126
endif
2227

2328
ifeq ($(UNICODE),1)

XEngine_Source/XEngine_ModuleDatabase/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ ifeq ($(RELEASE),1)
1616
FLAGS = -c
1717
DEBUG =
1818
else
19-
FLAGS = -c -lc_p
20-
DEBUG = -g -pg
19+
ifeq ($(PLATFORM),mac)
20+
FLAGS = -c
21+
DEBUG = -g
22+
else
23+
FLAGS = -c -lc_p
24+
DEBUG = -g -pg
25+
endif
2126
endif
2227

2328
ifeq ($(UNICODE),1)

XEngine_Source/XEngine_ModuleProtocol/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ ifeq ($(RELEASE),1)
1616
FLAGS = -c
1717
DEBUG =
1818
else
19-
FLAGS = -c -lc_p
20-
DEBUG = -g -pg
19+
ifeq ($(PLATFORM),mac)
20+
FLAGS = -c
21+
DEBUG = -g
22+
else
23+
FLAGS = -c -lc_p
24+
DEBUG = -g -pg
25+
endif
2126
endif
2227

2328
ifeq ($(UNICODE),1)

XEngine_Source/XEngine_ServiceApp/XEngine_CenterApp/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@ ifeq ($(RELEASE),1)
1717
FLAGS = -c
1818
DEBUG =
1919
else
20-
FLAGS = -c -lc_p
21-
DEBUG = -g -pg
20+
ifeq ($(PLATFORM),mac)
21+
FLAGS = -c
22+
DEBUG = -g
23+
else
24+
FLAGS = -c -lc_p
25+
DEBUG = -g -pg
26+
endif
2227
endif
2328

2429
ifeq ($(UNICODE),1)

0 commit comments

Comments
 (0)