Skip to content

Commit c53c443

Browse files
committed
build most of adafruit samd boards
1 parent 9d9b509 commit c53c443

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

.github/workflows/githubci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
arduino-platform: ['metro_m0', 'metro_m4']
10+
arduino-platform: ['metro_m0', 'hallowing', 'circuitplayground_m0',
11+
'metro_m4', 'pybadge_m4', 'pygamer_m4', 'hallowing_m4', 'monster_m4sk', 'pyportal_m4', 'pyportal_titano']
1112

1213
runs-on: ubuntu-latest
1314

extras/build_all.py

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,20 @@
88
exit_status = 0
99
success_count = 0
1010
fail_count = 0
11+
skip_count = 0
1112

1213
build_format = '| {:22} | {:30} | {:9} '
1314
build_separator = '-' * 80
1415

15-
all_boards = [ 'metro_m0', 'metro_m4' ]
16+
default_boards = [ 'metro_m0', 'metro_m4', 'circuitplayground_m0']
1617

1718
build_boards = []
1819

1920
# build all variants if input not existed
2021
if len(sys.argv) > 1:
21-
if (sys.argv[1] in all_boards):
22-
build_boards.append(sys.argv[1])
23-
else:
24-
print('\033[31INTERNAL ERR\033[0m - invalid variant name "{}"'.format(sys.argv[1]))
25-
sys.exit(-1)
22+
build_boards.append(sys.argv[1])
2623
else:
27-
build_boards = all_boards
24+
build_boards = default_boards
2825

2926
def errorOutputFilter(line):
3027
if len(line) == 0:
@@ -36,7 +33,7 @@ def errorOutputFilter(line):
3633

3734

3835
def build_examples(variant):
39-
global exit_status, success_count, fail_count, build_format, build_separator
36+
global exit_status, success_count, fail_count, skip_count, build_format, build_separator
4037

4138
print('\n')
4239
print(build_separator)
@@ -50,12 +47,13 @@ def build_examples(variant):
5047
for sketch in glob.iglob('libraries/**/*.ino', recursive=True):
5148
start_time = time.monotonic()
5249

53-
# skip if example contains: ".skip" or ".skip.variant"
54-
# however ".build.variant" file can overwrite ".skip", used to build a specific variant only
50+
# Skip if contains: ".board.test.skip" or ".all.test.skip"
51+
# Skip if not contains: ".board.test.only" for a specific board
5552
sketchdir = os.path.dirname(sketch)
56-
if ( (os.path.exists(sketchdir + '/.skip') or os.path.exists(sketchdir + '/.skip.' + variant)) and
57-
not os.path.exists(sketchdir + '/.build.' + variant)):
58-
success = "skipped"
53+
if os.path.exists(sketchdir + '/.all.test.skip') or os.path.exists(sketchdir + '/.' + variant + '.test.skip'):
54+
success = "\033[33mskipped\033[0m "
55+
elif glob.glob(sketchdir+"/.*.test.only") and not os.path.exists(sketchdir + '/.build.' + variant):
56+
success = "\033[33mskipped\033[0m "
5957
else:
6058
# TODO - preferably, would have STDERR show up in **both** STDOUT and STDERR.
6159
# preferably, would use Python logging handler to get both distinct outputs and one merged output
@@ -87,15 +85,16 @@ def build_examples(variant):
8785

8886
print((build_format + '| {:5.2f}s |').format(sketch.split(os.path.sep)[1], os.path.basename(sketch), success, build_duration))
8987

90-
if success != "skipped":
88+
if success != "\033[33mskipped\033[0m ":
9189
if build_result.returncode != 0:
9290
print(build_result.stdout.decode("utf-8"))
9391
if (build_result.stderr):
9492
print(build_result.stderr.decode("utf-8"))
9593
if len(warningLines) != 0:
9694
for line in warningLines:
9795
print(line)
98-
96+
else:
97+
skip_count += 1
9998

10099
build_time = time.monotonic()
101100

@@ -104,7 +103,7 @@ def build_examples(variant):
104103

105104
print(build_separator)
106105
build_time = time.monotonic() - build_time
107-
print("Build Summary: {} \033[32msucceeded\033[0m, {} \033[31mfailed\033[0m and took {:.2f}s".format(success_count, fail_count, build_time))
106+
print("Build Summary: {} \033[32msucceeded\033[0m, {} \033[31mfailed\033[0m, {} \033[33mskipped\033[0m and took {:.2f}s".format(success_count, fail_count, skip_count, build_time))
108107
print(build_separator)
109108

110109
sys.exit(exit_status)

libraries/SDU/examples/Usage/.metro_m0.test.only

Whitespace-only changes.

libraries/SDU/extras/SDUBoot/.metro_m0.test.only

Whitespace-only changes.

0 commit comments

Comments
 (0)