2
2
3
3
image :
4
4
# linux builds done in Travis CI for now
5
- # - Ubuntu
6
5
- Visual Studio 2015
7
6
- Visual Studio 2017
8
7
- Visual Studio 2019
@@ -15,17 +14,7 @@ cache:
15
14
16
15
install :
17
16
# add python and python user-base to path for pip installs
18
- - cmd : " C:\\ %WINPYTHON%\\ python.exe --version"
19
- - cmd : for /F "tokens=*" %%g in ('C:\\%WINPYTHON%\\python.exe -c "import sys; print(sys.path[-1])"') do (set PYSITEDIR=%%g)
20
- # use mingw 32 bit until #3291 is resolved
21
- - cmd : " set PATH=C:\\ %WINPYTHON%;C:\\ %WINPYTHON%\\ Scripts;C:\\ ProgramData\\ chocolatey\\ bin;C:\\ MinGW\\ bin;C:\\ MinGW\\ msys\\ 1.0\\ bin;C:\\ cygwin\\ bin;C:\\ msys64\\ usr\\ bin;C:\\ msys64\\ mingw64\\ bin;%PATH%"
22
- - cmd : " C:\\ %WINPYTHON%\\ python.exe -m pip install -U --progress-bar off pip setuptools wheel "
23
- - cmd : " C:\\ %WINPYTHON%\\ python.exe -m pip install -U --progress-bar off pypiwin32 coverage codecov"
24
- - cmd : set STATIC_DEPS=true & C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off lxml
25
- # install 3rd party tools to test with
26
- - cmd : choco install --allow-empty-checksums dmd ldc swig vswhere xsltproc winflexbison
27
- - cmd : set SCONS_CACHE_MSVC_CONFIG=true
28
- - cmd : set
17
+ - cmd : .\.appveyor\install.bat
29
18
30
19
# build matrix will be number of images multiplied by each '-' below,
31
20
# less any exclusions.
@@ -72,56 +61,27 @@ matrix:
72
61
73
62
# remove some binaries we don't want to be found
74
63
before_build :
75
- - ps : |
76
- if ($isWindows) {
77
- dir "C:\Program Files\Git\usr\bin\x*.exe"
78
- if (Test-Path "C:\Program Files\Git\usr\bin\xsltproc.EXE" ) {
79
- Remove-Item "C:\Program Files\Git\usr\bin\xsltproc.EXE" -ErrorAction Ignore
80
- }
81
- dir "C:\Program Files\Git\usr\bin\x*.exe"
82
- }
64
+ - ps : .\.appveyor\ignore_git_bins.ps1
83
65
84
66
build : off
85
67
86
68
build_script :
87
69
88
70
# exclude VS 10.0 because it hangs the testing until this is resolved:
89
71
# https://help.appveyor.com/discussions/problems/19283-visual-studio-2010-trial-license-has-expired
90
- - ps : |
91
- New-Item -Name exclude_list.txt -ItemType File
92
- $workaround_image = "Visual Studio 2015"
93
- if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq $workaround_image) {
94
- Add-Content -Path 'exclude_list.txt' -Value 'test\MSVS\vs-10.0-exec.py'
95
- }
72
+ - ps : .\.appveyor\disable_msvc_10.ps1
96
73
97
74
# setup coverage by creating the coverage config file, and adding coverage
98
75
# to the sitecustomize so that all python processes start with coverage
99
- - ps : |
100
- if ($env:COVERAGE -eq 1) {
101
- $env:COVERAGE_PROCESS_START = "$($env:APPVEYOR_BUILD_FOLDER)/.coveragerc";
102
- $env:COVERAGE_FILE = "$($env:APPVEYOR_BUILD_FOLDER)/.coverage";
103
- New-Item -ItemType Directory -Force -Path "$($env:PYSITEDIR)";
104
- $sitecustomizeText = "import os`r`nos.environ['COVERAGE_PROCESS_START'] = '$($env:COVERAGE_PROCESS_START)'`r`nos.environ['COVERAGE_FILE'] = '$($env:COVERAGE_FILE)'`r`nimport coverage`r`ncoverage.process_startup()";
105
- $sitecustomizeText|Set-Content "$($env:PYSITEDIR)/sitecustomize.py";
106
- Get-Content -Path "$($env:PYSITEDIR)/sitecustomize.py";
107
- $coveragercFile = "[run]`r`nsource = $($env:APPVEYOR_BUILD_FOLDER)/SCons`r`nparallel = True`r`ndisable_warnings = trace-changed`r`nomit =`r`n`t*Tests.py`r`n`t*\src\*`r`n`t*\test\*`r`n`t*\testing\*`r`n`t*\template\*`r`n`t*\scripts\*`r`n`t*\scons-time.py`r`n`t*\bootstrap.py`r`n`t*\runtest.py`r`n`t*\setup.py`r`n`r`n[path]`r`nsource = $($env:APPVEYOR_BUILD_FOLDER)`r`n[report]`r`nomit =`r`n`t*Tests.py`r`n`t*\src\*`r`n`t*\test\*`r`n`t*\testing\*`r`n`t*\template\*`r`n`t*\scripts\*`r`n`t*\scons-time.py`r`n`t*\bootstrap.py`r`n`t*\runtest.py`r`n`t*\setup.py`r`n`r`n"
108
- $coveragercFile|Set-Content "$($env:COVERAGE_PROCESS_START)";
109
- Get-Content -Path "$($env:COVERAGE_PROCESS_START)";
110
- }
111
-
112
-
76
+ - ps : .\.appveyor\coverage_setup.ps1
77
+
113
78
# NOTE: running powershell from cmd is intended because
114
79
# it formats the output correctly
115
80
- cmd : powershell -Command "& { if($env:COVERAGE -eq 1) { coverage run -p --rcfile=$($env:COVERAGE_PROCESS_START) runtest.py -j 2 -t --exclude-list exclude_list.txt -a } else { C:\\%WINPYTHON%\\python.exe runtest.py -j 2 -t --exclude-list exclude_list.txt -a }; if($LastExitCode -eq 2 -Or $LastExitCode -eq 0) { $host.SetShouldExit(0 )} else {$host.SetShouldExit(1)}}"
116
81
117
82
# run coverage even if there was a test failure
118
83
on_finish :
119
- - ps : |
120
- if ($env:COVERAGE -eq 1) {
121
- & coverage combine
122
- & coverage report
123
- & coverage xml -i -o coverage_xml.xml
124
- }
84
+ - ps : .\.appveyor\coverage_report.ps1
125
85
# running codecov in powershell causes an error so running in platform
126
86
# shells
127
87
- cmd : if %COVERAGE% equ 1 codecov -X gcov --file coverage_xml.xml
0 commit comments