-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor-dev.yml
142 lines (86 loc) · 3.58 KB
/
appveyor-dev.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: 0.9.2-snapshot-{build}
# branches to build
branches:
# whitelist
only:
- devel
# Start builds on tags only (GitHub, BitBucket, GitLab, Gitea)
skip_non_tags: false
# Maximum number of concurrent jobs for the project
max_jobs: 1
image: Visual Studio 2022
clone_folder: C:\projects\protokollitaja
install:
- cmd: >-
set QTDIR=C:\Qt\6.5\mingw_64
set OPENSSL_INCLUDE_PATH=C:\OpenSSL-v30-Win64\include\openssl
set OPENSSL_LIB_PATH=C:\OpenSSL-v30-Win64\lib\MinGW
echo %PATH:;=&echo.%
ls C:\Qt
ls C:\Qt\Tools
ls C:\Qt\Tools\mingw1120_64\bin
ls C:\Qt\6.5
ls %QTDIR%
ls %QTDIR%\bin
type %QTDIR%\bin\qtenv2.bat
%QTDIR%\bin\qtenv2.bat
set PATH=%PATH%;C:\Qt\Tools\mingw1120_64\bin
qmake -v
set make=mingw32-make.exe
g++ --version
%make% --version
build_script:
- cmd: >-
cd %APPVEYOR_BUILD_FOLDER%
dir
qmake.exe Protokollitaja.pro -spec win32-g++ "CONFIG+=qtquickcompiler" DEFINES+=ASM_CRASH_REPORT && mingw32-make.exe qmake_all
mingw32-make.exe -j4
test_script:
- ps: >-
echo $env:APPVEYOR_BUILD_FOLDER
cd $env:APPVEYOR_BUILD_FOLDER
New-Item -Path .\build -Name "Protokollitaja-$env:APPVEYOR_BUILD_VERSION" -ItemType "directory"
New-Item -Path ".\build\Protokollitaja-$env:APPVEYOR_BUILD_VERSION" -Name "Data" -ItemType "directory"
New-Item -Path ".\build\Protokollitaja-$env:APPVEYOR_BUILD_VERSION" -Name "tools" -ItemType "directory"
$apps = Get-ChildItem -Path "$env:APPVEYOR_BUILD_FOLDER" -Recurse -Name -Include *.exe -Exclude *test.exe
echo $apps
foreach($app in $apps) {
Copy-Item "$app" -Destination "$env:APPVEYOR_BUILD_FOLDER\build\Protokollitaja-$env:APPVEYOR_BUILD_VERSION"
}
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\protokollitaja\build\release\Data\Print_template.html" -Destination "$env:APPVEYOR_BUILD_FOLDER\build\Protokollitaja-$env:APPVEYOR_BUILD_VERSION\Data"
Copy-Item "C:\Qt\Tools\mingw1120_64\bin\addr2line.exe" -Destination "$env:APPVEYOR_BUILD_FOLDER\build\Protokollitaja-$env:APPVEYOR_BUILD_VERSION\tools"
Copy-Item "$env:APPVEYOR_BUILD_FOLDER\Release-Notes.md" -Destination "$env:APPVEYOR_BUILD_FOLDER\build\Protokollitaja-$env:APPVEYOR_BUILD_VERSION"
cd .\build\Protokollitaja-$env:APPVEYOR_BUILD_VERSION
$copiedApps = Get-ChildItem -Path . -Name -Include *.exe
echo $copiedApps
foreach($app in $copiedApps) {
windeployqt6.exe $app
}
dir
cd $env:APPVEYOR_BUILD_FOLDER
& 7z a "Protokollitaja-$env:APPVEYOR_BUILD_VERSION.zip" ".\build\Protokollitaja-$env:APPVEYOR_BUILD_VERSION"
$tests = Get-ChildItem -Path $env:APPVEYOR_BUILD_FOLDER -Recurse -Name -Include *test.exe
foreach($test in $tests) {
echo Testing: $test
if ($test.IndexOf("IntegrationTest") -lt 0) {
& $test -junitxml -tickcounter -o testresults.xml
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\testresults.xml))
}
}
artifacts:
- path: '*.zip'
name: Protokollitaja
notifications:
- provider: Email
to:
subject: Protokollitaja-dev Build {{status}}
message: "'{{message}}, {{commitId}}, ...'"
on_build_success: false
on_build_failure: false
on_build_status_changed: true