2016-11-30 20:54:06 +00:00
|
|
|
version: OpenLP-win-ci-b{build}
|
2016-11-29 13:07:21 +00:00
|
|
|
|
2019-09-25 18:00:05 +00:00
|
|
|
cache:
|
|
|
|
- '%LOCALAPPDATA%\pip\Cache'
|
|
|
|
|
2019-02-14 21:19:26 +00:00
|
|
|
image:
|
|
|
|
- Visual Studio 2017
|
|
|
|
|
2016-11-29 13:07:21 +00:00
|
|
|
environment:
|
2019-02-19 20:46:31 +00:00
|
|
|
matrix:
|
2019-10-31 20:34:25 +00:00
|
|
|
- PYTHON: C:\\Python37-x64
|
2019-05-22 16:42:51 +00:00
|
|
|
CHOCO_VLC: vlc
|
2019-10-31 20:34:25 +00:00
|
|
|
- PYTHON: C:\\Python37
|
2019-05-22 16:42:51 +00:00
|
|
|
CHOCO_VLC: vlc --forcex86
|
2016-11-29 13:07:21 +00:00
|
|
|
|
|
|
|
install:
|
|
|
|
# Install dependencies from pypi
|
2019-11-29 17:00:12 +00:00
|
|
|
- "%PYTHON%\\python.exe -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock pyodbc psycopg2 pypiwin32 websockets asyncio waitress six webob requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF==1.16.7 QDarkStyle python-vlc Pyro4 zeroconf"
|
2016-11-29 13:07:21 +00:00
|
|
|
|
|
|
|
build: off
|
|
|
|
|
|
|
|
test_script:
|
2019-09-25 18:00:05 +00:00
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
2016-12-15 19:26:18 +00:00
|
|
|
# Run the tests
|
2019-05-23 20:29:04 +00:00
|
|
|
- "%PYTHON%\\python.exe -m pytest -v tests"
|
2016-11-30 20:54:06 +00:00
|
|
|
# Go back to the user root folder
|
|
|
|
- cd..
|
2016-11-29 13:07:21 +00:00
|
|
|
|
|
|
|
after_test:
|
|
|
|
# This is where we create a package using PyInstaller
|
2018-10-25 19:02:49 +00:00
|
|
|
# Install PyInstaller
|
|
|
|
- "%PYTHON%\\python.exe -m pip install pyinstaller"
|
2016-11-30 20:54:06 +00:00
|
|
|
# Disabled portable installers - can't figure out how to make them silent
|
|
|
|
# - curl -L -O http://downloads.sourceforge.net/project/portableapps/PortableApps.com%20Installer/PortableApps.comInstaller_3.4.4.paf.exe
|
|
|
|
# - PortableApps.comInstaller_3.4.4.paf.exe /S
|
|
|
|
# - curl -L -O http://downloads.sourceforge.net/project/portableapps/PortableApps.com%20Launcher/PortableApps.comLauncher_2.2.1.paf.exe
|
|
|
|
# - PortableApps.comLauncher_2.2.1.paf.exe /S
|
|
|
|
# - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe
|
|
|
|
# - NSISPortable_3.0_English.paf.exe /S
|
2019-05-22 16:42:51 +00:00
|
|
|
# Download and unpack portable-bundle
|
|
|
|
- appveyor DownloadFile https://get.openlp.org/win-sdk/portable-setup.7z
|
|
|
|
- 7z x portable-setup.7z
|
|
|
|
# Install VLC
|
|
|
|
- choco install %CHOCO_VLC%
|
2016-11-30 20:54:06 +00:00
|
|
|
# Get the packaging code
|
2019-09-25 18:00:05 +00:00
|
|
|
- appveyor DownloadFile https://gitlab.com/openlp/packaging/-/archive/master/packaging-master.zip -FileName packaging-master.zip
|
|
|
|
- 7z x packaging-master.zip
|
|
|
|
|
2016-12-09 21:22:47 +00:00
|
|
|
# If this is trunk we should also build the manual
|
2016-12-15 16:33:03 +00:00
|
|
|
- ps: >-
|
2019-09-25 18:00:05 +00:00
|
|
|
If ($env:APPVEYOR_REPO_TAG -eq $True) {
|
2016-12-15 16:33:03 +00:00
|
|
|
&"$env:PYTHON\python.exe" -m pip install sphinx
|
2019-09-25 18:00:05 +00:00
|
|
|
Invoke-WebRequest -Uri "https://gitlab.com/openlp/documentation/-/archive/master/documentation-master.zip" -OutFile documentation-master.zip
|
|
|
|
7z x documentation-master.zip
|
|
|
|
cd packaging-master
|
|
|
|
&"$env:PYTHON\python.exe" builders/windows-builder.py --release --skip-update -c windows/config-appveyor.ini -b "$env:APPVEYOR_BUILD_FOLDER" -d ../documentation-master --portable
|
2016-12-15 16:33:03 +00:00
|
|
|
} else {
|
2019-09-25 18:00:05 +00:00
|
|
|
cd packaging-master
|
|
|
|
&"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b "$env:APPVEYOR_BUILD_FOLDER" --portable
|
2016-12-15 16:33:03 +00:00
|
|
|
}
|
2016-11-30 20:54:06 +00:00
|
|
|
|
|
|
|
artifacts:
|
2019-09-25 18:00:05 +00:00
|
|
|
- path: dist\*.exe
|
2019-05-02 18:59:09 +00:00
|
|
|
name: Portable-installer
|
2019-09-25 18:00:05 +00:00
|
|
|
- path: dist\*.msi
|
2019-05-02 18:59:09 +00:00
|
|
|
name: Installer
|