2021-07-13 10:18:35 -04:00
|
|
|
image: Visual Studio 2017
|
2020-05-17 03:39:59 -04:00
|
|
|
clone_depth: 1
|
|
|
|
skip_tags: true
|
|
|
|
|
2015-12-17 04:24:33 -05:00
|
|
|
environment:
|
|
|
|
# Python version used
|
2021-07-13 10:18:35 -04:00
|
|
|
MICROPY_CPYTHON3: c:/python38/python.exe
|
2021-11-25 10:50:10 -05:00
|
|
|
# The variants.
|
|
|
|
matrix:
|
|
|
|
- PyVariant: dev
|
|
|
|
- PyVariant: standard
|
2015-12-17 04:24:33 -05:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2021-11-25 10:50:10 -05:00
|
|
|
matrix:
|
|
|
|
# One debug build is enough.
|
|
|
|
exclude:
|
|
|
|
- configuration: Debug
|
|
|
|
PyVariant: dev
|
|
|
|
|
2019-05-29 12:00:05 -04: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">
|
2023-01-24 05:48:20 -05:00
|
|
|
<MsBuild Projects="mpy-cross\mpy-cross.vcxproj;ports\windows\micropython.vcxproj"/>
|
2019-05-29 12:00:05 -04:00
|
|
|
</Target>
|
|
|
|
</Project>
|
|
|
|
"@ | Set-Content build.proj
|
|
|
|
|
2015-12-17 04:24:33 -05:00
|
|
|
build:
|
2019-05-29 12:00:05 -04:00
|
|
|
project: build.proj
|
|
|
|
parallel: true
|
2015-12-17 04:24:33 -05:00
|
|
|
verbosity: normal
|
|
|
|
|
|
|
|
test_script:
|
2019-05-29 12:00:05 -04:00
|
|
|
- ps: |
|
2021-11-25 10:50:10 -05:00
|
|
|
$env:MICROPY_MICROPYTHON=(msbuild ports\windows\micropython.vcxproj /nologo /v:m /t:ShowTargetPath).Trim()
|
2019-05-29 12:00:05 -04:00
|
|
|
cd (Join-Path $env:APPVEYOR_BUILD_FOLDER 'tests')
|
2021-03-11 00:09:27 -05:00
|
|
|
& $env:MICROPY_CPYTHON3 run-tests.py
|
2020-09-10 07:21:21 -04:00
|
|
|
if ($LASTEXITCODE -ne 0) {
|
2021-03-11 00:09:27 -05:00
|
|
|
& $env:MICROPY_CPYTHON3 run-tests.py --print-failures
|
2020-09-10 07:21:21 -04:00
|
|
|
throw "Test failure"
|
|
|
|
}
|
2021-03-11 00:09:27 -05:00
|
|
|
& $env:MICROPY_CPYTHON3 run-tests.py --via-mpy -d basics float micropython
|
2020-09-10 07:21:21 -04:00
|
|
|
if ($LASTEXITCODE -ne 0) {
|
2021-03-11 00:09:27 -05:00
|
|
|
& $env:MICROPY_CPYTHON3 run-tests.py --print-failures
|
2020-09-10 07:21:21 -04:00
|
|
|
throw "Test failure"
|
|
|
|
}
|
2015-12-17 04:24:33 -05:00
|
|
|
|
2018-01-03 15:10:03 -05: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'
|
2019-05-29 12:00:05 -04:00
|
|
|
cd (Join-Path $env:APPVEYOR_BUILD_FOLDER 'mpy-cross')
|
2019-08-10 04:47:56 -04:00
|
|
|
C:\msys64\usr\bin\bash.exe -l -c "make -B -j4 V=1"
|
2019-05-29 12:00:05 -04:00
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
|
|
throw "$env:MSYSTEM mpy_cross build exited with code $LASTEXITCODE"
|
|
|
|
}
|
2021-11-25 05:33:35 -05:00
|
|
|
cd (Join-Path $env:APPVEYOR_BUILD_FOLDER 'ports/windows')
|
2022-07-08 01:00:33 -04:00
|
|
|
C:\msys64\usr\bin\bash.exe -l -c "make -B VARIANT=$($env:PyVariant) submodules"
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
|
|
throw "$env:MSYSTEM build exited with code $LASTEXITCODE"
|
|
|
|
}
|
2022-11-29 10:58:21 -05:00
|
|
|
C:\msys64\usr\bin\bash.exe -l -c "make -B -j4 V=1 MICROPY_MPYCROSS=../../mpy-cross/build/mpy-cross.exe VARIANT=$($env:PyVariant)"
|
2022-01-10 08:27:29 -05:00
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
|
|
throw "$env:MSYSTEM build exited with code $LASTEXITCODE"
|
|
|
|
}
|
2021-11-25 10:50:10 -05:00
|
|
|
C:\msys64\usr\bin\bash.exe -l -c "make V=1 test_full VARIANT=$($env:PyVariant)"
|
2019-05-29 12:00:05 -04:00
|
|
|
if ($LASTEXITCODE -ne 0) {
|
2022-02-09 11:26:35 -05:00
|
|
|
cd (Join-Path $env:APPVEYOR_BUILD_FOLDER 'tests')
|
2021-03-11 00:09:27 -05:00
|
|
|
& $env:MICROPY_CPYTHON3 run-tests.py --print-failures
|
2020-09-10 07:21:21 -04:00
|
|
|
throw "Test failure"
|
2019-05-29 12:00:05 -04:00
|
|
|
}
|