summaryrefslogtreecommitdiffstats
path: root/.appveyor.yml
blob: 7f45e17ca64178395450fee2c9cb6bf24858da66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#version: '3.0.1.{build}'

image: Visual Studio 2017
shallow_clone: true

cache:
  - downloads -> appveyor.yml
  - '%LOCALAPPDATA%\pip\Cache'
  - C:\ProgramData\chocolatey\bin -> appveyor.yml
  - C:\ProgramData\chocolatey\lib -> appveyor.yml

install:
  - "set PATH=%PYTHON%;%PYTHON%\\Scripts;C:\\cygwin64\\bin;C:\\msys64;%PATH%"
  - python --version
  - pip install pypiwin32
  - set STATIC_DEPS=true & pip install lxml
  - choco install --allow-empty-checksums dmd
  - choco install --allow-empty-checksums ldc
  - choco install --allow-empty-checksums swig
  - choco install --allow-empty-checksums vswhere
  - choco install --allow-empty-checksums xsltproc


environment:
  matrix:
    - PYTHON: "C:\\Python27"
      BUILD_JOB_NUM: 1
    - PYTHON: "C:\\Python27"
      BUILD_JOB_NUM: 2
    - PYTHON: "C:\\Python27"
      BUILD_JOB_NUM: 3
    - PYTHON: "C:\\Python27"
      BUILD_JOB_NUM: 4

    - PYTHON: "C:\\Python35"
      BUILD_JOB_NUM: 1
    - PYTHON: "C:\\Python35"
      BUILD_JOB_NUM: 2
    - PYTHON: "C:\\Python35"
      BUILD_JOB_NUM: 3
    - PYTHON: "C:\\Python35"
      BUILD_JOB_NUM: 4

    - PYTHON: "C:\\Python36"
      BUILD_JOB_NUM: 1
    - PYTHON: "C:\\Python36"
      BUILD_JOB_NUM: 2
    - PYTHON: "C:\\Python36"
      BUILD_JOB_NUM: 3
    - PYTHON: "C:\\Python36"
      BUILD_JOB_NUM: 4

    - PYTHON: "C:\\Python37"
      BUILD_JOB_NUM: 1
    - PYTHON: "C:\\Python37"
      BUILD_JOB_NUM: 2
    - PYTHON: "C:\\Python37"
      BUILD_JOB_NUM: 3
    - PYTHON: "C:\\Python37"
      BUILD_JOB_NUM: 4


before_build:
    - ps: dir "C:\Program Files\Git\usr\bin\x*.exe"
    - ps: |
        if (Test-Path "C:\Program Files\Git\usr\bin\xsltproc.EXE" ) {
          Remove-Item  "C:\Program Files\Git\usr\bin\xsltproc.EXE" -ErrorAction Ignore
        }
    - ps: dir "C:\Program Files\Git\usr\bin\x*.exe"

build: off

build_script:
  - cmd: python runtest.py -l -a > all_tests.txt
  - ps: >-
      $TOTAL_BUILD_JOBS = 4;
      $Lines = (Get-Content all_tests.txt | Measure-Object -line).Lines;
      $start = ($Lines / $TOTAL_BUILD_JOBS) * ($Env:BUILD_JOB_NUM - 1);
      $end = ($Lines / $TOTAL_BUILD_JOBS) * $Env:BUILD_JOB_NUM;
      if ( $Env:BUILD_JOB_NUM -eq $TOTAL_BUILD_JOBS){ $end = $Lines };
      if ( $start -eq 0 ){ $start = 1 };
      get-content all_tests.txt | select -first ($end - $start) -skip ($start - 1) | Out-File -Encoding ASCII build_tests.txt;
  - cmd: powershell -Command "& { python runtest.py -j 2 -f build_tests.txt; if($LastExitCode -eq 2 -Or $LastExitCode -eq 0) { $host.SetShouldExit(0 )} else {$host.SetShouldExit(1)}}"