Skip to content

Commit e693974

Browse files
authored
Merge branch 'adafruit:main' into main
2 parents ef2c6e4 + a13c320 commit e693974

File tree

880 files changed

+25424
-5576
lines changed

Some content is hidden

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

880 files changed

+25424
-5576
lines changed

.github/workflows/build.yml

Lines changed: 57 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
check_suite:
1313
types: [rerequested]
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
18+
1519
jobs:
1620
test:
1721
runs-on: ubuntu-20.04
@@ -30,16 +34,16 @@ jobs:
3034
with:
3135
submodules: false
3236
fetch-depth: 1
33-
- name: Set up Python 3.8
34-
uses: actions/setup-python@v1
37+
- name: Set up Python 3
38+
uses: actions/setup-python@v2
3539
with:
36-
python-version: 3.8
40+
python-version: "3.x"
3741
- name: Get CP deps
38-
run: python tools/ci_fetch_deps.py test ${{ github.ref }}
42+
run: python tools/ci_fetch_deps.py test ${{ github.sha }}
3943
- name: CircuitPython version
4044
run: |
41-
git describe --dirty --tags || git log --parents HEAD~4..
42-
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
45+
tools/describe || git log --parents HEAD~4..
46+
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
4347
- name: Install dependencies
4448
run: |
4549
sudo apt-get update
@@ -68,10 +72,23 @@ jobs:
6872
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --emit native
6973
working-directory: tests
7074
- name: mpy Tests
71-
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --mpy-cross-flags='-mcache-lookup-bc' --via-mpy -d basics float micropython
75+
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --via-mpy -d basics float micropython
7276
working-directory: tests
7377
- name: Native mpy Tests
74-
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --mpy-cross-flags='-mcache-lookup-bc' --via-mpy --emit native -d basics float micropython
78+
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --via-mpy --emit native -d basics float micropython
79+
working-directory: tests
80+
- name: Build native modules
81+
run: |
82+
make -C examples/natmod/features1
83+
make -C examples/natmod/features2
84+
make -C examples/natmod/btree
85+
make -C examples/natmod/framebuf
86+
make -C examples/natmod/uheapq
87+
make -C examples/natmod/urandom
88+
make -C examples/natmod/ure
89+
make -C examples/natmod/uzlib
90+
- name: Test native modules
91+
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-natmodtests.py extmod/{btree*,framebuf*,uheapq*,ure*,uzlib*}.py
7592
working-directory: tests
7693
- name: Build mpy-cross.static-aarch64
7794
run: make -C mpy-cross -j2 -f Makefile.static-aarch64
@@ -136,16 +153,16 @@ jobs:
136153
with:
137154
submodules: false
138155
fetch-depth: 1
139-
- name: Set up Python 3.8
140-
uses: actions/setup-python@v1
156+
- name: Set up Python 3
157+
uses: actions/setup-python@v2
141158
with:
142-
python-version: 3.8
159+
python-version: "3.x"
143160
- name: Get CP deps
144-
run: python tools/ci_fetch_deps.py mpy-cross-mac ${{ github.ref }}
161+
run: python tools/ci_fetch_deps.py mpy-cross-mac ${{ github.sha }}
145162
- name: CircuitPython version
146163
run: |
147-
git describe --dirty --tags
148-
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
164+
tools/describe || git log --parents HEAD~4..
165+
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
149166
- name: Install dependencies
150167
run: |
151168
brew install gettext
@@ -197,15 +214,15 @@ jobs:
197214
submodules: false
198215
fetch-depth: 1
199216
- name: Get CP deps
200-
run: python tools/ci_fetch_deps.py docs ${{ github.ref }}
217+
run: python tools/ci_fetch_deps.py docs ${{ github.sha }}
201218
- name: CircuitPython version
202219
run: |
203-
git describe --dirty --tags
204-
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
205-
- name: Set up Python 3.8
206-
uses: actions/setup-python@v1
220+
tools/describe || git log --parents HEAD~4..
221+
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
222+
- name: Set up Python 3
223+
uses: actions/setup-python@v2
207224
with:
208-
python-version: 3.8
225+
python-version: "3.x"
209226
- name: Install dependencies
210227
run: |
211228
sudo apt-get update
@@ -241,7 +258,7 @@ jobs:
241258
zip -9r circuitpython-stubs.zip circuitpython-stubs
242259
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs/dist/*.tar.gz s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1
243260
- name: Upload stubs to PyPi
244-
if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
261+
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')
245262
env:
246263
TWINE_USERNAME: ${{ secrets.pypi_username }}
247264
TWINE_PASSWORD: ${{ secrets.pypi_password }}
@@ -260,16 +277,16 @@ jobs:
260277
board: ${{ fromJSON(needs.test.outputs.boards-arm) }}
261278
if: ${{ needs.test.outputs.boards-arm != '[]' }}
262279
steps:
263-
- name: Set up Python 3.8
264-
uses: actions/setup-python@v1
280+
- name: Set up Python 3
281+
uses: actions/setup-python@v2
265282
with:
266-
python-version: 3.8
283+
python-version: "3.x"
267284
- uses: actions/[email protected]
268285
with:
269286
submodules: false
270287
fetch-depth: 1
271288
- name: Get CP deps
272-
run: python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.ref }}
289+
run: python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.sha }}
273290
- name: Install dependencies
274291
run: |
275292
sudo apt-get install -y gettext
@@ -312,16 +329,16 @@ jobs:
312329
board: ${{ fromJSON(needs.test.outputs.boards-riscv) }}
313330
if: ${{ needs.test.outputs.boards-riscv != '[]' }}
314331
steps:
315-
- name: Set up Python 3.8
316-
uses: actions/setup-python@v1
332+
- name: Set up Python 3
333+
uses: actions/setup-python@v2
317334
with:
318-
python-version: 3.8
335+
python-version: "3.x"
319336
- uses: actions/[email protected]
320337
with:
321338
submodules: false
322339
fetch-depth: 1
323340
- name: Get CP deps
324-
run: python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.ref }}
341+
run: python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.sha }}
325342
- name: Install dependencies
326343
run: |
327344
sudo apt-get install -y gettext
@@ -364,18 +381,20 @@ jobs:
364381
board: ${{ fromJSON(needs.test.outputs.boards-espressif) }}
365382
if: ${{ needs.test.outputs.boards-espressif != '[]' }}
366383
steps:
367-
- name: Set up Python 3.8
368-
uses: actions/setup-python@v1
384+
- name: Set up Python 3
385+
uses: actions/setup-python@v2
369386
with:
370-
python-version: 3.8
387+
python-version: "3.x"
371388
- uses: actions/[email protected]
372389
with:
373390
submodules: false
374391
fetch-depth: 1
375392
- name: Get CP deps
376-
run: python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.ref }}
393+
run: python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.sha }}
377394
- name: CircuitPython version
378-
run: git describe --dirty --tags
395+
run: |
396+
tools/describe || git log --parents HEAD~4..
397+
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
379398
- uses: actions/cache@v2
380399
name: Fetch IDF tool cache
381400
id: idf-cache
@@ -451,16 +470,16 @@ jobs:
451470
board: ${{ fromJSON(needs.test.outputs.boards-aarch) }}
452471
if: ${{ needs.test.outputs.boards-aarch != '[]' }}
453472
steps:
454-
- name: Set up Python 3.8
455-
uses: actions/setup-python@v1
473+
- name: Set up Python 3
474+
uses: actions/setup-python@v2
456475
with:
457-
python-version: 3.8
476+
python-version: "3.x"
458477
- uses: actions/[email protected]
459478
with:
460479
submodules: false
461480
fetch-depth: 1
462481
- name: Get CP deps
463-
run: python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.ref }}
482+
run: python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.sha }}
464483
- name: Install dependencies
465484
run: |
466485
sudo apt-get install -y gettext mtools

.github/workflows/create_website_pr.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
with:
2121
submodules: false
2222
fetch-depth: 1
23-
- name: Set up Python 3.8
24-
uses: actions/setup-python@v1
23+
- name: Set up Python 3
24+
uses: actions/setup-python@v2
2525
with:
26-
python-version: 3.8
26+
python-version: "3.x"
2727
- name: Get CP deps
28-
run: python tools/ci_fetch_deps.py website ${{ github.ref }}
28+
run: python tools/ci_fetch_deps.py website ${{ github.sha }}
2929
- name: Install deps
3030
run: |
3131
pip install -r requirements-dev.txt
@@ -34,7 +34,9 @@ jobs:
3434
gcc --version
3535
python3 --version
3636
- name: CircuitPython version
37-
run: git describe --dirty --tags
37+
run: |
38+
tools/describe || git log --parents HEAD~4..
39+
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
3840
- name: Website
3941
run: python3 build_board_info.py
4042
working-directory: tools

.github/workflows/notify.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Notify users based on issue labels
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
7+
jobs:
8+
notify:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: jenschelkopf/[email protected]
12+
with:
13+
recipients: |
14+
ulab=@v923z

.github/workflows/ports_windows.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- 'ports/unix/**'
1313
- 'ports/windows/**'
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
18+
1519
jobs:
1620
build:
1721
runs-on: windows-2019
@@ -70,11 +74,11 @@ jobs:
7074
submodules: false
7175
fetch-depth: 1
7276
- name: Get CP deps
73-
run: python tools/ci_fetch_deps.py windows ${{ github.ref }}
77+
run: python tools/ci_fetch_deps.py windows ${{ github.sha }}
7478
- name: CircuitPython version
7579
run: |
76-
git describe --dirty --tags
77-
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
80+
tools/describe || git log --parents HEAD~4..
81+
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
7882
7983
- name: build mpy-cross
8084
run: make -j2 -C mpy-cross

.github/workflows/pre-commit.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,19 @@ on:
88
pull_request:
99
push:
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
1115
jobs:
1216
pre-commit:
1317
runs-on: ubuntu-20.04
1418
steps:
1519
- uses: actions/[email protected]
16-
- uses: actions/setup-python@v1
20+
- name: Set up Python 3
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: "3.x"
1724
- name: Install deps
1825
run: |
1926
sudo apt-add-repository -y -u ppa:pybricks/ppa

0 commit comments

Comments
 (0)