.travis.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing,
  12. # software distributed under the License is distributed on an
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. # KIND, either express or implied. See the License for the
  15. # specific language governing permissions and limitations
  16. # under the License.
  17. language: go
  18. _addons: &addon_conf
  19. apt:
  20. sources:
  21. - ubuntu-toolchain-r-test
  22. packages:
  23. - gcc-multilib
  24. - gcc-7-multilib
  25. go:
  26. - "1.10"
  27. git:
  28. depth: false
  29. matrix:
  30. include:
  31. # newt build <targets>
  32. - os: linux
  33. addons: *addon_conf
  34. env:
  35. - TEST=BUILD_TARGETS
  36. - VM_AMOUNT=4
  37. - TARGET_SET=1
  38. - os: linux
  39. addons: *addon_conf
  40. env:
  41. - TEST=BUILD_TARGETS
  42. - VM_AMOUNT=4
  43. - TARGET_SET=2
  44. - os: linux
  45. addons: *addon_conf
  46. env:
  47. - TEST=BUILD_TARGETS
  48. - VM_AMOUNT=4
  49. - TARGET_SET=3
  50. - os: linux
  51. addons: *addon_conf
  52. env:
  53. - TEST=BUILD_TARGETS
  54. - VM_AMOUNT=4
  55. - TARGET_SET=4
  56. # newt test all (Linux)
  57. - os: linux
  58. addons: *addon_conf
  59. env:
  60. - TEST=TEST_ALL
  61. - VM_AMOUNT=2
  62. - TARGET_SET=1
  63. - os: linux
  64. addons: *addon_conf
  65. env:
  66. - TEST=TEST_ALL
  67. - VM_AMOUNT=2
  68. - TARGET_SET=2
  69. # ports
  70. - os: linux
  71. addons: *addon_conf
  72. env:
  73. - TEST=BUILD_PORTS
  74. - VM_AMOUNT=1
  75. - TARGET_SET=1
  76. # newt test all
  77. - os: osx
  78. osx_image: xcode9.2
  79. env:
  80. - TEST=TEST_ALL
  81. - VM_AMOUNT=3
  82. - TARGET_SET=1
  83. - os: osx
  84. osx_image: xcode9.2
  85. env:
  86. - TEST=TEST_ALL
  87. - VM_AMOUNT=3
  88. - TARGET_SET=2
  89. - os: osx
  90. osx_image: xcode9.2
  91. env:
  92. - TEST=TEST_ALL
  93. - VM_AMOUNT=3
  94. - TARGET_SET=3
  95. before_install:
  96. - printenv
  97. - export GOPATH=$HOME/gopath
  98. - go version
  99. install:
  100. - git clone https://github.com/runtimeco/mynewt-travis-ci $HOME/ci
  101. - chmod +x $HOME/ci/*.sh
  102. - $HOME/ci/${TRAVIS_OS_NAME}_travis_install.sh
  103. before_script:
  104. - newt version
  105. - gcc --version
  106. - if [ "${TEST}" != "TEST_ALL" ]; then arm-none-eabi-gcc --version; fi
  107. - cp -R $HOME/ci/mynewt-nimble-project.yml project.yml
  108. - cp -R $HOME/ci/mynewt-nimble-targets targets
  109. - $HOME/ci/prepare_test.sh $VM_AMOUNT
  110. - mkdir -p repos && pushd repos/
  111. - git clone https://github.com/apache/mynewt-core apache-mynewt-core
  112. - popd
  113. script:
  114. - $HOME/ci/run_test.sh
  115. cache:
  116. directories:
  117. - $HOME/TOOLCHAIN
  118. - $HOME/Library/Caches/Homebrew