-
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (65 loc) · 2.25 KB
/
Copy pathBuild.yml
File metadata and controls
73 lines (65 loc) · 2.25 KB
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
name: Build Project
# Workflow will trigger on any push to the master/main branch
on:
pull_request:
push:
branches:
- master
- main
jobs:
Autocompilation:
# Our project is windows only, so we will compile project at windows server
runs-on: windows-2022
steps:
# Cloning all repository recursively
- name: Get Sources
uses: actions/checkout@v4
with:
submodules: true
# Remove clang-format due to incompatybility with Discord RPC library
- name: Remove clang-format From OS And PATH
shell: powershell
run: |
$clangPath = "C:\Program Files\LLVM\bin\clang-format.exe"
if (Test-Path $clangPath) {
Remove-Item -Force $clangPath
Write-Host "Clang-format deleted successfully."
}
# Check this about more info: https://github.com/marketplace/actions/install-version-specific-mingw
# Setting up MinGW_x64 version 8.1.0
- name: Set Up MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: x64
version: 12.2.0
# Check this about more info: https://github.com/marketplace/actions/install-qt
# This action cannot download needed mingw810
# So it downloads only Qt part
- name: Set Up Qt
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
arch: win64_mingw81
target: desktop
dir: C:\
# Check this about more info: https://github.com/marketplace/actions/cmake-action
- name: Set Up CMake
uses: threeal/cmake-action@v1.3.0
with:
run-build: false
# Compile code
- name: Compile Project
shell: cmd
run: |
mkdir C:\Qt\Tools > nul
mklink C:\Qt\Tools\mingw_64 C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64 > nul
set PATH=%PATH%;C:\Qt\5.15.2\mingw81_64\bin;C:\Qt\Tools\mingw_64\bin
call Build.bat
# Upload artifact to the GitHub
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
# ${{github.sha}} - commit long hash name
name: GenHotkeys-${{github.sha}}
# zip all content in the "build\exe" folder
path: build/exe/**