Skip to content

Commit 1a8bb1c

Browse files
authored
Merge pull request #1 from adafruit/main
Update fork
2 parents 50e9008 + 8789a2c commit 1a8bb1c

File tree

848 files changed

+31875
-4621
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

848 files changed

+31875
-4621
lines changed

.github/workflows/build.yml

Lines changed: 62 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616
test:
17-
runs-on: ubuntu-18.04
17+
runs-on: ubuntu-20.04
1818
steps:
1919
- name: Dump GitHub context
2020
env:
@@ -35,13 +35,40 @@ jobs:
3535
python-version: 3.8
3636
- name: Install deps
3737
run: |
38+
sudo apt-get update
3839
sudo apt-get install -y eatmydata
3940
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
40-
pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli
41+
pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli mypy
4142
- name: Versions
4243
run: |
4344
gcc --version
4445
python3 --version
46+
- name: Translations
47+
run: make check-translate
48+
- name: New boards check
49+
run: python3 -u ci_new_boards_check.py
50+
working-directory: tools
51+
- name: Duplicate USB VID/PID Check
52+
run: python3 -u -m tools.ci_check_duplicate_usb_vid_pid
53+
- name: Build and Validate Stubs
54+
run: make check-stubs -j2
55+
- uses: actions/upload-artifact@v2
56+
with:
57+
name: stubs
58+
path: circuitpython-stubs*
59+
- name: Test Documentation Build (HTML)
60+
run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
61+
- uses: actions/upload-artifact@v2
62+
with:
63+
name: docs
64+
path: _build/html
65+
- name: Test Documentation Build (LaTeX/PDF)
66+
run: |
67+
make latexpdf
68+
- uses: actions/upload-artifact@v2
69+
with:
70+
name: docs
71+
path: _build/latex
4572
- name: Build mpy-cross
4673
run: make -C mpy-cross -j2
4774
- name: Build unix port
@@ -67,32 +94,6 @@ jobs:
6794
- name: mpy Tests
6895
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float
6996
working-directory: tests
70-
- name: Stubs
71-
run: make stubs -j2
72-
- uses: actions/upload-artifact@v2
73-
with:
74-
name: stubs
75-
path: circuitpython-stubs*
76-
- name: Test Documentation Build (HTML)
77-
run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
78-
- uses: actions/upload-artifact@v2
79-
with:
80-
name: docs
81-
path: _build/html
82-
- name: Test Documentation Build (LaTeX/PDF)
83-
run: |
84-
make latexpdf
85-
- uses: actions/upload-artifact@v2
86-
with:
87-
name: docs
88-
path: _build/latex
89-
- name: Translations
90-
run: make check-translate
91-
- name: New boards check
92-
run: python3 -u ci_new_boards_check.py
93-
working-directory: tools
94-
- name: Duplicate USB VID/PID Check
95-
run: python3 -u -m tools.ci_check_duplicate_usb_vid_pid
9697
- name: Build mpy-cross.static-raspbian
9798
run: make -C mpy-cross -j2 -f Makefile.static-raspbian
9899
- uses: actions/upload-artifact@v2
@@ -111,12 +112,15 @@ jobs:
111112
with:
112113
name: mpy-cross.static-x64-windows
113114
path: mpy-cross/mpy-cross.static.exe
114-
- name: Upload mpy-cross builds to S3
115+
- name: Upload stubs and mpy-cross builds to S3
115116
run: |
116117
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1
117118
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1
118119
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1
120+
zip -9r circuitpython-stubs.zip circuitpython-stubs
121+
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1
119122
env:
123+
AWS_PAGER: ''
120124
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
121125
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
122126
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
@@ -131,7 +135,7 @@ jobs:
131135
run: echo "$GITHUB_CONTEXT"
132136
- name: Install dependencies
133137
run: |
134-
brew install gettext awscli
138+
brew install gettext
135139
echo >>$GITHUB_PATH /usr/local/opt/gettext/bin
136140
- name: Versions
137141
run: |
@@ -157,20 +161,23 @@ jobs:
157161
run: |
158162
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-catalina-${{ env.CP_VERSION }} --no-progress --region us-east-1
159163
env:
164+
AWS_PAGER: ''
160165
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
161166
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
162167
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
163168

164169

165170
build-arm:
166-
runs-on: ubuntu-18.04
171+
runs-on: ubuntu-20.04
167172
needs: test
168173
strategy:
169174
fail-fast: false
170175
matrix:
171176
board:
172177
- "8086_commander"
173-
- "TG-Watch02A"
178+
- "ADM_B_NRF52840_1"
179+
- "TG-Watch"
180+
- "adafruit_feather_rp2040"
174181
- "aloriumtech_evo_m51"
175182
- "aramcon_badge_2019"
176183
- "arduino_mkr1300"
@@ -179,6 +186,7 @@ jobs:
179186
- "arduino_nano_33_iot"
180187
- "arduino_zero"
181188
- "bast_pro_mini_m0"
189+
- "bastble"
182190
- "bdmicro_vina_d21"
183191
- "bdmicro_vina_d51"
184192
- "bless_dev_board_multi_sensor"
@@ -193,6 +201,8 @@ jobs:
193201
- "circuitplayground_express_displayio"
194202
- "clue_nrf52840_express"
195203
- "cp32-m4"
204+
- "cp_sapling_m0"
205+
- "cp_sapling_m0_spiflash"
196206
- "datalore_ip_m4"
197207
- "datum_distance"
198208
- "datum_imu"
@@ -252,6 +262,7 @@ jobs:
252262
- "monster_m4sk"
253263
- "ndgarage_ndbit6"
254264
- "ndgarage_ndbit6_v2"
265+
- "neopixel_trinkey_m0"
255266
- "nfc_copy_cat"
256267
- "nice_nano"
257268
- "nucleo_f746zg"
@@ -284,6 +295,7 @@ jobs:
284295
- "pyruler"
285296
- "qtpy_m0"
286297
- "qtpy_m0_haxpress"
298+
- "raspberry_pi_pico"
287299
- "raytac_mdbt50q-db-40"
288300
- "robohatmm1_m4"
289301
- "sam32"
@@ -292,6 +304,7 @@ jobs:
292304
- "seeeduino_xiao"
293305
- "serpente"
294306
- "shirtty"
307+
- "silicognition-m4-shim"
295308
- "simmel"
296309
- "snekboard"
297310
- "sparkfun_lumidrive"
@@ -303,7 +316,9 @@ jobs:
303316
- "sparkfun_samd21_mini"
304317
- "sparkfun_samd51_thing_plus"
305318
- "spresense"
319+
- "stackrduino_m0_pro"
306320
- "stm32f411ce_blackpill"
321+
- "stm32f411ce_blackpill_with_flash"
307322
- "stm32f411ve_discovery"
308323
- "stm32f412zg_discovery"
309324
- "stm32f4_discovery"
@@ -312,7 +327,8 @@ jobs:
312327
- "teensy40"
313328
- "teensy41"
314329
- "teknikio_bluebird"
315-
- "thunderpack"
330+
- "thunderpack_v11"
331+
- "thunderpack_v12"
316332
- "tinkeringtech_scoutmakes_azul"
317333
- "trellis_m4_express"
318334
- "trinket_m0"
@@ -334,8 +350,8 @@ jobs:
334350
run: |
335351
sudo apt-get install -y gettext
336352
pip install requests sh click setuptools awscli
337-
wget https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
338-
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
353+
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
354+
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
339355
- name: Versions
340356
run: |
341357
gcc --version
@@ -360,12 +376,13 @@ jobs:
360376
- name: Upload to S3
361377
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
362378
env:
379+
AWS_PAGER: ''
363380
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
364381
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
365382
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
366383

367384
build-riscv:
368-
runs-on: ubuntu-18.04
385+
runs-on: ubuntu-20.04
369386
needs: test
370387
strategy:
371388
fail-fast: false
@@ -408,21 +425,26 @@ jobs:
408425
- name: Upload to S3
409426
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
410427
env:
428+
AWS_PAGER: ''
411429
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
412430
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
413431
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
414432
build-xtensa:
415-
runs-on: ubuntu-latest
433+
runs-on: ubuntu-20.04
416434
needs: test
417435
strategy:
418436
fail-fast: false
419437
matrix:
420438
board:
439+
- "adafruit_feather_esp32s2_nopsram"
440+
- "adafruit_feather_esp32s2_tftback_nopsram"
441+
- "adafruit_magtag_2.9_grayscale"
421442
- "adafruit_metro_esp32s2"
422443
- "electroniccats_bastwifi"
423444
- "espressif_kaluga_1"
424445
- "espressif_saola_1_wroom"
425446
- "espressif_saola_1_wrover"
447+
- "lilygo_ttgo_t8_s2_st7789"
426448
- "microdev_micro_s2"
427449
- "muselab_nanoesp32_s2"
428450
- "targett_module_clip_wroom"
@@ -442,12 +464,12 @@ jobs:
442464
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
443465
- name: CircuitPython version
444466
run: git describe --dirty --tags
445-
- uses: actions/cache@v1
467+
- uses: actions/cache@v2
446468
name: Fetch IDF tool cache
447469
id: idf-cache
448470
with:
449471
path: ${{ github.workspace }}/.idf_tools
450-
key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20200801
472+
key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210128
451473
- name: Clone IDF submodules
452474
run: |
453475
(cd $IDF_PATH && git submodule update --init)
@@ -501,6 +523,7 @@ jobs:
501523
- name: Upload to S3
502524
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
503525
env:
526+
AWS_PAGER: ''
504527
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
505528
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
506529
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))

.github/workflows/create_website_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
website:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-20.04
1414
steps:
1515
- name: Dump GitHub context
1616
env:

.github/workflows/pre-commit.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ on:
1111

1212
jobs:
1313
pre-commit:
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-20.04
1515
steps:
1616
- uses: actions/checkout@v1
1717
- uses: actions/setup-python@v1
18+
- name: Install deps
19+
run: sudo apt-get update && sudo apt-get install -y gettext
20+
- name: Populate selected submodules
21+
run: git submodule update --init extmod/ulab
1822
- name: set PY
1923
run: echo >>$GITHUB_ENV PY="$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
20-
- uses: actions/cache@v1
24+
- uses: actions/cache@v2
2125
with:
2226
path: ~/.cache/pre-commit
2327
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}

.gitmodules

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,25 @@
152152
url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git
153153
[submodule "ports/esp32s2/esp-idf"]
154154
path = ports/esp32s2/esp-idf
155-
url = https://github.com/espressif/esp-idf.git
155+
url = https://github.com/adafruit/esp-idf.git
156+
[submodule "ports/esp32s2/certificates/nina-fw"]
157+
path = ports/esp32s2/certificates/nina-fw
158+
url = https://github.com/adafruit/nina-fw.git
159+
[submodule "frozen/Adafruit_CircuitPython_ST7789"]
160+
path = frozen/Adafruit_CircuitPython_ST7789
161+
url = https://github.com/adafruit/Adafruit_CircuitPython_ST7789
162+
[submodule "frozen/Adafruit_CircuitPython_Display_Shapes"]
163+
path = frozen/Adafruit_CircuitPython_Display_Shapes
164+
url = https://github.com/adafruit/Adafruit_CircuitPython_Display_Shapes
165+
[submodule "frozen/Adafruit_CircuitPython_Display_Text"]
166+
path = frozen/Adafruit_CircuitPython_Display_Text
167+
url = https://github.com/adafruit/Adafruit_CircuitPython_Display_Text
168+
[submodule "frozen/Adafruit_CircuitPython_ProgressBar"]
169+
path = frozen/Adafruit_CircuitPython_ProgressBar
170+
url = https://github.com/adafruit/Adafruit_CircuitPython_ProgressBar
171+
[submodule "frozen/Adafruit_CircuitPython_LC709203F"]
172+
path = frozen/Adafruit_CircuitPython_LC709203F
173+
url = https://github.com/adafruit/Adafruit_CircuitPython_LC709203F
174+
[submodule "ports/raspberrypi/sdk"]
175+
path = ports/raspberrypi/sdk
176+
url = https://github.com/raspberrypi/pico-sdk.git

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT
66

77
# Contributing
88
Please note that this project is released with a
9-
[Contributor Code of Conduct](https://github.com/adafruit/circuitpython/blob/main/CODE_OF_CONDUCT.md).
9+
[Contributor Code of Conduct](CODE_OF_CONDUCT.md).
1010
By participating in this project you agree to abide by its terms. Participation
1111
covers any forum used to converse about CircuitPython including unofficial and official spaces. Failure to do
1212
so will result in corrective actions such as time out or ban from the project.

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,18 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(BASEOPTS)
4040
# the i18n builder cannot share the environment and doctrees with the others
4141
I18NSPHINXOPTS = $(BASEOPTS)
4242

43-
TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/cxd56 ports/esp32s2 ports/mimxrt10xx ports/nrf ports/stm py shared-bindings shared-module supervisor
43+
TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/cxd56 ports/esp32s2 ports/mimxrt10xx ports/nrf ports/raspberrypi ports/stm py shared-bindings shared-module supervisor
4444
# Paths to exclude from TRANSLATE_SOURCES
4545
# Each must be preceded by "-path"; if any wildcards, enclose in quotes.
4646
# Separate by "-o" (Find's "or" operand)
4747
TRANSLATE_SOURCES_EXC = -path "ports/*/build-*" \
4848
-o -path "ports/*/build" \
49-
-o -path ports/esp32s2/esp-idf \
50-
-o -path ports/cxd56/spresense-exported-sdk \
51-
-o -path ports/stm/st_driver \
5249
-o -path ports/atmel-samd/asf4 \
50+
-o -path ports/cxd56/spresense-exported-sdk \
51+
-o -path ports/esp32s2/esp-idf \
5352
-o -path ports/mimxrt10xx/sdk \
53+
-o -path ports/raspberrypi/sdk \
54+
-o -path ports/stm/st_driver \
5455
-o -path lib/tinyusb \
5556
-o -path lib/lwip \
5657

@@ -222,7 +223,7 @@ pseudoxml:
222223
all-source:
223224

224225
locale/circuitpython.pot: all-source
225-
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale
226+
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o - | sed -e '/"POT-Creation-Date: /d' > $@
226227

227228
# Historically, `make translate` updated the .pot file and ran msgmerge.
228229
# However, this was a frequent source of merge conflicts. Weblate can perform
@@ -255,6 +256,7 @@ stubs:
255256
@$(PYTHON) tools/extract_pyi.py shared-bindings/ $(STUBDIR)
256257
@$(PYTHON) tools/extract_pyi.py extmod/ulab/code/ $(STUBDIR)/ulab
257258
@$(PYTHON) tools/extract_pyi.py ports/atmel-samd/bindings $(STUBDIR)
259+
@$(PYTHON) tools/extract_pyi.py ports/raspberrypi/bindings $(STUBDIR)
258260
@$(PYTHON) setup.py -q sdist
259261

260262
.PHONY: check-stubs
@@ -265,7 +267,7 @@ update-frozen-libraries:
265267
@echo "Updating all frozen libraries to latest tagged version."
266268
cd frozen; for library in *; do cd $$library; ../../tools/git-checkout-latest-tag.sh; cd ..; done
267269

268-
one-of-each: samd21 samd51 esp32s2 litex mimxrt10xx nrf stm
270+
one-of-each: samd21 litex mimxrt10xx nrf stm
269271

270272
samd21:
271273
$(MAKE) -C ports/atmel-samd BOARD=trinket_m0

0 commit comments

Comments
 (0)