Skip to content

Commit b4b0b53

Browse files
committed
appveyor.yml: Mobanise appveyor
Closes #265
1 parent 2e04009 commit b4b0b53

File tree

3 files changed

+115
-57
lines changed

3 files changed

+115
-57
lines changed

.ci/appveyor.yml

+23-10
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@ environment:
44
# /E:ON and /V:ON options are not enabled in the batch script intepreter
55
# See: http://stackoverflow.com/a/13751649/163740
66
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\.ci\\run_with_env.cmd"
7+
PIP_CACHE_DIR: C:\pip_cache
78

89
matrix:
910
- PYTHON: "C:\\Python34"
10-
PYTHON_VERSION: "3.4"
11+
PYTHON_VERSION: "3.4.4"
1112
PYTHON_ARCH: "32"
1213

1314
- PYTHON: "C:\\Python34-x64"
14-
PYTHON_VERSION: "3.4"
15+
PYTHON_VERSION: "3.4.4"
1516
PYTHON_ARCH: "64"
1617

1718
cache:
1819
- "C:\\pip_cache"
20+
- "node_modules"
21+
- "C:\\Users\\appveyor\\AppData\\Local\\coala-bears\\coala-bears"
22+
- "C:\\Users\\appveyor\\AppData\\Roaming\\nltk_data"
1923

2024
branches:
2125
except:
@@ -25,23 +29,32 @@ install:
2529
# Prepend newly installed Python to the PATH of this build (this cannot be
2630
# done from inside the powershell script as it would require to restart
2731
# the parent CMD process).
28-
- set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%;
32+
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
2933

3034
# Check that we have the expected version and architecture for Python
3135
- "python --version"
3236
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
33-
34-
- >
35-
"%CMD_IN_ENV% python -m pip install --upgrade pip setuptools
36-
- >
37-
"%CMD_IN_ENV% python -m pip install
38-
--cache-dir=C:\\pip_cache -r requirements.txt -r test-requirements.txt
37+
- "%CMD_IN_ENV% python -m pip install --upgrade setuptools==21"
38+
- "%CMD_IN_ENV% python -m pip install -r requirements.txt \
39+
-r test-requirements.txt"
3940

4041
build: false # Not a C# project, build stuff at the test step instead.
4142

4243
test_script:
43-
- "%CMD_IN_ENV% pytest"
44+
- "%CMD_IN_ENV% py.test"
4445
- "%CMD_IN_ENV% python setup.py install"
46+
- "%CMD_IN_ENV% python -m pip install \
47+
git+https://github.com/coala/coala"
48+
- "%CMD_IN_ENV% python -m pip install \
49+
git+https://github.com/coala/coala-bears"
50+
- sed -i '/ShellCheckBear/d' .coafile
51+
- "%CMD_IN_ENV% coala --ci"
52+
53+
on_success:
54+
- codecov
55+
56+
on_failure:
57+
- codecov
4558

4659
matrix:
4760
fast_finish: true

.ci/run_with_env.cmd

+88-47
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,88 @@
1-
:: To build extensions for 64 bit Python 3, we need to configure environment
2-
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
3-
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
4-
::
5-
:: To build extensions for 64 bit Python 2, we need to configure environment
6-
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
7-
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
8-
::
9-
:: 32 bit builds do not require specific environment configurations.
10-
::
11-
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
12-
:: cmd interpreter, at least for (SDK v7.0)
13-
::
14-
:: More details at:
15-
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
16-
:: http://stackoverflow.com/a/13751649/163740
17-
::
18-
:: Author: Olivier Grisel
19-
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
20-
@ECHO OFF
21-
22-
SET COMMAND_TO_RUN=%*
23-
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
24-
25-
SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%"
26-
IF %MAJOR_PYTHON_VERSION% == "2" (
27-
SET WINDOWS_SDK_VERSION="v7.0"
28-
) ELSE IF %MAJOR_PYTHON_VERSION% == "3" (
29-
SET WINDOWS_SDK_VERSION="v7.1"
30-
) ELSE (
31-
ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
32-
EXIT 1
33-
)
34-
35-
IF "%PYTHON_ARCH%"=="64" (
36-
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
37-
SET DISTUTILS_USE_SDK=1
38-
SET MSSdk=1
39-
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
40-
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
41-
ECHO Executing: %COMMAND_TO_RUN%
42-
call %COMMAND_TO_RUN% || EXIT 1
43-
) ELSE (
44-
ECHO Using default MSVC build environment for 32 bit architecture
45-
ECHO Executing: %COMMAND_TO_RUN%
46-
call %COMMAND_TO_RUN% || EXIT 1
47-
)
1+
:: To build extensions for 64 bit Python 3, we need to configure environment
2+
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
3+
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
4+
::
5+
:: To build extensions for 64 bit Python 2, we need to configure environment
6+
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
7+
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
8+
::
9+
:: 32 bit builds, and 64-bit builds for 3.5 and beyond, do not require specific
10+
:: environment configurations.
11+
::
12+
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
13+
:: cmd interpreter, at least for (SDK v7.0)
14+
::
15+
:: More details at:
16+
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
17+
:: http://stackoverflow.com/a/13751649/163740
18+
::
19+
:: Author: Olivier Grisel
20+
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
21+
::
22+
:: Notes about batch files for Python people:
23+
::
24+
:: Quotes in values are literally part of the values:
25+
:: SET FOO="bar"
26+
:: FOO is now five characters long: " b a r "
27+
:: If you don't want quotes, don't include them on the right-hand side.
28+
::
29+
:: The CALL lines at the end of this file look redundant, but if you move them
30+
:: outside of the IF clauses, they do not run properly in the SET_SDK_64==Y
31+
:: case, I don't know why.
32+
@ECHO OFF
33+
34+
SET COMMAND_TO_RUN=%*
35+
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
36+
SET WIN_WDK=c:\Program Files (x86)\Windows Kits\10\Include\wdf
37+
38+
:: Extract the major and minor versions, and allow for the minor version to be
39+
:: more than 9. This requires the version number to have two dots in it.
40+
SET MAJOR_PYTHON_VERSION=%PYTHON_VERSION:~0,1%
41+
IF "%PYTHON_VERSION:~3,1%" == "." (
42+
SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1%
43+
) ELSE (
44+
SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,2%
45+
)
46+
47+
:: Based on the Python version, determine what SDK version to use, and whether
48+
:: to set the SDK for 64-bit.
49+
IF %MAJOR_PYTHON_VERSION% == 2 (
50+
SET WINDOWS_SDK_VERSION="v7.0"
51+
SET SET_SDK_64=Y
52+
) ELSE (
53+
IF %MAJOR_PYTHON_VERSION% == 3 (
54+
SET WINDOWS_SDK_VERSION="v7.1"
55+
IF %MINOR_PYTHON_VERSION% LEQ 4 (
56+
SET SET_SDK_64=Y
57+
) ELSE (
58+
SET SET_SDK_64=N
59+
IF EXIST "%WIN_WDK%" (
60+
:: See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
61+
REN "%WIN_WDK%" 0wdf
62+
)
63+
)
64+
) ELSE (
65+
ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
66+
EXIT 1
67+
)
68+
)
69+
70+
IF %PYTHON_ARCH% == 64 (
71+
IF %SET_SDK_64% == Y (
72+
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
73+
SET DISTUTILS_USE_SDK=1
74+
SET MSSdk=1
75+
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
76+
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
77+
ECHO Executing: %COMMAND_TO_RUN%
78+
call %COMMAND_TO_RUN% || EXIT 1
79+
) ELSE (
80+
ECHO Using default MSVC build environment for 64 bit architecture
81+
ECHO Executing: %COMMAND_TO_RUN%
82+
call %COMMAND_TO_RUN% || EXIT 1
83+
)
84+
) ELSE (
85+
ECHO Using default MSVC build environment for 32 bit architecture
86+
ECHO Executing: %COMMAND_TO_RUN%
87+
call %COMMAND_TO_RUN% || EXIT 1
88+
)

.moban.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ build_version: 0.4.0
99
package_module: coala_quickstart
1010
url: https://github.com/coala/coala-quickstart
1111
docs_dir: false
12+
test_py36: false
1213

1314
maintainers: false
1415
maintainer_list:
@@ -38,6 +39,7 @@ dependencies:
3839
configuration:
3940
template_dir:
4041
- ../coala-mobans/templates/
42+
- ../coala-mobans/assets/
4143
configuration: .moban.yaml
4244
configuration_dir: ../coala-mobans/
4345
targets:
@@ -46,3 +48,5 @@ targets:
4648
- test-requirements.txt: test-requirements.txt.jj2
4749
- coala_quickstart/VERSION: VERSION.jj2
4850
- coala_quickstart/__init__.py: __init__.py.jj2
51+
- .ci/appveyor.yml: ci/appveyor.yml.jj2
52+
- .ci/run_with_env.cmd: run_with_env.cmd

0 commit comments

Comments
 (0)