Skip to content

Commit 8eab946

Browse files
authored
Merge pull request #2003 from C47D/travis_check_new_boards
Add check to travis to make sure new boards are built, fix #1886
2 parents d99d3bd + c61c874 commit 8eab946

File tree

4 files changed

+64
-5
lines changed

4 files changed

+64
-5
lines changed

.travis.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ git:
2121
# that SDK is shortest and add it there. In the case of major re-organizations,
2222
# just try to make the builds "about equal in run time"
2323
env:
24-
- TRAVIS_TESTS="unix docs translations website" TRAVIS_BOARDS="circuitplayground_express mini_sam_m4 grandcentral_m4_express capablerobot_usbhub pygamer pca10056 pca10059 feather_nrf52840_express makerdiary_nrf52840_mdk makerdiary_nrf52840_mdk_usb_dongle particle_boron particle_argon particle_xenon sparkfun_nrf52840_mini electronut_labs_papyr electronut_labs_blip" TRAVIS_SDK=arm:nrf
24+
- TRAVIS_TESTS="unix docs translations website" TRAVIS_BOARDS="trinket_m0_haxpress circuitplayground_express mini_sam_m4 grandcentral_m4_express capablerobot_usbhub pygamer pca10056 pca10059 feather_nrf52840_express makerdiary_nrf52840_mdk makerdiary_nrf52840_mdk_usb_dongle particle_boron particle_argon particle_xenon sparkfun_nrf52840_mini electronut_labs_papyr electronut_labs_blip" TRAVIS_SDK=arm:nrf
2525
- TRAVIS_BOARDS="metro_m0_express metro_m4_express metro_m4_airlift_lite pirkey_m0 trellis_m4_express trinket_m0 sparkfun_lumidrive sparkfun_redboard_turbo bast_pro_mini_m0 datum_distance pyruler" TRAVIS_SDK=arm
26-
- TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow sam32 uchip escornabot_makech pygamer_advance datum_imu" TRAVIS_SDK=arm
27-
- TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero arduino_mkr1300 arduino_mkrzero pewpew10 kicksat-sprite ugame10 robohatmm1 datum_light" TRAVIS_SDK=arm
28-
- TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick pyportal sparkfun_samd21_mini sparkfun_samd21_dev pybadge pybadge_airlift datum_weather" TRAVIS_SDK=arm
26+
- TRAVIS_BOARDS="cp32-m4 feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow sam32 uchip escornabot_makech pygamer_advance datum_imu" TRAVIS_SDK=arm
27+
- TRAVIS_BOARDS="feather_m0_supersized feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero arduino_mkr1300 arduino_mkrzero pewpew10 kicksat-sprite ugame10 robohatmm1 datum_light" TRAVIS_SDK=arm
28+
- TRAVIS_BOARDS="datalore_ip_m4 circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick pyportal sparkfun_samd21_mini sparkfun_samd21_dev pybadge pybadge_airlift datum_weather" TRAVIS_SDK=arm
2929

3030
addons:
3131
artifacts:
@@ -71,7 +71,6 @@ before_script:
7171
- function var_search () { case "$1" in *$2*) true;; *) false;; esac; }
7272
- sudo dpkg --add-architecture i386
7373

74-
7574
- (! var_search "${TRAVIS_SDK-}" arm || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~xenial1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
7675

7776
# For huzzah builds
@@ -86,6 +85,10 @@ before_script:
8685
- (! var_search "${TRAVIS_TESTS-}" docs || pip install --user Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter)
8786
- (! var_search "${TRAVIS_TESTS-}" translations || pip3 install --user polib)
8887

88+
# Check if there's any board missing in TRAVIS_BOARDS
89+
- cd tools && python3 -u travis_new_boards_check.py
90+
- cd ..
91+
8992
# report some good version numbers to the build
9093
- gcc --version
9194
- (! var_search "${TRAVIS_SDK-}" arm || arm-none-eabi-gcc --version)

ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ SPI_FLASH_FILESYSTEM = 1
1111
EXTERNAL_FLASH_DEVICE_COUNT = 1
1212
EXTERNAL_FLASH_DEVICES = "S25FL064L"
1313
LONGINT_IMPL = MPZ
14+
15+
CFLAGS_INLINE_LIMIT = 60
16+
SUPEROPT_GC = 0

ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ SPI_FLASH_FILESYSTEM = 1
1111
EXTERNAL_FLASH_DEVICE_COUNT = 1
1212
EXTERNAL_FLASH_DEVICES = W25Q32BV
1313
LONGINT_IMPL = MPZ
14+
15+
SUPEROPT_GC = 0

tools/travis_new_boards_check.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#! /usr/bin/env python3
2+
3+
import sys
4+
import os
5+
import json
6+
7+
import build_board_info
8+
9+
# Get boards in json format
10+
boards_info_json = build_board_info.get_board_mapping()
11+
12+
# Get all the boards out of the json format
13+
info_boards = [board for board in boards_info_json.keys() if not boards_info_json[board].get("alias", False)]
14+
15+
# We need to know the path of the .travis.yml file
16+
base_path = os.path.dirname(__file__)
17+
travis_path = os.path.abspath(os.path.join(base_path, '..', '.travis.yml'))
18+
19+
# Loading board list based on TRAVIS_BOARDS env variable on .travis.yml
20+
travis_boards = []
21+
with open(travis_path, 'r') as travis:
22+
23+
# Get all lines that contain the substring 'TRAVIS_BOARDS'
24+
for line in travis:
25+
26+
# Get the lines with TRAVIS_BOARDS= in it
27+
if line.find('TRAVIS_BOARDS=') is not -1:
28+
# Store all the boards names into travis_boards
29+
begin_of_names = line.find('TRAVIS_BOARDS=') + len('TRAVIS_BOARDS=') + 1
30+
end_of_names = line.rfind('"')
31+
boards = line[begin_of_names:end_of_names]
32+
boards = boards.split(' ')
33+
travis_boards.extend(boards)
34+
35+
# We've reached the end of the env: section
36+
elif 'addons' in line:
37+
break
38+
else:
39+
pass
40+
41+
# All the travis_boards elements must be on info_boards
42+
info_boards.sort()
43+
travis_boards.sort()
44+
45+
missing_boards = set(info_boards) - set(travis_boards)
46+
47+
if missing_boards:
48+
print('Boards missing in TRAVIS_BOARDS:')
49+
for board in missing_boards:
50+
print(board)
51+
sys.exit(1)

0 commit comments

Comments
 (0)