-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1693 from ales-erjavec/ci-appveyor
[ENH] Add appveyor configuration
- Loading branch information
Showing
12 changed files
with
507 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@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 %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
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) { $host.SetShouldExit($LastExitCode) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# 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) { $host.SetShouldExit($LastExitCode) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
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 | ||
|
||
echo "Conda info" | ||
echo "----------" | ||
& "$conda" info | ||
echo "" | ||
|
||
echo "Starting conda build" | ||
echo "--------------------" | ||
& "$conda" build conda-recipe | ||
|
||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | ||
|
||
# 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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
|
||
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 numpy/scipy from staging index (contains numpy and scipy | ||
# extracted form the legacy superpack installers (sse2 builds)) | ||
|
||
python -m pip install ` | ||
--index-url "$env:STAGING_INDEX" ` | ||
--only-binary "numpy,scipy" numpy scipy | ||
|
||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | ||
|
||
|
||
# Install specific Orange3 version | ||
python -m pip install --no-deps --no-index ` | ||
--find-links ../../dist ` | ||
Orange3==$version | ||
|
||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | ||
|
||
# Instal other remaining dependencies | ||
python -m pip install ` | ||
--extra-index-url "$env:STAGING_INDEX" ` | ||
--only-binary "numpy,scipy" ` | ||
Orange3==$version | ||
|
||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | ||
|
||
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) { $host.SetShouldExit($LastExitCode) } | ||
|
||
# Widget tests | ||
python -m pip install ` | ||
--extra-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) { $host.SetShouldExit($LastExitCode) } | ||
} 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) { $host.SetShouldExit($LastExitCode) } | ||
|
||
} finally { | ||
popd | ||
} |
Oops, something went wrong.