Skip to content

Commit

Permalink
Merge pull request #1 from adafruit/master
Browse files Browse the repository at this point in the history
Update base
  • Loading branch information
Joe Bakalor authored Nov 5, 2019
2 parents 8ab3ef4 + 01bf932 commit ba83a4a
Show file tree
Hide file tree
Showing 1,114 changed files with 9,834 additions and 218,796 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Build CI

on: [push, pull_request, release]
on:
push:
pull_request:
release:
types: [published]
check_suite:
types: [rerequested]

jobs:
test:
Expand All @@ -10,9 +16,6 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Fail if not a release publish # workaround has `on` doesn't have this filter
run: exit 1
if: github.event_name == 'release' && (github.event.action != 'published' && github.event.action != 'rerequested')
- name: Set up Python 3.5
uses: actions/setup-python@v1
with:
Expand Down Expand Up @@ -49,9 +52,6 @@ jobs:
done
working-directory: tests
if: failure()
- name: Test threads
run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread
working-directory: tests
- name: Native Tests
run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native
working-directory: tests
Expand All @@ -75,6 +75,7 @@ jobs:
board:
- "arduino_mkr1300"
- "arduino_mkrzero"
- "arduino_nano_33_ble"
- "arduino_zero"
- "bast_pro_mini_m0"
- "capablerobot_usbhub"
Expand Down Expand Up @@ -102,12 +103,14 @@ jobs:
- "feather_m4_express"
- "feather_nrf52840_express"
- "feather_radiofruit_zigbee"
- "feather_stm32f405_express"
- "gemma_m0"
- "grandcentral_m4_express"
- "hallowing_m0_express"
- "hallowing_m4_express"
- "itsybitsy_m0_express"
- "itsybitsy_m4_express"
- "itsybitsy_nrf52840_express"
- "kicksat-sprite"
- "makerdiary_nrf52840_mdk"
- "makerdiary_nrf52840_mdk_usb_dongle"
Expand All @@ -128,6 +131,7 @@ jobs:
- "pirkey_m0"
- "pybadge"
- "pybadge_airlift"
- "pyboard_v11"
- "pygamer"
- "pygamer_advance"
- "pyportal"
Expand All @@ -140,16 +144,21 @@ jobs:
- "snekboard"
- "sparkfun_lumidrive"
- "sparkfun_nrf52840_mini"
- "sparkfun_qwiic_micro_no_flash"
- "sparkfun_qwiic_micro_with_flash"
- "sparkfun_redboard_turbo"
- "sparkfun_samd21_dev"
- "sparkfun_samd21_mini"
- "spresense"
- "stm32f411ve_discovery"
- "stm32f412zg_discovery"
- "stringcar_m0_express"
- "trellis_m4_express"
- "trinket_m0"
- "trinket_m0_haxpress"
- "uchip"
- "ugame10"
- "winterbloom_sol"

steps:
- name: Set up Python 3.5
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/create_website_pr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Update CircuitPython.org

on: release
on:
release:
types: [published]

jobs:
website:
Expand All @@ -10,9 +12,6 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Fail if not a release publish # workaround has `on` doesn't have this filter
run: exit 1
if: github.event.action != 'published'
- name: Set up Python 3.5
uses: actions/setup-python@v1
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,6 @@
[submodule "ports/stm32f4/stm32f4"]
path = ports/stm32f4/stm32f4
url = https://github.com/adafruit/stm32f4.git
[submodule "ports/cxd56/spresense-exported-sdk"]
path = ports/cxd56/spresense-exported-sdk
url = https://github.com/sonydevworld/spresense-exported-sdk.git
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
"ports/cc3200",
"ports/cc3200/FreeRTOS",
"ports/cc3200/hal",
"ports/cxd56/spresense-exported-sdk",
"ports/esp32",
"ports/esp8266/boards",
"ports/esp8266/common-hal",
Expand All @@ -139,7 +140,6 @@
"ports/stm32f4/stm32f4",
"ports/stm32f4/peripherals",
"ports/stm32f4/ref",
"ports/stm32f4/README.md",
"ports/pic16bit",
"ports/qemu-arm",
"ports/stm32",
Expand Down
65 changes: 55 additions & 10 deletions docs/shared_bindings_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def read_mpconfig():
def build_module_map():
""" Establish the base of the JSON file, based on the contents from
`configs`. Base will contain module names, if they're part of
the `FULL_BUILD`, or their default value (0 | 1).
the `FULL_BUILD`, or their default value (0, 1, or a list of
modules that determine default [see audiocore, audiomixer, etc.]).
"""
base = dict()
Expand All @@ -98,23 +99,25 @@ def build_module_map():
full_name = module
search_name = module.lstrip("_")
re_pattern = "CIRCUITPY_{}\s=\s(.+)".format(search_name.upper())
find_config = re.search(re_pattern, configs)
#print(module, "|", find_config)
find_config = re.findall(re_pattern, configs)
if not find_config:
continue
full_build = int("FULL_BUILD" in find_config.group(0))
#print(find_config[1])
find_config = ", ".join([x.strip("$()") for x in find_config])

full_build = int("CIRCUITPY_FULL_BUILD" in find_config)
if not full_build:
default_val = find_config.group(1)
default_val = find_config
else:
default_val = "None"

base[search_name] = {
"name": full_name,
"full_build": str(full_build),
"default_value": default_val,
"excluded": {}
}

#print(base)
return base


Expand Down Expand Up @@ -166,21 +169,40 @@ def get_excluded_boards(base):
if board_chip in port_config:
contents += "\n" + "\n".join(port_config[board_chip])

check_dependent_modules = dict()
for module in modules:
board_is_excluded = False
# check if board uses `SMALL_BUILD`. if yes, and current
# module is marked as `FULL_BUILD`, board is excluded
small_build = re.search("CIRCUITPY_SMALL_BUILD = 1", contents)
if small_build and base[module]["full_build"] == "1":
board_is_excluded = True

# check if board uses `MINIMAL_BUILD`. if yes, and current
# module is marked as `DEFAULT_BUILD`, board is excluded
min_build = re.search("CIRCUITPY_MINIMAL_BUILD = 1", contents)
if min_build and base[module]["default_value"] == "CIRCUITPY_DEFAULT_BUILD":
board_is_excluded = True

# check if module is specifically disabled for this board
re_pattern = "CIRCUITPY_{}\s=\s(\w)".format(module.upper())
find_module = re.search(re_pattern, contents)
if not find_module:
# check if default inclusion is off ('0'). if the board doesn't
# have it explicitly enabled, its excluded.
if base[module]["default_value"] == "0":
board_is_excluded = True
if base[module]["default_value"].isdigit():
# check if default inclusion is off ('0'). if the board doesn't
# have it explicitly enabled, its excluded.
if base[module]["default_value"] == "0":
board_is_excluded = True
else:
# this module is dependent on another module. add it
# to the list to check after processing all other modules.
# only need to check exclusion if it isn't already excluded.
if (not board_is_excluded and
base[module]["default_value"] not in [
"None",
"CIRCUITPY_DEFAULT_BUILD"
]):
check_dependent_modules[module] = base[module]["default_value"]
else:
if (find_module.group(1) == "0" and
find_module.group(1) != base[module]["default_value"]):
Expand All @@ -191,6 +213,29 @@ def get_excluded_boards(base):
base[module]["excluded"][board_chip].append(entry.name)
else:
base[module]["excluded"][board_chip] = [entry.name]

for module in check_dependent_modules:
depend_results = set()

parents = check_dependent_modules[module].split("CIRCUITPY_")
parents = [item.strip(", ").lower() for item in parents if item]

for parent in parents:
if parent in base:
if (board_chip in base[parent]["excluded"] and
entry.name in base[parent]["excluded"][board_chip]):
depend_results.add(False)
else:
depend_results.add(True)

# only exclude the module if there were zero parents enabled
# as determined by the 'depend_results' set.
if not any(depend_results):
if board_chip in base[module]["excluded"]:
base[module]["excluded"][board_chip].append(entry.name)
else:
base[module]["excluded"][board_chip] = [entry.name]

#print(json.dumps(base, indent=2))
return base

Expand Down
3 changes: 2 additions & 1 deletion docs/supported_ports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ and ESP8266.
:maxdepth: 2

../ports/atmel-samd/README
../ports/esp8266/README
../ports/nrf/README
../ports/stm32f4/README
../ports/cxd56/README
File renamed without changes.
2 changes: 1 addition & 1 deletion extmod/modframebuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#if MICROPY_PY_FRAMEBUF

#include "ports/stm32/font_petme128_8x8.h"
#include "font_petme128_8x8.h"

typedef struct _mp_obj_framebuf_t {
mp_obj_base_t base;
Expand Down
2 changes: 1 addition & 1 deletion frozen/Adafruit_CircuitPython_BusDevice
2 changes: 1 addition & 1 deletion frozen/Adafruit_CircuitPython_Crickit
2 changes: 1 addition & 1 deletion frozen/Adafruit_CircuitPython_Thermistor
1 change: 0 additions & 1 deletion lib/stm32lib
Submodule stm32lib deleted from d2bcfd
2 changes: 1 addition & 1 deletion lib/tinyusb
Submodule tinyusb updated 230 files
2 changes: 1 addition & 1 deletion lib/utils/interrupt_char.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void mp_keyboard_interrupt(void) {

// Check to see if we've been CTRL-C'ed by autoreload or the user.
bool mp_hal_is_interrupted(void) {
return MP_STATE_VM(mp_pending_exception) == MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception));
return MP_STATE_VM(mp_pending_exception) != NULL;
}

#endif
Loading

0 comments on commit ba83a4a

Please sign in to comment.