Skip to content

Commit 66bfe2e

Browse files
committed
Add release-windows github action
1 parent bf69541 commit 66bfe2e

2 files changed

Lines changed: 90 additions & 1 deletion

File tree

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Some convenient links:
2+
# - https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md
3+
#
4+
5+
name: release-windows
6+
7+
on:
8+
push:
9+
tags:
10+
- '2.*'
11+
schedule:
12+
- cron: '0 0 * * *'
13+
14+
defaults:
15+
run:
16+
shell: cmd
17+
18+
jobs:
19+
20+
build:
21+
22+
runs-on: windows-2019
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Setup msbuild.exe
28+
uses: microsoft/setup-msbuild@v1.0.0
29+
30+
- name: Install PCRE
31+
run: |
32+
curl -fsSL https://ftp.pcre.org/pub/pcre/pcre-8.44.zip -o pcre-8.44.zip
33+
7z x pcre-8.44.zip
34+
cd pcre-8.44
35+
cmake . -G "Visual Studio 16 2019" -A x64
36+
msbuild -m PCRE.sln /p:Configuration=Release /p:Platform=x64
37+
dir
38+
dir Release
39+
dir x64
40+
dir x64\Release
41+
copy pcre.h ..\externals
42+
copy Release\pcre.lib ..\externals\pcre64.lib
43+
44+
- name: Install Z3 library
45+
run: |
46+
curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-4.8.7/z3-4.8.7-x64-win.zip -o z3-4.8.7-win.zip
47+
7z x z3-4.8.7-win.zip -oexternals -r -y
48+
move externals\z3-4.8.7-x64-win externals\z3
49+
50+
- name: Install Qt
51+
uses: jurplel/install-qt-action@v2
52+
with:
53+
modules: 'qtcharts'
54+
55+
- name: Create .qm
56+
run: |
57+
cd gui
58+
lupdate gui.pro
59+
lrelease gui.pro -removeidentical
60+
61+
- name: Build x64 release GUI
62+
run: |
63+
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
64+
cd gui
65+
qmake HAVE_QCHART=yes
66+
nmake release
67+
68+
- name: Deploy app
69+
run: |
70+
dir Build\gui
71+
windeployqt Build\gui
72+
dir Build\gui
73+
del Build\gui\cppcheck-gui.ilk
74+
del Build\gui\cppcheck-gui.pdb
75+
76+
- name: Build CLI x64 release configuration using MSBuild
77+
run: msbuild -m cppcheck.sln /p:Configuration=Release-PCRE /p:Platform=x64
78+
79+
- name: Build Installer
80+
run: |
81+
mkdir bin
82+
xcopy /S Build\gui bin
83+
cd win_installer
84+
msbuild -m cppcheck.wixproj /p:Platform=x64,ProductVersion=0.123
85+
86+
- uses: actions/upload-artifact@v2
87+
with:
88+
name: Build
89+
path: win_installer/Build/

win_installer/config.wxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<?define QtDllDir = "..\bin" ?>
1010

1111
<?if $(var.Platform) = x64 ?>
12-
<?define CrtMergeModule = "$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC142_CRT_x64.msm" ?>
12+
<?define CrtMergeModule = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\14.25.28508\MergeModules\Microsoft_VC142_CRT_x64.msm" ?>
1313
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
1414
<?else?>
1515
<?define CrtMergeModule = "$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC142_CRT_x86.msm" ?>

0 commit comments

Comments
 (0)