Skip to content

Commit d2cafbb

Browse files
committed
Clean up AppVeyor config
1 parent 7b76a1b commit d2cafbb

File tree

1 file changed

+35
-28
lines changed

1 file changed

+35
-28
lines changed

appveyor.yml

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,72 @@
11
version: '{branch}-{build}'
2+
build: off
23

34
platform:
45
- x86
56
- x64
67

78
environment:
89
global:
9-
PYTHONPATH: "C:\\testdir"
10-
PYTHONWARNINGS: "ignore:::wheel.pep425tags:"
11-
CONDA_BLD_VERSION: "3.5"
12-
CONDA_BLD: "C:\\conda"
13-
NUNIT: "nunit-console"
10+
PYTHONUNBUFFERED: True
11+
PYTHONWARNINGS: 'ignore:::wheel.pep425tags:'
12+
PYTHONPATH: C:\testdir
13+
NUNIT: nunit-console
14+
CONDA_BLD: C:\conda
15+
CONDA_BLD_VERSION: 3.5
1416

1517
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
1618
# /E:ON and /V:ON options are not enabled in the batch script interpreter
1719
# See: http://stackoverflow.com/a/13751649/163740
18-
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci\\run_with_env.cmd"
20+
CMD_IN_ENV: 'cmd /E:ON /V:ON /C .\ci\run_with_env.cmd'
1921

2022
matrix:
21-
- PYTHON_VERSION: "2.7"
22-
- PYTHON_VERSION: "3.3"
23-
- PYTHON_VERSION: "3.4"
24-
- PYTHON_VERSION: "3.5"
25-
- PYTHON_VERSION: "3.6"
23+
- PYTHON_VERSION: 2.7
24+
- PYTHON_VERSION: 3.3
25+
- PYTHON_VERSION: 3.4
26+
- PYTHON_VERSION: 3.5
27+
- PYTHON_VERSION: 3.6
2628

2729
init:
2830
# Prepare environment
2931
- mkdir C:\testdir
3032

3133
# Set environment variables depending based on build cfg
32-
- SET CONDA_PY=%PYTHON_VERSION:.=%
33-
- SET CONDA_BLD_ARCH=%PLATFORM:x=%
34-
- SET PYTHON=C:\PYTHON%CONDA_PY%
35-
- IF %PLATFORM%==x86 (SET CONDA_BLD_ARCH=32)
36-
- IF %PLATFORM%==x86 (SET NUNIT=%NUNIT%-x86)
37-
- IF %PLATFORM%==x64 (SET PYTHON=%PYTHON%-x64)
34+
- set CONDA_PY=%PYTHON_VERSION:.=%
35+
- set CONDA_BLD_ARCH=%PLATFORM:x=%
36+
- set PYTHON=C:\PYTHON%PYTHON_VERSION:.=%
37+
- if %PLATFORM%==x86 (set CONDA_BLD_ARCH=32)
38+
- if %PLATFORM%==x86 (set NUNIT=%NUNIT%-x86)
39+
- if %PLATFORM%==x64 (set PYTHON=%PYTHON%-x64)
40+
41+
# Prepend newly installed Python to the PATH of this build
42+
- set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
43+
44+
# Check that we have the expected version, architecture for Python
45+
- python --version
46+
- python -c "import struct; print(struct.calcsize('P') * 8)"
47+
- python -c "import ctypes; print(ctypes.sizeof(ctypes.c_wchar))"
3848

3949
install:
4050
# install conda and deps
4151
- ps: .\ci\install_miniconda.ps1
4252

4353
# install for wheels
44-
- "%PYTHON%\\python.exe -m pip install --upgrade pip"
45-
- "%PYTHON%\\python.exe -m pip install wheel"
46-
- "%PYTHON%\\python.exe -m pip install six"
54+
- pip install --upgrade pip wheel six
4755

4856
build_script:
4957
# build clean sdist & wheel
50-
- "%PYTHON%\\python.exe setup.py sdist bdist_wheel"
58+
- python setup.py sdist bdist_wheel
5159

5260
# build and dist conda package
53-
- cmd: "%CMD_IN_ENV% %CONDA_BLD%\\Scripts\\conda build conda.recipe"
54-
- ps: $CONDA_PKG=(& "$env:CONDA_BLD\\Scripts\\conda" build conda.recipe --output -q)
55-
- ps: copy-item $CONDA_PKG "$env:APPVEYOR_BUILD_FOLDER\\dist\\"
61+
- '%CMD_IN_ENV% %CONDA_BLD%\Scripts\conda build conda.recipe'
62+
- ps: $CONDA_PKG=(&"$env:CONDA_BLD\Scripts\conda" build conda.recipe --output -q)
63+
- ps: Copy-Item $CONDA_PKG "$env:APPVEYOR_BUILD_FOLDER\dist\"
5664

5765
test_script:
58-
- ps: '& "$env:PYTHON\\Scripts\\pip.exe" install --no-cache-dir --force-reinstall --ignore-installed ("dist\\" + (gci dist\*.whl)[0].Name)'
59-
- ps: copy-item (gci -path build -re -include Python.Test.dll)[0].FullName C:\testdir
60-
- "%PYTHON%\\python.exe src\\tests\\runtests.py"
66+
- pip install --no-index --find-links=.\dist\ pythonnet
67+
- ps: Copy-Item (Resolve-Path .\build\*\Python.Test.dll) C:\testdir
68+
- python src\tests\runtests.py
6169
# - "%NUNIT% src/embed_tests/bin/%PLATFORM%/ReleaseWin/Python.EmbeddingTest.dll"
6270

6371
artifacts:
64-
# bdist_wheel puts your built wheel in the dist directory
6572
- path: dist\*

0 commit comments

Comments
 (0)