2020-05-17 08:39:59 +01:00
|
|
|
image: Visual Studio 2013
|
|
|
|
clone_depth: 1
|
|
|
|
skip_tags: true
|
|
|
|
|
2015-12-17 09:24:33 +00:00
|
|
|
environment:
|
|
|
|
# Python version used
|
|
|
|
MICROPY_CPYTHON3: c:/python34/python.exe
|
|
|
|
|
|
|
|
init:
|
|
|
|
# Set build version number to commit to be travis-like
|
|
|
|
- ps: Update-AppveyorBuild -Version $env:appveyor_repo_commit.substring(0,8)
|
|
|
|
|
|
|
|
configuration:
|
|
|
|
- Debug
|
|
|
|
- Release
|
|
|
|
|
|
|
|
platform:
|
|
|
|
- x86
|
|
|
|
- x64
|
|
|
|
|
2019-05-29 17:00:05 +01:00
|
|
|
before_build:
|
|
|
|
- ps: |
|
|
|
|
@"
|
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<Target Name="Build">
|
|
|
|
<MsBuild BuildInParallel="True" Projects="mpy-cross\mpy-cross.vcxproj;ports\windows\micropython.vcxproj"/>
|
|
|
|
</Target>
|
|
|
|
</Project>
|
|
|
|
"@ | Set-Content build.proj
|
|
|
|
|
2015-12-17 09:24:33 +00:00
|
|
|
build:
|
2019-05-29 17:00:05 +01:00
|
|
|
project: build.proj
|
|
|
|
parallel: true
|
2015-12-17 09:24:33 +00:00
|
|
|
verbosity: normal
|
|
|
|
|
|
|
|
test_script:
|
2019-05-29 17:00:05 +01:00
|
|
|
- ps: |
|
|
|
|
cd (Join-Path $env:APPVEYOR_BUILD_FOLDER 'tests')
|
|
|
|
& $env:MICROPY_CPYTHON3 run-tests
|
|
|
|
& $env:MICROPY_CPYTHON3 run-tests --via-mpy -d basics float micropython
|
2015-12-17 09:24:33 +00:00
|
|
|
|
2018-01-03 20:10:03 +00:00
|
|
|
# After the build/test phase for the MSVC build completes,
|
|
|
|
# build and test with mingw-w64, release versions only.
|
|
|
|
after_test:
|
|
|
|
- ps: |
|
|
|
|
if ($env:configuration -eq 'Debug') {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
$env:MSYSTEM = if ($platform -eq 'x86') {'MINGW32'} else {'MINGW64'}
|
|
|
|
$env:CHERE_INVOKING = 'enabled_from_arguments'
|
|
|
|
cd (Join-Path $env:APPVEYOR_BUILD_FOLDER 'ports/windows')
|
|
|
|
C:\msys64\usr\bin\bash.exe -l -c "make -B -j4 V=1"
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
|
|
throw "$env:MSYSTEM build exited with code $LASTEXITCODE"
|
|
|
|
}
|
2019-05-29 17:00:05 +01:00
|
|
|
cd (Join-Path $env:APPVEYOR_BUILD_FOLDER 'mpy-cross')
|
|
|
|
# Building of mpy-cross hasn't been fixed across all possible windows/WSL/...
|
|
|
|
# variations and the STRIP step tries to strip mpy-cross whereas that should be
|
|
|
|
# mpy-cross.exe. Workaround for now by skipping actual strip and size commands.
|
|
|
|
C:\msys64\usr\bin\bash.exe -l -c "make -B -j4 V=1 STRIP=echo SIZE=echo"
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
|
|
throw "$env:MSYSTEM mpy_cross build exited with code $LASTEXITCODE"
|
|
|
|
}
|
2018-01-03 20:10:03 +00:00
|
|
|
cd (Join-Path $env:APPVEYOR_BUILD_FOLDER 'tests')
|
2019-05-29 17:00:05 +01:00
|
|
|
$testArgs = @('run-tests')
|
|
|
|
foreach ($skipTest in @('math_fun', 'float2int_double', 'float_parse', 'math_domain_special')) {
|
|
|
|
$testArgs = $testArgs + '-e' + $skipTest
|
|
|
|
}
|
|
|
|
& $env:MICROPY_CPYTHON3 $testArgs
|
2018-01-03 20:10:03 +00:00
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
|
|
throw "$env:MSYSTEM tests exited with code $LASTEXITCODE"
|
|
|
|
}
|
2019-05-29 17:00:05 +01:00
|
|
|
& $env:MICROPY_CPYTHON3 ($testArgs + @('--via-mpy', '-d', 'basics', 'float', 'micropython'))
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
|
|
throw "$env:MSYSTEM mpy-cross tests exited with code $LASTEXITCODE"
|
|
|
|
}
|