Skip to content

Commit f0b9fe6

Browse files
committed
added:workflow
1 parent 675a8ee commit f0b9fe6

File tree

3 files changed

+172
-0
lines changed

3 files changed

+172
-0
lines changed

.github/workflows/linuxbuild.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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/xengine
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 ..

.github/workflows/macbuild.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
runs-on: macos-13
15+
16+
steps:
17+
# 检出您的主仓库代码
18+
- name: Checkout main repository code
19+
uses: actions/checkout@v4
20+
with:
21+
ref: 'develop'
22+
23+
# 检出依赖的xengine仓库到指定的xengine目录
24+
- name: Checkout dependency repository (xengine)
25+
uses: actions/checkout@v4
26+
with:
27+
repository: libxengine/xengine
28+
path: libxengine
29+
30+
- name: sub module checkout (opensource)
31+
run: |
32+
git submodule init
33+
git submodule update
34+
35+
- name: brew install
36+
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
37+
38+
# 设置依赖库的环境变量
39+
- name: Set up Dependency Environment Variables
40+
run: |
41+
cd libxengine
42+
chmod 777 *
43+
./XEngine_LINEnv.sh -i 3
44+
cd ..
45+
#编译
46+
- name: make
47+
run: |
48+
cd XEngine_Source
49+
make PLATFORM=mac
50+
make PLATFORM=mac FLAGS=InstallAll
51+
make PLATFORM=mac FLAGS=CleanAll
52+
53+
make PLATFORM=mac RELEASE=1
54+
make PLATFORM=mac FLAGS=InstallAll
55+
make PLATFORM=mac FLAGS=CleanAll
56+
cd ..

.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/xengine
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 }}

0 commit comments

Comments
 (0)