From 1695a0a9994b9a1ef88758e435f298465bc905e1 Mon Sep 17 00:00:00 2001 From: Ales Erjavec Date: Tue, 26 Sep 2017 15:07:19 +0200 Subject: [PATCH] appveyor: Test using scipy 1.0.0b1 openblas linked wheels --- .ci_tools/appveyor/build.cmd | 21 ----- .ci_tools/appveyor/patch-vcvars.bat | 10 +++ .ci_tools/appveyor/step-build.ps1 | 12 --- .ci_tools/appveyor/step-install.ps1 | 11 --- .ci_tools/appveyor/step-test-miniconda.ps1 | 39 ---------- .ci_tools/appveyor/step-test.ps1 | 87 --------------------- appveyor.yml | 91 ++++++++++++---------- 7 files changed, 58 insertions(+), 213 deletions(-) delete mode 100644 .ci_tools/appveyor/build.cmd create mode 100644 .ci_tools/appveyor/patch-vcvars.bat delete mode 100644 .ci_tools/appveyor/step-build.ps1 delete mode 100644 .ci_tools/appveyor/step-install.ps1 delete mode 100644 .ci_tools/appveyor/step-test-miniconda.ps1 delete mode 100644 .ci_tools/appveyor/step-test.ps1 diff --git a/.ci_tools/appveyor/build.cmd b/.ci_tools/appveyor/build.cmd deleted file mode 100644 index e6531ebe4e4..00000000000 --- a/.ci_tools/appveyor/build.cmd +++ /dev/null @@ -1,21 +0,0 @@ - @echo off -:: To build extensions for 64 bit Python 3, we need to configure environment -:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: -:: MS Windows SDK for Windows 7 and .NET Framework 4 -:: -:: More details at: -:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows - -IF "%DISTUTILS_USE_SDK%"=="1" ( - ECHO Configuring environment to build with MSVC on a 64bit architecture - ECHO Using Windows SDK 7.1 - "C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkVer.exe" -q -version:v7.1 - CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release - SET MSSdk=1 - REM Need the following to allow tox to see the SDK compiler - SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB -) ELSE ( - ECHO Using default MSVC build environment -) - -CALL %* diff --git a/.ci_tools/appveyor/patch-vcvars.bat b/.ci_tools/appveyor/patch-vcvars.bat new file mode 100644 index 00000000000..722c25b5206 --- /dev/null +++ b/.ci_tools/appveyor/patch-vcvars.bat @@ -0,0 +1,10 @@ +@echo off +setlocal +:: The VS 2010 64-bit toolchain is missing a vcvars64.bat that distutils is +:: using to query the compiler. +set "vcvars=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat" +if not exist "%vcvars%" ( + echo CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /Release +) > "%vcvars%" +endlocal +@echo on diff --git a/.ci_tools/appveyor/step-build.ps1 b/.ci_tools/appveyor/step-build.ps1 deleted file mode 100644 index 6e0591806af..00000000000 --- a/.ci_tools/appveyor/step-build.ps1 +++ /dev/null @@ -1,12 +0,0 @@ - -if (Test-Path dist) { - Remove-Item -Recurse -Force dist -} - -python setup.py clean --all - -cmd.exe /c @" -.ci_tools\appveyor\build.cmd python setup.py $env:BUILD_GLOBAL_OPTIONS bdist_wheel --dist-dir dist -"@ - -if ($LastExitCode -ne 0) { throw "Last command exited with non-zero code." } diff --git a/.ci_tools/appveyor/step-install.ps1 b/.ci_tools/appveyor/step-install.ps1 deleted file mode 100644 index 697e87923de..00000000000 --- a/.ci_tools/appveyor/step-install.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -# Install build requirements - -python -m ensurepip -python -m pip install pip==8.1.* wheel==0.29.* - -python -m pip install ` - --extra-index-url $env:STAGING_INDEX ` - --only-binary numpy ` - numpy==$env:NUMPY_BUILD_VERSION - -if ($LastExitCode -ne 0) { throw "Last command exited with non-zero code." } diff --git a/.ci_tools/appveyor/step-test-miniconda.ps1 b/.ci_tools/appveyor/step-test-miniconda.ps1 deleted file mode 100644 index 4e55e3fd4ff..00000000000 --- a/.ci_tools/appveyor/step-test-miniconda.ps1 +++ /dev/null @@ -1,39 +0,0 @@ - -echo "Building and testing using conda in: $env:MINICONDA" -echo "" - -if (-not($env:MINICONDA)) { throw "MINICONDA env variable must be defined" } - -$python = "$env:MINICONDA\python" -$conda = "$env:MINICONDA\Scripts\conda" - -# Need at least conda 4.1.0 (channel priorities) - -& "$conda" install --yes "conda>=4.1.0" - -# add conda-forge channel -& "$conda" config --append channels conda-forge - -# some required packages that are not on conda-forge -& "$conda" config --append channels ales-erjavec - -& "$conda" install --yes conda-build=2.1.15 - -echo "Conda info" -echo "----------" -& "$conda" info -echo "" - -echo "Starting conda build" -echo "--------------------" -& "$conda" build conda-recipe - -if ($LastExitCode -ne 0) { throw "Last command exited with non-zero code." } - -# also copy build conda pacakge to build artifacts -echo "copying conda package to dist/conda" -echo "-----------------------------------" - -$pkgpath = & "$conda" build --output conda-recipe -mkdir -force dist/conda | out-null -cp "$pkgpath" dist/conda/ diff --git a/.ci_tools/appveyor/step-test.ps1 b/.ci_tools/appveyor/step-test.ps1 deleted file mode 100644 index 63016b43e99..00000000000 --- a/.ci_tools/appveyor/step-test.ps1 +++ /dev/null @@ -1,87 +0,0 @@ - -echo "Setting up a testing env in $env:USERPROFILE\testenv" - -python -m venv --clear $env:USERPROFILE\testenv - -& $env:USERPROFILE\testenv\Scripts\Activate.ps1 - -$version = python setup.py --version - -python -c 'import sys; print(\"sys.prefix:\", sys.prefix); print(sys.version)' -python -m pip install pip==8.1.* wheel==0.29.* - -# run install and test from a empty dir to avoid imports from current dir - -mkdir -force build/testdir | out-null -pushd - -try { - cd build/testdir - - # Install scipy from staging index (contains scipy - # extracted form the legacy superpack installers (sse2 builds)) - - python -m pip install ` - --extra-index-url "$env:STAGING_INDEX" ` - --only-binary "numpy,scipy,scikit-learn,bottleneck" ` - numpy~=1.12.1 scipy scikit-learn==0.18.1 - - if ($LastExitCode -ne 0) { throw "Last command exited with non-zero code." } - - - # Install specific Orange3 version - python -m pip install --no-deps --no-index ` - --find-links ../../dist ` - Orange3==$version - - if ($LastExitCode -ne 0) { throw "Last command exited with non-zero code." } - - # Instal other remaining dependencies - python -m pip install ` - --extra-index-url "$env:STAGING_INDEX" ` - --only-binary "numpy,scipy" ` - Orange3==$version - - if ($LastExitCode -ne 0) { throw "Last command exited with non-zero code." } - - echo "Test environment:" - echo "-----------------" - python -m pip freeze - echo "-----------------" - - # Run core tests - echo "Running tests" - echo "-------------" - python -m unittest -v Orange.tests - - if ($LastExitCode -ne 0) { throw "Last command exited with non-zero code." } - - # Widget tests - python -m pip install ` - --index-url "$Env:STAGING_INDEX" ` - PyQt5 - - echo "Running widget tests with PyQt5" - echo "-------------------------------" - try { - $Env:ANYQT_HOOK_BACKPORT = "pyqt4" - python -m unittest -v Orange.widgets.tests - if ($LastExitCode -ne 0) { throw "Last command exited with non-zero code." } - } finally { - $Env:ANYQT_HOOK_BACKPORT = "" - } - - python -m pip uninstall --yes PyQt5 - python -m pip install ` - --extra-index-url "$Env:STAGING_INDEX" ` - PyQt4 - - echo "Running widget tests with PyQt4" - echo "-------------------------------" - - python -m unittest -v Orange.widgets.tests - if ($LastExitCode -ne 0) { throw "Last command exited with non-zero code." } - -} finally { - popd -} diff --git a/appveyor.yml b/appveyor.yml index 835880bcdac..1efd98cca92 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,6 +7,7 @@ skip_commits: - benchmark - tutorials +shallow_clone: true clone_depth: 30 matrix: @@ -14,69 +15,73 @@ matrix: environment: global: - STAGING_INDEX: 'https://pypi.anaconda.org/ales-erjavec/simple' - NUMPY_BUILD_VERSION: '1.9.3' PIP_DISABLE_PIP_VERSION_CHECK: 1 + # disable threaded builds on Python 3.5+ when using numpy's distutils + # (https://github.com/numpy/numpy/issues/7607) + BUILD_GLOBAL_OPTIONS: build -j1 + BUILD_ENV: wheel==0.29.0 pip==9.0.1 numpy==1.9.3 + TEST_ENV: numpy==1.12.1 scipy==1.0.0b1 scikit-learn PyQt5~=5.9.0 matrix: - PYTHON: C:\Python34 - MINICONDA: C:\Miniconda3 - # BUILD_INSTALLER: '1' + BUILD_GLOBAL_OPTIONS: build + # override test env for Py34; test with PyQt4 and legacy scipy + # from the 'super' installer. + TEST_ENV: numpy==1.12.1 scipy==0.16.1 scikit-learn PyQt4==4.11.4 - PYTHON: C:\Python34-x64 - MINICONDA: C:\Miniconda3-x64 - DISTUTILS_USE_SDK: '1' + BUILD_GLOBAL_OPTIONS: build + TEST_ENV: numpy==1.12.1 scipy==1.0.0b1 scikit-learn PyQt5==5.5.1 - PYTHON: C:\Python35 - MINICONDA: C:\Miniconda35 - # disable threaded builds on Python 3.5 when using numpy's distutils - # (https://github.com/numpy/numpy/issues/7607) - BUILD_GLOBAL_OPTIONS: build -j1 - PYTHON: C:\Python35-x64 - # disable threaded builds on Python 3.5 when using numpy's distutils - # (https://github.com/numpy/numpy/issues/7607) - BUILD_GLOBAL_OPTIONS: build -j1 - MINICONDA: C:\Miniconda35-x64 + + - PYTHON: C:\Python36 + + - PYTHON: C:\Python36-x64 cache: - '%LOCALAPPDATA%\pip\cache -> appveyor.yml' install: - - ps: $env:PATH="$env:PYTHON;$env:PYTHON\Scripts;$env:PATH" - - ps: .ci_tools\appveyor\step-install.ps1 - -build_script: - - ps: | - & .ci_tools\appveyor\step-build.ps1 - if ($env:BUILD_INSTALLER) { - $env:PATH="C:\Program Files (x86)\NSIS;C:\msys2\bin;$env:PATH" + # Patch VC 2010 64-bit toolchain + - call .ci_tools/appveyor/patch-vcvars.bat + # Configure pip: Add extra links url, force binary numpy, scipy, ... + - echo [install]> pip.ini + - echo find-links =>> pip.ini + - echo https://orange.biolab.si/download/files/wheelhouse/>> pip.ini + - echo only-binary = numpy,scipy,bottleneck,scikit-learn>> pip.ini + - set "PIP_CONFIG_FILE=%CD%\pip.ini" + - type %PIP_CONFIG_FILE% - bash scripts\windows\build-win-application.sh -d dist\installers - if ($LastExitCode -ne 0) { throw "Last command exited with non-zero code." } + - set "PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%" + - python -m ensurepip + - python -m pip install pip~=9.0.1 wheel~=0.29.0 + - python -m pip install %BUILD_ENV_INDEX% %BUILD_ENV% - bash scripts\windows\build-win-application.sh ` - -d installers ` - --standalone - if ($LastExitCode -ne 0) { throw "Last command exited with non-zero code." } - } +build_script: + - python -m pip list --format=freeze + - python setup.py clean --all + # get the package version + - for /f %%f in ('python setup.py --version') do ( set "VERSION=%%f" ) + - python setup.py %BUILD_GLOBAL_OPTIONS% bdist_wheel test_script: + - python -m venv --clear build\.test + - build\.test\Scripts\activate + - cd build\.test + # Pre-populate the test environment + - python -m pip install pip~=9.0.1 wheel~=0.29.0 + - python -m pip install %TEST_ENV_INDEX% %TEST_ENV% + - python -m pip install --pre -f ..\..\dist orange3==%VERSION% + - python -m pip list --format=freeze + # Raise OrangeDeprecationWarnings as errors - - ps: $env:ORANGE_DEPRECATIONS_ERROR = "1" - - ps: $env:PYTHONWARNINGS = "module" - - ps: | - if ($env:PYTHON -eq "C:\Python34") { - # can only test the .whl build on Python 3.4 32-bit because that - # is the only platform for which built scipy wheels are available - & .ci_tools\appveyor\step-test.ps1 - } - if ($env:MINICONDA) { - # Build/test a conda package - & .ci_tools\appveyor\step-test-miniconda.ps1 - } + - set ORANGE_DEPRECATIONS_ERROR=1 + - set PYTHONWARNINGS=module + - python -m unittest -b -v Orange.tests Orange.widgets.tests + - cd ..\.. artifacts: - path: dist\*.whl - - path: dist\conda\* - - path: dist\installers\*