ardupilot/.azure/autotest_template.yml

51 lines
2.7 KiB
YAML
Raw Normal View History

2018-12-14 17:12:34 -04:00
parameters:
action: 'fly'
jobs:
- job: sitl_${{ parameters.name }}_test
displayName: ${{ format('Cygwin SITL {0} test', parameters.name) }}
pool:
2020-12-29 16:32:10 -04:00
vmImage: 'windows-latest'
2018-12-14 17:12:34 -04:00
condition: eq(variables['Build.Reason'], 'Schedule')
steps:
- script: choco install cygwin --params "/InstallDir:C:\Cygwin /NoStartMenu /NoAdmin"
displayName: 'Install Cygwin'
- script: choco install gcc-g++ python36 python36-devel python36-future python36-lxml python36-pip python36-setuptools python36-wheel python36-pexpect python36-numpy git gettext libcrypt-devel --source cygwin
2018-12-14 17:12:34 -04:00
displayName: 'Install Cygwin packages'
- script: git submodule update --recursive --init modules/mavlink
displayName: Initialize MAVLink submodule
2020-03-13 03:01:59 -03:00
- script: git submodule update --recursive --init modules/uavcan
displayName: 'Initialize UAVCAN submodule'
- script: C:\Cygwin\bin\bash --login -c "ln -sf /usr/bin/python3.6 /usr/bin/python && ln -sf /usr/bin/pip3.6 /usr/bin/pip"
displayName: 'Make Python 3.6 the default Python'
- script: C:\Cygwin\bin\bash --login -c "cd $(cygpath '%BUILD_SOURCESDIRECTORY%')/modules/mavlink/pymavlink && python setup.py build install --user"
2018-12-14 17:12:34 -04:00
displayName: 'Install pymavlink from submodule'
- script: C:\Cygwin\bin\bash --login -c "pip install MAVProxy"
2018-12-14 17:12:34 -04:00
displayName: 'Install MAVProxy in Cygwin'
- script: C:\Cygwin\bin\bash --login -c "cd $(cygpath '%BUILD_SOURCESDIRECTORY%') && Tools/autotest/autotest.py ${{ format('build.{0} {1}.{2}', parameters.build_target, parameters.action, parameters.action_target) }}"
displayName: ${{ format('Run {0} autotest', parameters.name) }}
- script: C:\Cygwin\bin\bash --login -c "cd $(cygpath '%BUILD_SOURCESDIRECTORY%') && cp $(cygcheck.exe build/sitl/bin/* | grep Cygwin | grep -v '.exe' | sed 's/^[ \t]*//' | sort | uniq) build/sitl/bin/"
displayName: 'Copy dependencies to build dir'
- task: PublishBuildArtifacts@1
# - task: PublishPipelineArtifact@0
displayName: 'Publish build artifacts'
inputs:
artifactName: 'Cygwin SITL binaries'
pathtoPublish: 'build/sitl/bin'
# targetPath: 'build/sitl/bin'
- task: PublishBuildArtifacts@1
# - task: PublishPipelineArtifact@0
displayName: 'Publish test folder'
inputs:
artifactName: ${{ format('{0} Test folder', parameters.name) }}
pathtoPublish: ${{ format('test.{0}', parameters.action_target) }}
# targetPath: ${{ format('test.{0}', parameters.action_target) }}
- task: PublishBuildArtifacts@1
# - task: PublishPipelineArtifact@0
displayName: 'Publish logs'
inputs:
artifactName: ${{ format('{0} Logs', parameters.name) }}
pathtoPublish: '../buildlogs'
# targetPath: '../buildlogs'