This repository has been archived by the owner on May 21, 2024. It is now read-only.
forked from KebsCS/KBotExt
-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (90 loc) · 3.09 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Build
on:
push:
branches: [ main ]
env:
SOLUTION_FILE_PATH: .\KBotExt.sln
BUILD_CONFIGURATION: Release
RUN_NUMBER: ${{github.run_number}}
permissions:
id-token: write
contents: write
jobs:
Build-x64:
if: "contains(github.event.head_commit.message, '[build]')"
name: Build x64
runs-on: windows-latest
steps:
- name: Checkout KBotExt repository
uses: actions/checkout@v4.1.1
with:
submodules: recursive
- name: Checkout vcpkg repository
uses: actions/checkout@v4.1.1
with:
repository: microsoft/vcpkg
path: vcpkg
- name: Install MSBuild x64
uses: microsoft/setup-msbuild@v1.3.1
with:
msbuild-architecture: x64
- name: Install vcpkg
run: |
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg integrate install
- name: Install FreeType x64
run: .\vcpkg\vcpkg install freetype:x64-windows-static
- name: Install cpr x64
run: .\vcpkg\vcpkg install cpr:x64-windows-static
- name: Install JsonCpp x64
run: .\vcpkg\vcpkg install jsoncpp:x64-windows-static
- name: Build KBotExt x64 solution
working-directory: .\
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}
- name: Upload KBotExt x64 latest artifact
uses: actions/upload-artifact@v3.1.3
with:
name: KBotExt-${{env.RUN_NUMBER}}
path: ./x64/Release/KBotExt.exe
if-no-files-found: error
Build-x86:
if: "contains(github.event.head_commit.message, '[build]')"
name: Build x86
runs-on: windows-latest
steps:
- name: Checkout KBotExt repository
uses: actions/checkout@v4.1.1
with:
submodules: recursive
- name: Checkout vcpkg repository
uses: actions/checkout@v4.1.1
with:
repository: microsoft/vcpkg
path: vcpkg
- name: Install MSBuild x64
uses: microsoft/setup-msbuild@v1.3.1
with:
msbuild-architecture: x64
- name: Install vcpkg
run: |
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg integrate install
- name: Install FreeType x86
run: .\vcpkg\vcpkg install freetype:x86-windows-static
- name: Install cpr x86
run: .\vcpkg\vcpkg install cpr:x86-windows-static
- name: Install JsonCpp x86
run: .\vcpkg\vcpkg install jsoncpp:x86-windows-static
- name: Build KBotExt x86 solution
working-directory: .\
run: |
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x86 ${{env.SOLUTION_FILE_PATH}}
cd .\Release\
ren KBotExt.exe KBotExt_x86.exe
cd ..
- name: Upload KBotExt x86 latest artifact
uses: actions/upload-artifact@v3.1.3
with:
name: KBotExt-${{env.RUN_NUMBER}}
path: ./Release/KBotExt_x86.exe
if-no-files-found: error