-
Notifications
You must be signed in to change notification settings - Fork 10
127 lines (113 loc) · 4.41 KB
/
windows_build.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Windows
on:
push: {}
pull_request: {}
env:
VERSION: 2.0.0
PROJECT_NAME: "QuickCut"
QT_VERSION: 5.15.0
MSC_VERSION: "vc142"
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {
name: "Windows Latest x64 Debug",
os: windows-latest,
arch: "x64",
artifact: "Windows-x64-Debug",
msvc: win64_msvc2019_64,
build_type: "Debug",
cmake_generator: '-G "Visual Studio 16 2019" -A x64',
cmake_build_args: "/M",
vs_env_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
}
- {
name: "Windows Latest x64 Release",
os: windows-latest,
arch: "x64",
artifact: "Windows-x64-Release",
msvc: win64_msvc2019_64,
build_type: "Release",
cmake_generator: '-G "Visual Studio 16 2019" -A x64',
cmake_build_args: "/M",
vs_env_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
}
- {
name: "Windows Latest x86 Debug",
os: windows-latest,
arch: "x86",
artifact: "Windows-x86-Debug",
msvc: win32_msvc2019,
build_type: "Debug",
cmake_generator: '-G "Visual Studio 16 2019" -A Win32',
cmake_build_args: "/M",
vs_env_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars32.bat",
}
- {
name: "Windows Latest x86 Release",
os: windows-latest,
arch: "x86",
artifact: "Windows-x86-Release",
msvc: win32_msvc2019,
build_type: "Release",
cmake_generator: '-G "Visual Studio 16 2019" -A Win32',
cmake_build_args: "/M",
vs_env_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars32.bat",
}
steps:
- uses: actions/checkout@v2
- name: Install conan Packge-Manager
id: install_pm
run: |
pip install conan
conan -v
conan profile new default --detect --force
conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
- name: Download Qt modules
id: qt
uses: jurplel/install-qt-action@v2
with:
version: "${{ env.QT_VERSION }}"
modules: core gui widgets
arch: "${{ matrix.config.msvc }}"
- name: CMake configure
id: cmake_configure
run: |
mkdir build && cd build
cmake .. ${{ matrix.config.cmake_generator }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
- name: CMake build
id: cmake_build
run: |
cd build
cmake --build . --config ${{ matrix.config.build_type }} -- ${{ matrix.config.cmake_build_args }}
- name: Prepare standalone deployment
id: prepare_standalone
run: |
windeployqt ./build/bin/
- name: Prepare installers deployment
id: prepare_installers
if: ${{ matrix.config.build_type == 'Release' }}
run: |
cd source\QuickCutInstaller\Windows\${{ matrix.config.arch }}
# Download binarycreator, since there is no package for this yet.
echo "Downloading Qt's binarycreator..."
curl -L "https://drive.google.com/uc?export=download&id=1ubrrAB3NfJ5G9IBe2Ed4_4oWQtmmAuJC" -o .\bin.zip
tar -xf .\bin.zip
.\create.bat
- name: Upload standalone artifacts
id: upload_standalone_artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.PROJECT_NAME }}-${{ matrix.config.artifact }}
path: ./build/bin/
- name: Upload installer artifacts
id: upload_installer_artifacts
uses: actions/upload-artifact@v2
if: ${{ matrix.config.build_type == 'Release' }}
with:
name: ${{ env.PROJECT_NAME }}Setup_${{ matrix.config.arch }}_${{ env.VERSION }}
path: ./source/QuickCutInstaller/Windows/${{ matrix.config.arch }}/${{ env.PROJECT_NAME }}Setup_${{ matrix.config.arch }}_${{ env.VERSION }}.exe