-
-
Notifications
You must be signed in to change notification settings - Fork 413
/
appveyor.yml
162 lines (149 loc) · 5.58 KB
/
appveyor.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# AppVeyor build configuration
#
# doc: http://www.appveyor.com/docs/build-configuration
# Qt-versions: https://www.appveyor.com/docs/windows-images-software/#qt
# validator: https://ci.appveyor.com/tools/validate-yaml
skip_tags: true
branches:
only:
- release
environment:
global:
qtdir57: C:\Qt\5.7\mingw53_32
qtdirlatest: C:\Qt\latest\mingw73_32
CCACHE_DIR: "%APPVEYOR_BUILD_FOLDER%\\.ccache"
matrix:
# latest Qt 32 bit
# - QTDIR: C:\Qt\5.13\mingw73_32
# TOOLCHAIN_VERSION: 730_32
# gpp: win32-g++
# latest Qt 64 bit (broken)
# - QTDIR: C:\Qt\latest\mingw73_64
# TOOLCHAIN_VERSION: 730_64
# gpp: g++
# Qt 5.7 (for Windows XP)
- QTDIR: C:\Qt\5.7\mingw53_32
TOOLCHAIN_VERSION: 530_32
gpp: win32-g++
#matrix:
# allow_failures:
# - QTDIR: C:\Qt\latest\mingw73_64
# TOOLCHAIN_VERSION: 730_64
# gpp: g++
cache:
- .ccache
install:
# Qt-versions: https://www.appveyor.com/docs/build-environment/#qt
# - set QTDIR=C:\Qt\5.7\mingw53_32
# - set QTDIR=C:\Qt\5.10.1\mingw53_32
- set PATH=%PATH%;%QTDIR%\bin;C:\Qt\Tools\QtCreator\bin;C:\Qt\Tools\mingw%TOOLCHAIN_VERSION%\bin
- echo PATH=%PATH%
- set RELEASE_PATH=appveyor\release
- set TEST_PATH=appveyor\test
# enable this to use RDP connection, see https://www.appveyor.com/docs/how-to/rdp-to-build-worker/
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/release/scripts/enable-rdp.ps1'))
# - C:\msys64\usr\bin\pacman --verbose --noconfirm --sync ccache
# - ccache.exe -V
# - dir %CCACHE_DIR%
before_build:
# getting submodules
- git submodule update --init
#
# do tests
#
- cd tests
# we need to modify that to make it running on AppVeyor
#- sed -i "s/CONFIG += c++11/QMAKE_CXXFLAGS += -std=gnu++0x\nQMAKE_CXX=ccache %gpp%/g" QOwnNotesTests.pro
- sed -i "s/CONFIG += c++11/QMAKE_CXXFLAGS += -std=gnu++0x/g" QOwnNotesTests.pro
- "echo #define RELEASE \"AppVeyor\" > release.h"
- qmake QOwnNotesTests.pro DEFINES+=INTEGRATION_TESTS CONFIG+=ccache
- mingw32-make
# creating the test path
- md ..\%TEST_PATH%
# copy the binary to our release path
- copy ..\bin\tests\tests.exe ..\%TEST_PATH%
# copy OpenSSL DLLs to the release path
- copy ..\appveyor\OpenSSL\libcrypto-1_1.dll ..\%TEST_PATH%
- copy ..\appveyor\OpenSSL\libssl-1_1.dll ..\%TEST_PATH%
- cd ..\%TEST_PATH%
# fetching dependencies of QT app
# http://doc.qt.io/qt-5/windows-deployment.html
- windeployqt tests.exe
# this dll was missed by windeployqt
- copy ..\libwinpthread-1.dll . /y
# this dll didn't work when released by windeployqt
# important: this dll needs to be updated when a new version of Qt is used!
# search for it in the mingw* folder of your local installation of Qt
- copy "..\libstdc++-6.dll" . /y
- tests.exe -txt
- cd ..\..
build_script:
# enable this to take a look if there are new qt versions
- dir C:\Qt
- dir C:\Qt\latest
- dir %QTDIR%\bin
- dir C:\Qt\Tools\mingw%TOOLCHAIN_VERSION%\bin
- dir C:\MinGW\bin
- cd src
# we need to modify that to make it running on AppVeyor
#- sed -i "s/CONFIG += c++11/QMAKE_CXXFLAGS += -std=gnu++0x\nQMAKE_CXX=ccache %gpp%/g" QOwnNotes.pro
- sed -i "s/CONFIG += c++11/QMAKE_CXXFLAGS += -std=gnu++0x/g" QOwnNotes.pro
- "echo #define RELEASE \"AppVeyor\" > release.h"
# setting the build number in the header file
- "echo #define BUILD %APPVEYOR_BUILD_NUMBER% > build_number.h"
# - qmake QOwnNotes.pro -r -spec win32-g++
# - qmake QOwnNotes.pro -r -spec %gpp% CONFIG+=ccache QMAKE_CXX="ccache $$QMAKE_CXX"
- qmake QOwnNotes.pro -r -spec %gpp% CONFIG+=ccache
# - qmake QOwnNotes.pro -r -spec win32-g++ "CONFIG+=debug"
- lrelease QOwnNotes.pro
- mingw32-make
# creating the release path
- md ..\%RELEASE_PATH%
# copy the binary to our release path
- copy release\QOwnNotes.exe ..\%RELEASE_PATH%
# copy OpenSSL DLLs to the release path
- copy ..\appveyor\OpenSSL\libcrypto-1_1.dll ..\%RELEASE_PATH%
- copy ..\appveyor\OpenSSL\libssl-1_1.dll ..\%RELEASE_PATH%
# copy unzip application for updater
- copy ..\appveyor\unzip.exe ..\%RELEASE_PATH%
# copy updater script
- copy ..\appveyor\update.bat ..\%RELEASE_PATH%
# copy portable mode launcher to the release path
- copy ..\appveyor\QOwnNotesPortable.bat ..\%RELEASE_PATH%
# copy translation files
- copy languages\*.qm ..\%RELEASE_PATH%
- cd ..\%RELEASE_PATH%
# fetching dependencies of QT app
# http://doc.qt.io/qt-5/windows-deployment.html
- windeployqt --release QOwnNotes.exe
# this dll was missed by windeployqt
- copy ..\libwinpthread-1.dll . /y
# this dll didn't work when released by windeployqt
# important: this dll needs to be updated when a new version of Qt is used!
# search for it in the mingw* folder of your local installation of Qt
- copy "..\libstdc++-6.dll" . /y
# for some reason AppVeyor or windeployqt uses a copy of the German
# translation file as English one, which screws up the English user interface
- del "translations\qt_en.qm"
artifacts:
# pushing entire folder as a zip archive
- path: appveyor\release
name: QOwnNotes
#deploy:
# # Deploy to GitHub Releases
# - provider: GitHub
# artifact: QOwnNotes
# draft: false
# prerelease: false
# auth_token:
# secure: spcyN/Dz3B2GXBPii8IywDLq6vfxC1SrN+xR2wMerFM7g2nTy0Lrh5agQONFoInR#
# on:
# branch: release
# QTDIR: C:\Qt\5.13\mingw73_32
notifications:
# Gitter webhook
- provider: Webhook
url: https://webhooks.gitter.im/e/b6ef22402eb4af50f73a
on_build_success: true
on_build_failure: true
on_build_status_changed: false