Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
246 additions
and
70 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,76 @@ | ||
image: Visual Studio 2017 | ||
shallow_clone: true | ||
|
||
install: | ||
|
||
#set python version, and cygwin tools for clang tests | ||
- "set PATH=%PYTHON%;%PYTHON%\\Scripts;C:\\cygwin64\\bin;C:\\msys64;%PATH%" | ||
- python --version | ||
- pip install lxml | ||
- pip install pypiwin32 | ||
- choco install dmd | ||
- choco install ldc | ||
- choco install swig | ||
- choco install vswhere | ||
|
||
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:\\Python27-x64" | ||
BUILD_JOB_NUM: 1 | ||
- PYTHON: "C:\\Python27-x64" | ||
BUILD_JOB_NUM: 2 | ||
- PYTHON: "C:\\Python27-x64" | ||
BUILD_JOB_NUM: 3 | ||
- PYTHON: "C:\\Python27-x64" | ||
BUILD_JOB_NUM: 4 | ||
|
||
- PYTHON: "C:\\Python35-x64" | ||
BUILD_JOB_NUM: 1 | ||
- PYTHON: "C:\\Python35-x64" | ||
BUILD_JOB_NUM: 2 | ||
- PYTHON: "C:\\Python35-x64" | ||
BUILD_JOB_NUM: 3 | ||
- PYTHON: "C:\\Python35-x64" | ||
BUILD_JOB_NUM: 4 | ||
|
||
- PYTHON: "C:\\Python36-x64" | ||
BUILD_JOB_NUM: 1 | ||
- PYTHON: "C:\\Python36-x64" | ||
BUILD_JOB_NUM: 2 | ||
- PYTHON: "C:\\Python36-x64" | ||
BUILD_JOB_NUM: 3 | ||
- PYTHON: "C:\\Python36-x64" | ||
BUILD_JOB_NUM: 4 | ||
|
||
build: off | ||
build_script: | ||
- cmd: echo src\engine\SCons\JobTests.py > exclude_jobs.txt | ||
- cmd: python runtest.py -l -a --exclude-list exclude_jobs.txt > all_tests.txt | ||
- cmd: powershell "./.appveyor/runtest.ps1" |
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,46 @@ | ||
|
||
function Retry-Command | ||
{ | ||
param ( | ||
[Parameter(Mandatory=$true)][string]$command, | ||
[Parameter(Mandatory=$false)][hashtable]$args, | ||
[Parameter(Mandatory=$false)][int]$retries = 5, | ||
[Parameter(Mandatory=$false)][int]$secondsDelay = 2 | ||
) | ||
|
||
# Setting ErrorAction to Stop is important. This ensures any errors that occur in the command are | ||
# treated as terminating errors, and will be caught by the catch block. | ||
# $command.ErrorAction = "Stop" | ||
|
||
$retrycount = 0 | ||
$completed = $false | ||
|
||
while (-not $completed) { | ||
try { | ||
Invoke-Expression $command | ||
Write-Verbose ("Command [{0}] succeeded." -f $command) | ||
$completed = $true | ||
} catch { | ||
if ($retrycount -ge $retries) { | ||
Write-Verbose ("Command [{0}] failed the maximum number of {1} times." -f $command, $retrycount) | ||
throw | ||
} else { | ||
Write-Verbose ("Command [{0}] failed. Retrying in {1} seconds." -f $command, $secondsDelay) | ||
Start-Sleep $secondsDelay | ||
$retrycount++ | ||
} | ||
} | ||
} | ||
} | ||
|
||
Retry-Command -Command "python runtest.py src/engine/SCons/JobTests.py" -Verbose | ||
|
||
$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; | ||
python runtest.py -j 2 -f build_tests.txt; | ||
if($LastExitCode -eq 2 -Or $LastExitCode -eq 0) { $host.SetShouldExit(0 )} else {$host.SetShouldExit(1)} |
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
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
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
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
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
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
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
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
Oops, something went wrong.