Skip to content

Commit 657d5bb

Browse files
committed
update board check
1 parent 9a8399f commit 657d5bb

File tree

3 files changed

+110
-110
lines changed

3 files changed

+110
-110
lines changed

.github/workflows/build.yml

Lines changed: 60 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
- name: Translations
6767
run: make check-translate
6868
- name: New boards check
69-
run: python3 -u travis_new_boards_check.py
69+
run: python3 -u ci_new_boards_check.py
7070
working-directory: tools
7171

7272
build-arm:
@@ -76,77 +76,77 @@ jobs:
7676
fail-fast: false
7777
matrix:
7878
board:
79-
- "metro_m0_express"
80-
- "metro_m4_express"
81-
- "trinket_m0_haxpress"
82-
- "circuitplayground_express"
83-
- "mini_sam_m4"
84-
- "grandcentral_m4_express"
79+
- "arduino_mkr1300"
80+
- "arduino_mkrzero"
81+
- "arduino_zero"
82+
- "bast_pro_mini_m0"
8583
- "capablerobot_usbhub"
86-
- "pygamer"
87-
- "pca10056"
88-
- "pca10059"
89-
- "feather_nrf52840_express"
90-
- "metro_nrf52840_express"
84+
- "catwan_usbstick"
9185
- "circuitplayground_bluefruit"
92-
- "makerdiary_nrf52840_mdk"
93-
- "makerdiary_nrf52840_mdk_usb_dongle"
94-
- "particle_boron"
95-
- "particle_argon"
96-
- "particle_xenon"
97-
- "sparkfun_nrf52840_mini"
98-
- "electronut_labs_papyr"
99-
- "electronut_labs_blip"
100-
- "metro_m4_airlift_lite"
101-
- "pirkey_m0"
102-
- "trellis_m4_express"
103-
- "trinket_m0"
104-
- "sparkfun_lumidrive"
105-
- "sparkfun_redboard_turbo"
106-
- "bast_pro_mini_m0"
107-
- "datum_distance"
108-
- "pyruler"
86+
- "circuitplayground_express"
87+
- "circuitplayground_express_crickit"
10988
- "cp32-m4"
89+
- "datalore_ip_m4"
90+
- "datum_distance"
91+
- "datum_imu"
92+
- "datum_light"
93+
- "datum_weather"
94+
- "electronut_labs_blip"
95+
- "electronut_labs_papyr"
96+
- "escornabot_makech"
97+
- "feather_m0_adalogger"
98+
- "feather_m0_basic"
99+
- "feather_m0_express"
100+
- "feather_m0_express_crickit"
101+
- "feather_m0_rfm69"
102+
- "feather_m0_rfm9x"
103+
- "feather_m0_supersized"
104+
- "feather_m4_express"
105+
- "feather_nrf52840_express"
110106
- "feather_radiofruit_zigbee"
111107
- "gemma_m0"
108+
- "grandcentral_m4_express"
112109
- "hallowing_m0_express"
113110
- "itsybitsy_m0_express"
114111
- "itsybitsy_m4_express"
112+
- "kicksat-sprite"
113+
- "makerdiary_nrf52840_mdk"
114+
- "makerdiary_nrf52840_mdk_usb_dongle"
115115
- "meowmeow"
116-
- "sam32"
117-
- "uchip"
118-
- "escornabot_makech"
119-
- "pygamer_advance"
120-
- "datum_imu"
121-
- "snekboard"
122-
- "feather_m0_supersized"
123-
- "feather_m0_express_crickit"
124-
- "feather_m0_rfm69"
125-
- "feather_m0_rfm9x"
126-
- "feather_m4_express"
127-
- "arduino_zero"
128-
- "arduino_mkr1300"
129-
- "arduino_mkrzero"
116+
- "metro_m0_express"
117+
- "metro_m4_airlift_lite"
118+
- "metro_m4_express"
119+
- "metro_nrf52840_express"
120+
- "mini_sam_m4"
121+
- "particle_argon"
122+
- "particle_boron"
123+
- "particle_xenon"
124+
- "pca10056"
125+
- "pca10059"
130126
- "pewpew10"
131-
- "kicksat-sprite"
132-
- "ugame10"
133-
- "robohatmm1_m0"
134-
- "robohatmm1_m4"
135-
- "datum_light"
136-
- "datalore_ip_m4"
137-
- "circuitplayground_express_crickit"
138-
- "feather_m0_adalogger"
139-
- "feather_m0_basic"
140-
- "feather_m0_express"
141-
- "catwan_usbstick"
142-
- "pyportal"
143-
- "sparkfun_samd21_mini"
144-
- "sparkfun_samd21_dev"
127+
- "pirkey_m0"
145128
- "pybadge"
146129
- "pybadge_airlift"
147-
- "datum_weather"
130+
- "pygamer"
131+
- "pygamer_advance"
132+
- "pyportal"
148133
- "pyportal_titano"
149-
134+
- "pyruler"
135+
- "robohatmm1_m0"
136+
- "robohatmm1_m4"
137+
- "sam32"
138+
- "snekboard"
139+
- "sparkfun_lumidrive"
140+
- "sparkfun_nrf52840_mini"
141+
- "sparkfun_redboard_turbo"
142+
- "sparkfun_samd21_dev"
143+
- "sparkfun_samd21_mini"
144+
- "trellis_m4_express"
145+
- "trinket_m0"
146+
- "trinket_m0_haxpress"
147+
- "uchip"
148+
- "ugame10"
149+
150150
steps:
151151
- name: Set up Python 3.5
152152
uses: actions/setup-python@v1
@@ -173,6 +173,7 @@ jobs:
173173

174174
website:
175175
runs-on: ubuntu-16.04
176+
needs: build-arm
176177
steps:
177178
- name: Set up Python 3.5
178179
uses: actions/setup-python@v1

tools/ci_new_boards_check.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#! /usr/bin/env python3
2+
3+
import sys
4+
import os
5+
import json
6+
import yaml
7+
8+
import build_board_info
9+
10+
workflow_file = '.github/workflows/build.yml'
11+
12+
# Get boards in json format
13+
boards_info_json = build_board_info.get_board_mapping()
14+
15+
# Get all the boards out of the json format
16+
info_boards = [board for board in boards_info_json.keys() if not boards_info_json[board].get("alias", False)]
17+
18+
# We need to know the path of the workflow file
19+
base_path = os.path.dirname(__file__)
20+
yml_path = os.path.abspath(os.path.join(base_path, '..', workflow_file))
21+
22+
# Loading board list based on build jobs in the workflow file.
23+
ci_boards = []
24+
with open(yml_path, "r") as f:
25+
workflow = yaml.safe_load(f)
26+
27+
ok = True
28+
for job in workflow["jobs"]:
29+
if not job.startswith("build"):
30+
continue
31+
job_boards = workflow["jobs"][job]["strategy"]["matrix"]["board"]
32+
if job_boards != sorted(job_boards):
33+
print("Boards for job \"{}\" not sorted. Must be:".format(job))
34+
print(" - \"" + "\"\n - \"".join(sorted(job_boards)) + "\"")
35+
ok = False
36+
ci_boards.extend(job_boards)
37+
38+
# All the travis_boards elements must be on info_boards
39+
info_boards.sort()
40+
ci_boards.sort()
41+
42+
missing_boards = set(info_boards) - set(ci_boards)
43+
44+
if missing_boards:
45+
print('Boards missing in {}:'.format(workflow_file))
46+
for board in missing_boards:
47+
print(board)
48+
49+
if not ok:
50+
sys.exit(1)

tools/travis_new_boards_check.py

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)