forked from Sigil-Ebook/Sigil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
133 lines (112 loc) · 3.79 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
version: '1.0.0-{build}'
branches:
only:
- master
- appearance
- /\d+\.\d+\.\d+(-\d+)?/
clone_folder: c:\project\sigil
image:
- Visual Studio 2017
configuration: Release
platform:
- x64
init:
- set /p RedistVersion=<"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\Microsoft.VCRedistVersion.default.txt"
- ps: $commit = $env:appveyor_repo_commit.SubString(0,7)
- ps: $timestamp = $env:appveyor_repo_commit_timestamp.SubString(0,10)
- ps: Update-AppveyorBuild -Version ("{0}-{1}-{2}" -f $env:appveyor_repo_branch, $commit, $timestamp)
clone_script:
- ps: >-
if(-not $env:appveyor_pull_request_number) {
git clone -q --depth=1 --branch=$env:appveyor_repo_branch https://github.com/$env:appveyor_repo_name.git $env:appveyor_build_folder
git checkout -qf $env:appveyor_repo_commit
} else {
git clone -q --depth=1 https://github.com/$env:appveyor_repo_name.git $env:appveyor_build_folder
git fetch -q origin +refs/pull/$env:appveyor_pull_request_number/merge:
git checkout -qf FETCH_HEAD
}
Set-Location $env:appveyor_build_folder
install:
- choco install ninja
environment:
global:
INNO: C:\Program Files (x86)\Inno Setup 5
REDIST: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\%RedistVersion%\vcredist_%PLATFORM%.exe
DOWNLOAD: https://github.com/dougmassay/win-qtwebkit-5.212/releases/download/v5.212-1/MyQt%PLATFORM%_5.12.6_VS2017_WE.7z
GDRIVE: https://github.com/gdrive-org/gdrive/releases/download/2.1.0/gdrive-windows-x64.exe
GDRIVE_REFRESH_TOKEN:
secure: +J2q/4lkiBXik5Ttvt06vpNiWBjNIXx+jFnYw1rOR9sLkyksyXGj+NeNKQB8kPwE
GDRIVE_DIR:
secure: e/trZFJnPzo9saqwWWn6+E3ZPoItqflSviT92eeH3Qk76GuEHrPk9DrcG1bh3SNX
matrix:
- PYTHON: C:\Python37
QT: C:\MyQt32\Qt5.12.2
CMAKE64BIT:
- PYTHON: C:\Python37-x64
QT: C:\MyQtx64_WE\Qt5.12.6
CMAKE64BIT: -DWIN_INSTALLER_USE_64BIT_CRT=1
matrix:
exclude:
- platform: x86
PYTHON: C:\Python37
- platform: x64
PYTHON: C:\Python37
fast_finish: true
only_commits:
files:
- CMakeLists.txt
- appveyor.yml
- installer/Sigil.iss
- src/
- internal/
- cmake_extras/
- 3rdparty/
before_build:
- cmd: |-
rmdir c:\cygwin /s /q
rmdir c:\Python35 /s /q
rmdir c:\Python35-x64 /s /q
cp '%REDIST%' installer/
mkdir build
cd ..\..
curl.exe -L -o webkit.7z %DOWNLOAD%
7z x webkit.7z -y
set PATH=%PYTHON%;%PYTHON%\Scripts;%QT%\bin;%INNO%;%PATH%
echo 'PATH = %PATH%'
python -m pip install --upgrade pip
pip3.7 install six==1.13.0
pip3.7 install html5lib==1.0.1
pip3.7 install regex==2019.11.1
pip3.7 install css-parser==1.0.4
pip3.7 install cssselect==1.0.3
pip3.7 install urllib3==1.25.8
pip3.7 install certifi==2019.11.28
pip3.7 install dulwich==0.19.15 --global-option="--pure"
pip3.7 install chardet==3.0.4
pip3.7 install pillow==6.2.1
pip3.7 install PyQt5==5.12.3 PyQt5-sip==4.19.18
pip3.7 install lxml==4.4.2
cd project\sigil\build
curl.exe -L -o gdrive.exe %GDRIVE%
c:\project\sigil\build\gdrive.exe version
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
echo 'LIB = %LIB%'
echo 'LIBPATH = %LIBPATH%'
echo 'INCLUDE = %INCLUDE%'
echo 'CL = %CL%'
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=%configuration% -DQt5_DIR=%QT%\lib\cmake\Qt5 %CMAKE64BIT%
build_script:
- cmd: |-
ninja -j4
after_build:
- cmd: |-
ninja -j4 makeinstaller
deploy_script:
- ps: >-
if(-not $env:appveyor_pull_request_number) {
python --version
c:\project\sigil\build\gdrive.exe version
python ..\ci_scripts\gddeploy.py
}
#artifacts:
# path: build\installer\*.exe