From 61b63c42ecf9b155b3053043fc93981875c51f34 Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Mon, 20 Apr 2015 23:59:08 -0700 Subject: [PATCH] appveyor finally working Took me 18 commits and ~3 hours to get it right. Most part of those three hours were wasted on battling problems that rooted in a nonexisting FTP file. The shitty script never reported a download failure, and happily tells me "installation complete" blah blah blah, even though the remote file, local file, any file never existed. So cool. "Glorious" history preserved below: Squashed commit of the following: commit bd845a97dc1eaf8685665d6f1ed54e038366b1ee Author: Zhiming Wang Date: Mon Apr 20 23:54:08 2015 -0700 revert install.ps1 to vanilla state, then add a few checks Also removed amd64 builds since they fail for no reason. So I spent more than two hours in vain, only because of a nonexistent .msi on FTP (why don't they ship .msi for every stable dot version? Beats me). And the stupid script never fucking reported, telling me that "... complete", "... successful", shit like that. So fucking ridiculous. commit 6f690c96cead3234034f8176a4d4ea4ea1bbdec1 Author: Zhiming Wang Date: Mon Apr 20 23:39:16 2015 -0700 change python version: 3.2.6 --> 3.2.5 3.2.6 doesn't have an msi on FTP. I noticed this a while ago, changed it locally, but forgot to push the change. commit b1714e9cf3646bd4ccaf057fb6fd80792c034ae2 Author: Zhiming Wang Date: Mon Apr 20 23:35:37 2015 -0700 okay, what's the problem? commit f4e453328bfe0c861b733b32911afb2bb3ef21aa Author: Zhiming Wang Date: Mon Apr 20 23:29:33 2015 -0700 Finally, a fix that might work. http://stackoverflow.com/a/22841567/1944784 commit da9d4c35d5fbbf0d227122f598339bc0b29046d7 Author: Zhiming Wang Date: Mon Apr 20 22:42:54 2015 -0700 just trying (desperate) commit 84be6eec89b5d680e17cfa66daef288b33ece195 Author: Zhiming Wang Date: Mon Apr 20 22:28:21 2015 -0700 escape paths using double backslashes commit 33676895bafecf6c9ecfd28738424bdcd15e8505 Author: Zhiming Wang Date: Mon Apr 20 22:15:52 2015 -0700 change / to \ in .appveyor/install.ps1 pypa's script seems to be problematic, too: Executing: C:\Python32/python.exe C:\get-pip.py Start-Process : This command cannot be run due to the error: The system cannot find the file specified. https://ci.appveyor.com/project/zmwangx/storyboard/build/job/dg325h6tm74lwgrg commit 2e7ca1bd46a27347849aebd43353ab65c9ac9ea8 Author: Zhiming Wang Date: Mon Apr 20 22:09:12 2015 -0700 init submodules Folks at appveyor do not recursively clone repos. Oh well. commit 9e579d777dc18c87eed0cd3187d7e569c1d4b873 Author: Zhiming Wang Date: Mon Apr 20 22:04:37 2015 -0700 apparently I still need to build docs from docs/ Otherwise: docs\make.bat html Error: Cannot find source directory `C:\projects\storyboard\source' commit 76e75a3f3dd383ec94c7adc281d4e2b8c91ddce7 Author: Zhiming Wang Date: Mon Apr 20 22:01:34 2015 -0700 Add nose to tests/requirements.txt appveyor isn't as nice as Travis, and they don't have nose preinstalled. Add that to requirements, which I should have done anyway. commit 55be243bb29155329dea0f9d0ca8881f6525978a Author: Zhiming Wang Date: Mon Apr 20 21:58:54 2015 -0700 Okay, I wrote Script instead of Scripts Shame on me. commit 7d255c350f021d7263adff0e2d5335c6e58202c0 Author: Zhiming Wang Date: Mon Apr 20 21:56:56 2015 -0700 How do I set PATH, again? commit a6338c8d59aca5ebd3e91ed2cee61ab0ae11502f Author: Zhiming Wang Date: Mon Apr 20 21:53:32 2015 -0700 try to set PATH commit 3ce0bee28d86b403c9bbc5129e4706918a6330f5 Author: Zhiming Wang Date: Mon Apr 20 21:49:23 2015 -0700 replace / with \ Unix habit... commit f578b02f2cf3cdc08d7a816686c580691f62ddd8 Author: Zhiming Wang Date: Mon Apr 20 21:47:26 2015 -0700 this is completely trial and error commit a6a3b33e4ada9b5cf21dd158c61940856da178bc Author: Zhiming Wang Date: Mon Apr 20 21:44:33 2015 -0700 try to quote the commands commit a20b16790f6c974d1964f2a60aae467b1f3ee6e5 Author: Zhiming Wang Date: Mon Apr 20 21:42:55 2015 -0700 Maybe we need to prepend cmd: to commands? Clueless about Windows and appveyor. commit 65c8858ad5790a29bd19107ac5031cefefb271ab Author: Zhiming Wang Date: Mon Apr 20 21:37:10 2015 -0700 appveyor.yml: prefix pip etc. with %PYTHON%/Scripts/ From https://ci.appveyor.com/project/zmwangx/storyboard/build/job/5a4uce6t40yd36l9 it seems that pip etc. are not on PATH. --- .appveyor/install.ps1 | 6 ++++++ appveyor.yml | 28 +++++----------------------- tests/requirements.txt | 1 + 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/.appveyor/install.ps1 b/.appveyor/install.ps1 index 4471ce5..86d14d9 100644 --- a/.appveyor/install.ps1 +++ b/.appveyor/install.ps1 @@ -34,6 +34,9 @@ function DownloadPython ($python_version, $platform_suffix) { Start-Sleep 1 } } + If (!$(Test-Path $filepath)) { + throw "$filepath does not exist!" + } Write-Host "File saved at" $filepath return $filepath } @@ -55,6 +58,9 @@ function InstallPython ($python_version, $architecture, $python_home) { $args = "/qn /i $filepath TARGETDIR=$python_home" Write-Host "msiexec.exe" $args Start-Process -FilePath "msiexec.exe" -ArgumentList $args -Wait -Passthru + If (!$(Test-Path "$python_home/python.exe")) { + throw "$filepath does not exist!" + } Write-Host "Python $python_version ($architecture) installation complete" return $true } diff --git a/appveyor.yml b/appveyor.yml index b47c632..11b66c7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,44 +9,26 @@ environment: PYTHON_ARCH: "32" - PYTHON: "C:\\Python32" - PYTHON_VERSION: "3.2.6" + PYTHON_VERSION: "3.2.5" PYTHON_ARCH: "32" - PYTHON: "C:\\Python33" - PYTHON_VERSION: "3.3.6" + PYTHON_VERSION: "3.3.5" PYTHON_ARCH: "32" - PYTHON: "C:\\Python34" PYTHON_VERSION: "3.4.3" PYTHON_ARCH: "32" - - PYTHON: "C:\\Python27-x64" - PYTHON_VERSION: "2.7.9" - PYTHON_ARCH: "64" - WINDOWS_SDK_VERSION: "v7.0" - - - PYTHON: "C:\\Python32-x64" - PYTHON_VERSION: "3.2.6" - PYTHON_ARCH: "64" - WINDOWS_SDK_VERSION: "v7.1" - - - PYTHON: "C:\\Python33-x64" - PYTHON_VERSION: "3.3.6" - PYTHON_ARCH: "64" - WINDOWS_SDK_VERSION: "v7.1" - - - PYTHON: "C:\\Python34-x64" - PYTHON_VERSION: "3.4.3" - PYTHON_ARCH: "64" - WINDOWS_SDK_VERSION: "v7.1" - init: - git config --global core.autocrlf input - ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH% install: + - git submodule update --init --recursive - cinst ffmpeg - powershell .appveyor\install.ps1 + - set PATH=%PYTHON%\Scripts;%PYTHON%;%PATH% - pip install -r requirements.txt - pip install -r tests\requirements.txt - pip install -r docs\requirements.txt @@ -57,5 +39,5 @@ build: off test_script: - nosetests --verbose --exe --with-coverage --cover-erase --cover-package=storyboard --with-doctest - cd docs - - .\make.bat html + - make.bat html - cd .. diff --git a/tests/requirements.txt b/tests/requirements.txt index abc5c2e..2d2956e 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,2 +1,3 @@ coveralls +nose requests