2016-11-26 14:13:55 +00:00
|
|
|
version: 1.0.{build}
|
2016-12-19 04:20:24 +00:00
|
|
|
os: Visual Studio 2015
|
2016-11-26 14:13:55 +00:00
|
|
|
environment:
|
|
|
|
WHEEL_DIR: C:\kivy_wheels
|
|
|
|
KIVY_BUILD_DIR: C:\kivy_build
|
|
|
|
AIRPLANE_CHARGE:
|
2016-11-27 00:24:22 +00:00
|
|
|
secure: HgQr7XMKpB6lWn33SKv0GyYZbh1RfpgvaIKEE0B54R5XHJujQg5dhOEB3Vc2CfAqCprX+CGxXAjQwFnuv6pJeA3++9Z8/1SfFuEqCF59J7PqsDs2thA8lNHLRsThvRVJrBt2jcb1wrG3Nf3sz3vi7e+rBzYjprkcYiTP0XJ5FdQekyFTTjuXYaRBGWrwGX81dEVVUkGFuEZFYWJq2Yf/PkFGOX+IN0CjgpFB0pGfZSJcIG7mvscurfG/KvckLhNUINprUKt0pJ8iCN0iufsbmrOnuG+WC8AHktvlSxzHSfCm8zmhSZTkDNkJfpYHapFagQQThmiYq8PqsVIC0XOz+j4KLljc6bxyhE0oPtOPg4DohBdqLI28V1XB/Kqh7CCZR50wAw567voWVOtKsyets5oeywZH1q/gtK6stC5t7v+a2s0w1I2IEW6p2aPy7plreZj15QCgIR8h6JgIuMuwqiaVCUuhej/GauCZG/9jIBJpTf1NkBa9k4vIxHPq5R5/ltYX8za49vz5ImdLe1qlTFwy9fegMpb+D5m3y3ilm+t5xkDmqXQau1oVWIVd8jf0DawWqkNsKLp6hbYr51gclS+Gc7NVKwvFtcmoAfbvNCGBDH4vF6cR2wNhy6RDjjqDgIStnpUs3fKS9bKOyrv9+394esQqEuAXgLtC2vUMk+z3Hf8V18AFYKZfZmWxiGGrjI6YQCBOBOdh5VO5cASqtoTU22OvAPhXT7gX2JG96Rc9yf/K8DEvzuWo3lArDAclh2zLm++1SOh54dDiAiMZvLkNXu5tAsg60c+rJCx4FQ9ra0/GcFY1LKJntdKvpQyBkp4wKAvq3YyV7Rnx8u6PULXXG2rS6i7m+asLrY+FSCO5oRmLrMv5pEv0cF/BOAh0RGR6medX8ASmM40sHqz+WC9WJfaSUZplSzQwHxXCr/AzK40mOTtKgkg8e8tqwNzjI8mdjx0kwcu8zuOeUK6U6l83voGKbli1gzinkLvzhjvF1TXZwpT1y/HvAs5dGwXVfdigeOqcfmIOxXStPmaZ4CZRKVK3CgweYzpETyT6Pm5H3jANcAuyYuphJr7YrfHfWKAg6N3Q0r3AfzliOuIBm3DVfm2RuI8USGJxRsjaDX8LB8sdhrCPLUYBh1RNhYol5bVEM1IX+BcpXzIyqv00eSMTvN3G7KdsM+/8LGlnEM+apIgnBlVfcWOQI8rzBkXuJvExSwDhKzncGWbi12UapEVsE/QnVpDiwbiPdZtQQzQ=
|
2016-11-26 14:13:55 +00:00
|
|
|
GDRIVE_CLIENT_ID:
|
2016-11-27 00:24:22 +00:00
|
|
|
secure: iGAZpJPOTLhRmK7X60xzRZm1S0PbmoMwoVJdd8WiKBH34Tqsd6UEFhPjLLok7J0+xWStS8E3fwEQh4Wzn1BCXhry5Qv8FLD41oskVpiSwdc=
|
2016-11-26 14:13:55 +00:00
|
|
|
GDRIVE_CLIENT_SECRET:
|
2016-11-27 00:24:22 +00:00
|
|
|
secure: 7J8TZnhr3MsF5rveMVVkbrr9tzTwGG6rHWZMorW0WN4=
|
2016-11-26 14:13:55 +00:00
|
|
|
GDRIVE_KIVY_UPLOAD_ID: 0B1_HB9J8mZepOV81UHpDbmg5SWM
|
|
|
|
USE_SDL2: 1
|
|
|
|
USE_GSTREAMER: 1
|
|
|
|
KIVY_USE_SETUPTOOLS: 1
|
|
|
|
matrix:
|
2016-12-07 09:42:03 +00:00
|
|
|
- PYVER: 27
|
|
|
|
BITTNESS: 86
|
2017-01-31 19:25:43 +00:00
|
|
|
COMPILER: mingw
|
2016-12-19 04:20:24 +00:00
|
|
|
- PYVER: 27
|
2016-12-07 09:42:03 +00:00
|
|
|
BITTNESS: 64
|
2017-01-31 19:25:43 +00:00
|
|
|
COMPILER: mingw
|
2016-11-26 14:13:55 +00:00
|
|
|
- PYVER: 34
|
|
|
|
BITTNESS: 86
|
2017-01-31 19:25:43 +00:00
|
|
|
COMPILER: mingw
|
2016-11-26 14:13:55 +00:00
|
|
|
- PYVER: 34
|
|
|
|
BITTNESS: 64
|
2017-01-31 19:25:43 +00:00
|
|
|
COMPILER: mingw
|
2016-12-19 04:20:24 +00:00
|
|
|
- PYVER: 35
|
|
|
|
BITTNESS: 86
|
2017-01-31 19:25:43 +00:00
|
|
|
COMPILER: msvc
|
2016-12-19 04:20:24 +00:00
|
|
|
- PYVER: 35
|
|
|
|
BITTNESS: 64
|
2017-01-31 19:25:43 +00:00
|
|
|
COMPILER: msvc
|
|
|
|
- PYVER: 36
|
|
|
|
BITTNESS: 86
|
|
|
|
COMPILER: msvc
|
|
|
|
- PYVER: 36
|
|
|
|
BITTNESS: 64
|
|
|
|
COMPILER: msvc
|
2016-11-26 14:13:55 +00:00
|
|
|
install:
|
|
|
|
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-desktop.ps1'))
|
|
|
|
build_script:
|
|
|
|
- ps: >-
|
|
|
|
function Check-Error
|
|
|
|
|
|
|
|
{
|
|
|
|
param([int]$SuccessVal = 0)
|
|
|
|
if ($SuccessVal -ne $LastExitCode) {
|
|
|
|
throw "Failed with exit code $LastExitCode"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
echo "Bitness=$env:BITTNESS, scheduled=$env:APPVEYOR_SCHEDULED_BUILD, forced=$env:APPVEYOR_FORCED_BUILD, rebuild=$env:APPVEYOR_RE_BUILD, tagged=$env:APPVEYOR_REPO_TAG"
|
|
|
|
|
|
|
|
|
|
|
|
cd $env:APPVEYOR_BUILD_FOLDER
|
|
|
|
|
|
|
|
git clone -q --branch=master https://github.com/kivy/kivy-sdk-packager.git C:\projects\kivy-sdk-packager
|
|
|
|
|
|
|
|
Check-Error
|
|
|
|
|
|
|
|
|
|
|
|
$PYTHONPATH = "$env:APPVEYOR_BUILD_FOLDER;$PYTHONPATH"
|
|
|
|
|
|
|
|
echo "Build folder: $env:APPVEYOR_BUILD_FOLDER. Wheel folder: $env:WHEEL_DIR."
|
|
|
|
|
|
|
|
mkdir "$env:KIVY_BUILD_DIR"
|
|
|
|
|
|
|
|
Check-Error
|
|
|
|
|
|
|
|
mkdir "$env:WHEEL_DIR"
|
|
|
|
|
|
|
|
Check-Error
|
|
|
|
|
|
|
|
|
|
|
|
C:\Python27\Scripts\pip.exe install pydrive
|
|
|
|
|
|
|
|
Check-Error
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($env:BITTNESS -eq "64") {
|
|
|
|
$PYTHON_ROOT = "C:\Python$env:PYVER-x64"
|
|
|
|
$WHELL_BITNESS = "win_amd64"
|
|
|
|
} else {
|
|
|
|
$PYTHON_ROOT = "C:\Python$env:PYVER"
|
|
|
|
$WHELL_BITNESS = "win32"
|
|
|
|
}
|
|
|
|
|
|
|
|
$env:PATH = "$PYTHON_ROOT;$PYTHON_ROOT\Scripts;$env:PATH;C:\Program Files\7-Zip"
|
|
|
|
|
2016-11-28 00:54:30 +00:00
|
|
|
$env:PATH = $PYTHON_ROOT+"\share\glew\bin;"+$PYTHON_ROOT+"\share\sdl2\bin;"+$PYTHON_ROOT+"\share\gstreamer\bin;"+$env:PATH
|
2016-11-26 14:13:55 +00:00
|
|
|
|
2017-01-27 23:11:12 +00:00
|
|
|
$WHEEL_DATE = python -c "from datetime import datetime;print(datetime.utcnow().strftime('%Y%m%d'))"
|
2016-11-26 14:13:55 +00:00
|
|
|
|
|
|
|
Check-Error
|
|
|
|
|
|
|
|
$GIT_TAG = git rev-parse --short HEAD
|
|
|
|
|
|
|
|
Check-Error
|
|
|
|
|
|
|
|
python -c "import kivy"
|
|
|
|
|
|
|
|
Check-Error
|
|
|
|
|
|
|
|
$WHEEL_VERSION = python -c "import kivy;print(kivy.__version__)" --config "kivy:log_level:error"
|
|
|
|
|
|
|
|
Check-Error
|
|
|
|
|
2016-12-07 09:42:03 +00:00
|
|
|
echo "Kivy version is: $WHEEL_VERSION"
|
|
|
|
|
2016-11-26 14:13:55 +00:00
|
|
|
python -c "import sys;print('Python version is {}'.format(sys.version))"
|
|
|
|
|
|
|
|
Check-Error
|
|
|
|
|
|
|
|
$env:DO_TEST = "True"
|
|
|
|
|
|
|
|
if ($env:APPVEYOR_SCHEDULED_BUILD -eq "True"){
|
|
|
|
$env:DO_TEST = "False"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-11-29 23:21:32 +00:00
|
|
|
$DO_WHEEL = "True"
|
|
|
|
|
2017-01-28 18:54:46 +00:00
|
|
|
# Set new wheel name, keep default if release (tag)
|
|
|
|
# release: Kivy-X.Y.Z-cpAB-cpABm-ARCH.whl
|
|
|
|
# nightly: Kivy-X.Y.Z.dev0-cpAB-cpABm-ARCH.whl
|
|
|
|
# archive: Kivy-X.Y.Z.dev0.YYYYMMDD.githash-cpAB-cpABm-ARCH.whl
|
|
|
|
|
2016-11-26 14:13:55 +00:00
|
|
|
if ($env:APPVEYOR_REPO_TAG -eq "true"){
|
2017-01-28 18:54:46 +00:00
|
|
|
$WHEEL_NAME = "dev0-cp"
|
2016-11-26 14:13:55 +00:00
|
|
|
} elseif ($env:APPVEYOR_SCHEDULED_BUILD -eq "True" -or $env:APPVEYOR_FORCED_BUILD -eq "True" -or $env:APPVEYOR_RE_BUILD -eq "True"){
|
2017-01-28 18:54:46 +00:00
|
|
|
$WHEEL_NAME = "dev0.$WHEEL_DATE`.$GIT_TAG-cp"
|
2016-11-26 14:13:55 +00:00
|
|
|
} else {
|
|
|
|
$DO_WHEEL = "False"
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($env:APPVEYOR_REPO_BRANCH -ne "master") {
|
|
|
|
$DO_WHEEL = "False"
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "test=$env:DO_TEST, make_wheel=$DO_WHEEL"
|
|
|
|
|
2016-12-19 04:20:24 +00:00
|
|
|
python -m pip install pip wheel setuptools --upgrade
|
2016-11-26 14:13:55 +00:00
|
|
|
|
2016-12-19 04:20:24 +00:00
|
|
|
Check-Error
|
|
|
|
|
2017-01-31 19:25:43 +00:00
|
|
|
if ($env:COMPILER -ne "msvc") {
|
2016-11-26 14:13:55 +00:00
|
|
|
python -c "with open(r'$PYTHON_ROOT\Lib\distutils\distutils.cfg', 'wb') as fh: fh.write(b'[build]\ncompiler = mingw32\n')"
|
|
|
|
Check-Error
|
|
|
|
pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy
|
|
|
|
Check-Error
|
2016-12-19 04:20:24 +00:00
|
|
|
}
|
2016-11-26 14:13:55 +00:00
|
|
|
|
2016-12-19 08:37:47 +00:00
|
|
|
pip install mock cython pygments docutils nose kivy.deps.glew_dev kivy.deps.glew kivy.deps.gstreamer_dev kivy.deps.sdl2_dev kivy.deps.sdl2
|
|
|
|
|
2016-12-20 08:01:42 +00:00
|
|
|
pip --no-cache-dir install kivy.deps.gstreamer
|
2016-12-19 04:23:53 +00:00
|
|
|
|
2016-12-19 04:20:24 +00:00
|
|
|
Check-Error
|
2016-11-26 14:13:55 +00:00
|
|
|
|
2017-01-31 19:25:43 +00:00
|
|
|
if ($env:COMPILER -eq "msvc") {
|
2016-12-19 04:20:24 +00:00
|
|
|
pip install kivy.deps.angle
|
2016-11-26 14:13:55 +00:00
|
|
|
Check-Error
|
2016-12-19 04:20:24 +00:00
|
|
|
}
|
2016-11-26 15:10:44 +00:00
|
|
|
|
2016-12-19 04:20:24 +00:00
|
|
|
Copy-Item "$PYTHON_ROOT\Lib\site-packages\kivy\deps\*" -destination "$env:APPVEYOR_BUILD_FOLDER\kivy\deps" -recurse
|
2016-12-19 04:23:53 +00:00
|
|
|
|
2016-12-19 04:20:24 +00:00
|
|
|
Remove-Item "$PYTHON_ROOT\Lib\site-packages\kivy" -Force -Recurse
|
2016-12-19 04:23:53 +00:00
|
|
|
|
2016-12-19 04:20:24 +00:00
|
|
|
if ($env:DO_TEST -eq "True" -or $DO_WHEEL -eq "True") {
|
2016-11-26 15:20:43 +00:00
|
|
|
python setup.py build_ext --inplace
|
2016-11-26 15:10:44 +00:00
|
|
|
Check-Error
|
|
|
|
}
|
2016-11-26 14:13:55 +00:00
|
|
|
|
|
|
|
if ($DO_WHEEL -eq "True") {
|
|
|
|
python setup.py bdist_wheel -d "$env:WHEEL_DIR"
|
|
|
|
Check-Error
|
|
|
|
|
2017-01-28 18:54:46 +00:00
|
|
|
# Default file bdist_wheel creates:
|
|
|
|
# Kivy-X.Y.Z[.dev0]-cpAB-cpABm-ARCH.whl
|
|
|
|
|
|
|
|
$WHEEL_DEFAULT = python -c "from os import listdir;print(listdir(r'$env:WHEEL_DIR')[0])"
|
|
|
|
|
|
|
|
echo "Wheel file: $env:WHEEL_DIR\$WHEEL_DEFAULT"
|
|
|
|
|
|
|
|
$WHEEL_NIGHTLY = $WHEEL_DEFAULT.Replace("dev0-cp", $WHEEL_NAME)
|
|
|
|
|
|
|
|
echo "Nightly file: $env:WHEEL_DIR\$WHEEL_NIGHTLY"
|
2016-12-07 09:42:03 +00:00
|
|
|
|
2016-11-26 14:13:55 +00:00
|
|
|
Check-Error
|
2016-12-07 09:42:03 +00:00
|
|
|
|
2017-01-28 18:54:46 +00:00
|
|
|
echo "Copying from default $WHEEL_DEFAULT to nightly $WHEEL_NIGHTLY"
|
|
|
|
Copy-Item "$env:WHEEL_DIR\$WHEEL_DEFAULT" "$env:WHEEL_DIR\$WHEEL_NIGHTLY"
|
2016-12-07 09:42:03 +00:00
|
|
|
Check-Error
|
|
|
|
|
|
|
|
dir "$env:WHEEL_DIR"
|
2016-11-26 14:13:55 +00:00
|
|
|
|
|
|
|
C:\Python27\python.exe C:\projects\kivy-sdk-packager\win\gdrive.py upload "$env:GDRIVE_KIVY_UPLOAD_ID" "$env:WHEEL_DIR\*"
|
|
|
|
Check-Error
|
|
|
|
|
|
|
|
C:\Python27\python.exe C:\projects\kivy-sdk-packager\win\gdrive.py delete_older "$env:GDRIVE_KIVY_UPLOAD_ID" "15"
|
|
|
|
Check-Error
|
|
|
|
}
|
|
|
|
test_script:
|
|
|
|
- ps: >-
|
|
|
|
function Check-Error
|
|
|
|
|
|
|
|
{
|
|
|
|
param([int]$SuccessVal = 0)
|
|
|
|
if ($SuccessVal -ne $LastExitCode) {
|
|
|
|
throw "Failed with exit code $LastExitCode"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($env:DO_TEST -eq "True"){
|
2017-01-31 19:25:43 +00:00
|
|
|
if ($env:COMPILER -eq "msvc") {
|
2016-12-19 04:29:36 +00:00
|
|
|
$env:KIVY_GL_BACKEND = "angle_sdl2"
|
2016-12-19 04:20:24 +00:00
|
|
|
} else {
|
2016-12-19 04:37:22 +00:00
|
|
|
$env:KIVY_GL_BACKEND = "mock"
|
2016-12-19 04:20:24 +00:00
|
|
|
}
|
|
|
|
|
2016-11-26 14:13:55 +00:00
|
|
|
python -m nose.core kivy/tests
|
|
|
|
Check-Error
|
2016-12-19 04:20:24 +00:00
|
|
|
}
|