azure-pipelines.yml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 2018 The Cartographer Authors
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. jobs:
  15. - job: Build
  16. pool:
  17. vmImage: 'vs2017-win2016'
  18. timeoutInMinutes: 360
  19. steps:
  20. - script: |
  21. choco sources add -n=roswin -s https://roswin.azurewebsites.net/api/v2/ --priority 1
  22. rem Azure VM runs out of space on C:, so use D: for ros and rosdeps
  23. mkdir D:\opt && mklink /J C:\opt D:\opt
  24. choco upgrade %ROS_METAPACKAGE% -y
  25. choco upgrade ros-melodic-perception -y
  26. robocopy "." ".\src\cartographer_ros" /E /MOVE /XD "src" > NUL
  27. git clone https://github.com/googlecartographer/cartographer src\cartographer
  28. call "C:\opt\ros\melodic\x64\env.bat" rosdep install --from-paths src --ignore-src -r -y
  29. env:
  30. ROS_METAPACKAGE: 'ros-melodic-desktop'
  31. displayName: Install prerequisites
  32. - script: |
  33. call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
  34. call "C:\opt\ros\melodic\x64\setup.bat"
  35. call src\cartographer\scripts\remove_mingw_cygwin_from_path.bat
  36. catkin_make_isolated --use-ninja --install --cmake-args -DCMAKE_BUILD_TYPE=Release
  37. displayName: Build
  38. - script: |
  39. call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
  40. call "C:\opt\ros\melodic\x64\setup.bat"
  41. call src\cartographer\scripts\remove_mingw_cygwin_from_path.bat
  42. cd build_isolated\cartographer\install && ctest --no-compress-output -T Test
  43. displayName: Run cartographer tests
  44. - script: |
  45. call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
  46. call "C:\opt\ros\melodic\x64\setup.bat"
  47. call src\cartographer\scripts\remove_mingw_cygwin_from_path.bat
  48. cd build_isolated\cartographer_ros && ninja tests && ctest --no-compress-output -T Test
  49. displayName: Build and run cartographer_ros tests
  50. condition: always()
  51. - script: |
  52. call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
  53. call "C:\opt\ros\melodic\x64\setup.bat"
  54. call src\cartographer\scripts\remove_mingw_cygwin_from_path.bat
  55. python src\cartographer\scripts\ctest_to_junit.py build_isolated\cartographer_ros
  56. displayName: Convert tests to jUnit
  57. condition: always()
  58. - task: PublishTestResults@2
  59. displayName: Publish test results
  60. inputs:
  61. testRunner: 'jUnit'
  62. testResultsFiles: '**\jUnit.xml'
  63. searchFolder: '$(Build.SourcesDirectory)\build_isolated\cartographer_ros\Testing'
  64. condition: always()