openlp/appveyor.yml

126 lines
5.7 KiB
YAML
Raw Permalink Normal View History

2016-11-30 20:54:06 +00:00
version: OpenLP-win-ci-b{build}
2016-11-29 13:07:21 +00:00
cache:
- '%LOCALAPPDATA%\pip\Cache'
2020-07-10 19:45:00 +00:00
- /Users/appveyor/Libraries/Caches/pip
2020-12-21 05:36:38 +00:00
stack: python 3.8
2019-02-14 21:19:26 +00:00
2016-11-29 13:07:21 +00:00
environment:
matrix:
2020-07-10 19:45:00 +00:00
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PY_DIR: C:\\Python38-x64
2020-07-10 19:45:00 +00:00
CHOCO_VLC_ARG:
FORCE_PACKAGING: 0
2020-07-10 19:45:00 +00:00
FORCE_PACKAGING_MANUAL: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PY_DIR: C:\\Python38
2020-07-10 19:45:00 +00:00
CHOCO_VLC_ARG: --forcex86
FORCE_PACKAGING: 0
2020-07-10 19:45:00 +00:00
FORCE_PACKAGING_MANUAL: 0
- APPVEYOR_BUILD_WORKER_IMAGE: macos-mojave
QT_QPA_PLATFORM: offscreen
FORCE_PACKAGING: 0
2020-07-10 19:45:00 +00:00
FORCE_PACKAGING_MANUAL: 0
init:
- cmd: set PATH=%PY_DIR%;%PY_DIR%\Scripts;%PATH%
2016-11-29 13:07:21 +00:00
install:
2020-07-10 19:45:00 +00:00
# Update pip
- python -m pip install --upgrade pip
# Install generic dependencies from pypi
# websockets are set to 8.1 and pyqt5 to 5.15.3 due to pyinstaller incompabilities with later versions.
# pytest-qt is set to 3.3.0 due to test failing with newwer versions.
- python -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock psycopg2-binary websockets==8.1 waitress six webob requests QtAwesome PyQt5==5.15.3 PyQtWebEngine==5.15.3 pymediainfo PyMuPDF QDarkStyle python-vlc zeroconf flask-cors pytest-qt==3.3.0 pyenchant pysword
2020-07-10 19:45:00 +00:00
# Install Windows only dependencies
- cmd: python -m pip install pyodbc pypiwin32
# Mac only dependencies
2020-12-20 21:07:49 +00:00
- sh: python -m pip install Pyro4 pyobjc-core pyobjc-framework-Cocoa py-applescript
2016-11-29 13:07:21 +00:00
build: off
test_script:
2020-07-10 19:45:00 +00:00
- ps: cd $env:APPVEYOR_BUILD_FOLDER
2016-12-15 19:26:18 +00:00
# Run the tests
2020-07-10 19:45:00 +00:00
- python -m pytest tests
2016-11-30 20:54:06 +00:00
# Go back to the user root folder
2020-07-10 19:45:00 +00:00
- cd ..
2016-11-29 13:07:21 +00:00
after_test:
# Only package on the master repo
- ps: >-
2020-12-22 07:19:38 +00:00
If (($env:APPVEYOR_REPO_TAG -eq $True) -Or ($env:APPVEYOR_SCHEDULED_BUILD -eq $True) -Or ($env:FORCE_PACKAGING -eq 1)) {
# Continue on error
2020-07-10 19:45:00 +00:00
$ErrorActionPreference = "Continue"
# This is where we create a package using PyInstaller
2020-12-20 21:07:49 +00:00
# Install PyInstaller
2020-07-10 19:45:00 +00:00
python -m pip install --no-warn-script-location pyinstaller
# Some windows only stuff...
If ($isWindows) {
# 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
# Download and unpack portable-bundle
appveyor DownloadFile https://get.openlp.org/win-sdk/portable-setup.7z
7z x portable-setup.7z
# Install VLC - Windows only
choco install vlc $env:CHOCO_VLC_ARG --no-progress --limit-output
# Install HTML Help Workshop - Windows only
choco install html-help-workshop --no-progress --limit-output
}
else
{
# Install Mac only stuff
# install dmgbuild tool
python -m pip install --no-warn-script-location dmgbuild
# use brew to build enchant, needed for pyenchant
2020-12-20 21:07:49 +00:00
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
2020-07-10 19:45:00 +00:00
brew update --quiet
brew install enchant
}
# Get the packaging code
2020-07-10 19:45:00 +00:00
Invoke-WebRequest -Uri "https://gitlab.com/openlp/packaging/-/archive/master/packaging-master.zip" -OutFile packaging-master.zip
Expand-Archive -Path packaging-master.zip -DestinationPath .
# If this is tag/replease we should also build the manual
2020-07-10 19:45:00 +00:00
If ($env:APPVEYOR_REPO_TAG -eq $True -Or $env:FORCE_PACKAGING_MANUAL -eq 1) {
python -m pip install --no-warn-script-location sphinx sphinx_rtd_theme
Invoke-WebRequest -Uri "https://gitlab.com/openlp/documentation/-/archive/master/documentation-master.zip" -OutFile documentation-master.zip
2020-07-10 19:45:00 +00:00
Expand-Archive -Path documentation-master.zip -DestinationPath .
# If this is a release build, set release argument
$releaseArg = ""
If ($env:APPVEYOR_REPO_TAG -eq $True) {
2020-12-22 07:19:38 +00:00
$releaseArg = "--release ""$env:APPVEYOR_REPO_TAG_NAME"""
2020-07-10 19:45:00 +00:00
}
cd packaging-master
2020-07-10 19:45:00 +00:00
If ($isWindows) {
2020-12-22 07:19:38 +00:00
$cmd = "python builders/windows-builder.py $releaseArg --skip-update -c windows/config-appveyor.ini -b ""$env:APPVEYOR_BUILD_FOLDER"" -d ../documentation-master --portable"
iex $cmd
2020-07-10 19:45:00 +00:00
} else {
# Install qt to get the lrelease tool
brew install qt
2020-12-22 07:19:38 +00:00
$cmd = "python builders/macosx-builder.py $releaseArg --skip-update -c osx/config-appveyor.ini -b ""$env:APPVEYOR_BUILD_FOLDER"" -d ../documentation-master"
iex $cmd
2020-07-10 19:45:00 +00:00
}
} else {
cd packaging-master
2020-07-10 19:45:00 +00:00
If ($isWindows) {
python builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b "$env:APPVEYOR_BUILD_FOLDER" --portable
} else {
python builders/macosx-builder.py --skip-update --skip-translations -c osx/config-appveyor.ini -b "$env:APPVEYOR_BUILD_FOLDER"
}
}
}
2016-11-30 20:54:06 +00:00
artifacts:
- path: dist\*.exe
2020-07-10 19:45:00 +00:00
name: Windows Portable-installer
- path: dist\*.msi
2020-07-10 19:45:00 +00:00
name: Windows Installer
- path: dist\*.dmg
name: MacOSX Installer