From 23a4fcb665f7a559dad46b377bd8f687d896d573 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Fri, 9 Dec 2016 22:22:47 +0100 Subject: [PATCH 1/4] rewrite the appveyor.yml --- scripts/appveyor.yml | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/scripts/appveyor.yml b/scripts/appveyor.yml index 43647bf71..e60473cc5 100644 --- a/scripts/appveyor.yml +++ b/scripts/appveyor.yml @@ -37,17 +37,19 @@ build: off test_script: - cd openlp-branch - - "%PYTHON%\\python.exe -m nose -v tests" + #- "%PYTHON%\\python.exe -m nose -v tests" # Go back to the user root folder - cd.. after_test: # This is where we create a package using PyInstaller # First get PyInstaller - - curl -L -O https://github.com/pyinstaller/pyinstaller/archive/develop.zip - - 7z x develop.zip + #- curl -L -O https://github.com/pyinstaller/pyinstaller/archive/develop.zip + - curl -L -O https://github.com/pyinstaller/pyinstaller/releases/download/v3.2/PyInstaller-3.2.zip + - 7z x PyInstaller-3.2.zip + #- mv pyinstaller-develop PyInstaller-3.2 # Install PyInstaller dependencies - - "%PYTHON%\\python.exe -m pip install future" + - "%PYTHON%\\python.exe -m pip install future pefile" # Download and install Inno Setup - used for packaging - curl -L -O http://www.jrsoftware.org/download.php/is-unicode.exe - is-unicode.exe /VERYSILENT /SUPPRESSMSGBOXES /SP- @@ -62,10 +64,28 @@ after_test: # - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe # - NSISPortable_3.0_English.paf.exe /S # Get the packaging code - - bzr checkout --lightweight lp:openlp/packaging packaging + #- bzr checkout --lightweight lp:openlp/packaging packaging + - bzr checkout --lightweight lp:~raoul-snyman/openlp/pyinstaller-change packaging + #- curl -L http://bazaar.launchpad.net/~openlp-core/openlp/packaging/tarball -o packaging.tar.gz + #- 7z e packaging.tar.gz + #- 7z x packaging.tar + #- mv ~openlp-core/openlp/packaging packaging + # If this is trunk we should also build the manual + # Download and install HTML Help Workshop + #- curl -L "http://go.microsoft.com/fwlink/p/?linkid=14188" -o htmlhelp.exe + #- htmlhelp.exe /Q + # Install sphinx + - "%PYTHON%\\python.exe -m pip install sphinx" + # Get the documentation code + #- bzr checkout --lightweight lp:openlp/documentation documentation + - curl -L http://bazaar.launchpad.net/~openlp-core/openlp/documentation/tarball -o documentation.tar.gz + - 7z e documentation.tar.gz + - 7z x documentation.tar + - mv ~openlp-core/openlp/documentation documentation # Build the bundle - cd packaging - - "%PYTHON%\\python.exe windows/windows-builder.py -v -u -t -c windows/config-appveyor.ini -b ../openlp-branch" + #- "%PYTHON%\\python.exe windows/windows-builder.py -v -u -t -c windows/config-appveyor.ini -b ../openlp-branch -d ../documentation" + - "%PYTHON%\\python.exe builders/windows-builder.py -v --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch -d ../documentation --portable" artifacts: - path: openlp-branch\dist\*.exe From dcfd0a83a6e7a0dd183987bf1b536a1419063435 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Thu, 15 Dec 2016 17:33:03 +0100 Subject: [PATCH 2/4] Updates to the appveyor. Only build docs if building trunk. --- scripts/appveyor-webhook.py | 10 +++++++--- scripts/appveyor.yml | 38 ++++++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/scripts/appveyor-webhook.py b/scripts/appveyor-webhook.py index 573aa1045..45438645d 100755 --- a/scripts/appveyor-webhook.py +++ b/scripts/appveyor-webhook.py @@ -42,7 +42,7 @@ webhook_element = \ { 'commit': { 'author': { - 'email': 'open@contributer', + 'email': 'contributer@openlp', 'name': 'OpenLP Contributor' }, 'id': None, @@ -92,6 +92,10 @@ def get_yml(branch): yml_text = f.read() f.close() yml_text = yml_text.replace('BRANCHNAME', branch) + if 'openlp-core/openlp/trunk' in branch: + yml_text = yml_text.replace('BUILD_DOCS', '$TRUE') + else: + yml_text = yml_text.replace('BUILD_DOCS', '$FALSE') return yml_text @@ -115,8 +119,6 @@ def get_appveyor_build_url(branch): """ Get the url of the build. """ - # Wait 10 seconds to make sure the hook has been triggered - time.sleep(10) responce = urllib.request.urlopen(appveyor_api_url) json_str = responce.read().decode('utf-8') build_json = json.loads(json_str) @@ -130,4 +132,6 @@ else: webhook_url = sys.argv[1] branch = sys.argv[2] hook(webhook_url, get_yml(branch)) + # Wait 5 seconds to make sure the hook has been triggered + time.sleep(5) get_appveyor_build_url(branch) diff --git a/scripts/appveyor.yml b/scripts/appveyor.yml index e60473cc5..bdc23f303 100644 --- a/scripts/appveyor.yml +++ b/scripts/appveyor.yml @@ -44,10 +44,8 @@ test_script: after_test: # This is where we create a package using PyInstaller # First get PyInstaller - #- curl -L -O https://github.com/pyinstaller/pyinstaller/archive/develop.zip - curl -L -O https://github.com/pyinstaller/pyinstaller/releases/download/v3.2/PyInstaller-3.2.zip - 7z x PyInstaller-3.2.zip - #- mv pyinstaller-develop PyInstaller-3.2 # Install PyInstaller dependencies - "%PYTHON%\\python.exe -m pip install future pefile" # Download and install Inno Setup - used for packaging @@ -64,28 +62,38 @@ after_test: # - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe # - NSISPortable_3.0_English.paf.exe /S # Get the packaging code - #- bzr checkout --lightweight lp:openlp/packaging packaging - - bzr checkout --lightweight lp:~raoul-snyman/openlp/pyinstaller-change packaging - #- curl -L http://bazaar.launchpad.net/~openlp-core/openlp/packaging/tarball -o packaging.tar.gz - #- 7z e packaging.tar.gz - #- 7z x packaging.tar - #- mv ~openlp-core/openlp/packaging packaging + - curl -L http://bazaar.launchpad.net/~openlp-core/openlp/packaging/tarball -o packaging.tar.gz + - 7z e packaging.tar.gz + - 7z x packaging.tar + - mv ~openlp-core/openlp/packaging packaging # If this is trunk we should also build the manual # Download and install HTML Help Workshop #- curl -L "http://go.microsoft.com/fwlink/p/?linkid=14188" -o htmlhelp.exe #- htmlhelp.exe /Q # Install sphinx - - "%PYTHON%\\python.exe -m pip install sphinx" + - ps: >- + If (BUILD_DOCS) { + &"$env:PYTHON\python.exe" -m pip install sphinx + Invoke-WebRequest -Uri "http://bazaar.launchpad.net/~openlp-core/openlp/documentation/tarball" -OutFile documentation.tar.gz + 7z e documentation.tar.gz + 7z x documentation.tar + mv ~openlp-core/openlp/documentation documentation + cd packaging + &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch -d ../documentation --portable + } else { + cd packaging + &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch --portable + } # Get the documentation code #- bzr checkout --lightweight lp:openlp/documentation documentation - - curl -L http://bazaar.launchpad.net/~openlp-core/openlp/documentation/tarball -o documentation.tar.gz - - 7z e documentation.tar.gz - - 7z x documentation.tar - - mv ~openlp-core/openlp/documentation documentation + #- curl -L http://bazaar.launchpad.net/~openlp-core/openlp/documentation/tarball -o documentation.tar.gz + #- 7z e documentation.tar.gz + #- 7z x documentation.tar + #- mv ~openlp-core/openlp/documentation documentation # Build the bundle - - cd packaging + #- cd packaging #- "%PYTHON%\\python.exe windows/windows-builder.py -v -u -t -c windows/config-appveyor.ini -b ../openlp-branch -d ../documentation" - - "%PYTHON%\\python.exe builders/windows-builder.py -v --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch -d ../documentation --portable" + #- "%PYTHON%\\python.exe builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch -d ../documentation --portable" artifacts: - path: openlp-branch\dist\*.exe From acb8bc2ba1864fbbe6ddfe27c65b52d911ab925f Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Thu, 15 Dec 2016 19:24:11 +0100 Subject: [PATCH 3/4] clean up appveyor.yml --- scripts/appveyor.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/scripts/appveyor.yml b/scripts/appveyor.yml index bdc23f303..89621d150 100644 --- a/scripts/appveyor.yml +++ b/scripts/appveyor.yml @@ -3,7 +3,6 @@ version: OpenLP-win-ci-b{build} init: - choco install -y --force bzr - set PATH=C:\Program Files (x86)\Bazaar;%PATH% - - bzr --version clone_script: - bzr checkout --lightweight BRANCHNAME openlp-branch @@ -32,7 +31,6 @@ install: - 7z x -oMediaInfo MediaInfo_CLI_0.7.90_Windows_i386.zip - cp MediaInfo\\MediaInfo.exe openlp-branch\\MediaInfo.exe - build: off test_script: @@ -67,10 +65,6 @@ after_test: - 7z x packaging.tar - mv ~openlp-core/openlp/packaging packaging # If this is trunk we should also build the manual - # Download and install HTML Help Workshop - #- curl -L "http://go.microsoft.com/fwlink/p/?linkid=14188" -o htmlhelp.exe - #- htmlhelp.exe /Q - # Install sphinx - ps: >- If (BUILD_DOCS) { &"$env:PYTHON\python.exe" -m pip install sphinx @@ -84,16 +78,6 @@ after_test: cd packaging &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch --portable } - # Get the documentation code - #- bzr checkout --lightweight lp:openlp/documentation documentation - #- curl -L http://bazaar.launchpad.net/~openlp-core/openlp/documentation/tarball -o documentation.tar.gz - #- 7z e documentation.tar.gz - #- 7z x documentation.tar - #- mv ~openlp-core/openlp/documentation documentation - # Build the bundle - #- cd packaging - #- "%PYTHON%\\python.exe windows/windows-builder.py -v -u -t -c windows/config-appveyor.ini -b ../openlp-branch -d ../documentation" - #- "%PYTHON%\\python.exe builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch -d ../documentation --portable" artifacts: - path: openlp-branch\dist\*.exe From 936e6c8816034c897feba9456430a0567aeb94dc Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Thu, 15 Dec 2016 20:26:18 +0100 Subject: [PATCH 4/4] enable running tests --- scripts/appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/appveyor.yml b/scripts/appveyor.yml index 89621d150..27b4cfc98 100644 --- a/scripts/appveyor.yml +++ b/scripts/appveyor.yml @@ -35,7 +35,8 @@ build: off test_script: - cd openlp-branch - #- "%PYTHON%\\python.exe -m nose -v tests" + # Run the tests + - "%PYTHON%\\python.exe -m nose -v tests" # Go back to the user root folder - cd..