Skip to content

Commit 3a41837

Browse files
committed
Merge branch 'main' of origin into ESP32-S3-DevKitC-1-N32R8
2 parents a6585c7 + dd01fc9 commit 3a41837

File tree

2,112 files changed

+70667
-32176
lines changed

Some content is hidden

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

2,112 files changed

+70667
-32176
lines changed

.github/workflows/build.yml

Lines changed: 94 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ jobs:
3030
env:
3131
GITHUB_CONTEXT: ${{ toJson(github) }}
3232
run: echo "$GITHUB_CONTEXT"
33-
- uses: actions/checkout@v2.2.0
33+
- uses: actions/checkout@v3
3434
with:
3535
submodules: false
3636
fetch-depth: 1
3737
- name: Set up Python 3
38-
uses: actions/setup-python@v2
38+
uses: actions/setup-python@v4
3939
with:
40-
python-version: "3.x"
40+
python-version: "3.10"
4141
- name: Get CP deps
4242
run: python tools/ci_fetch_deps.py test ${{ github.sha }}
4343
- name: CircuitPython version
4444
run: |
45-
git describe --dirty --tags || git log --parents HEAD~4..
46-
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)
4747
- name: Install dependencies
4848
run: |
4949
sudo apt-get update
@@ -72,32 +72,45 @@ jobs:
7272
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --emit native
7373
working-directory: tests
7474
- name: mpy Tests
75-
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
7676
working-directory: tests
7777
- name: Native mpy Tests
78-
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
7992
working-directory: tests
8093
- name: Build mpy-cross.static-aarch64
8194
run: make -C mpy-cross -j2 -f Makefile.static-aarch64
82-
- uses: actions/upload-artifact@v2
95+
- uses: actions/upload-artifact@v3
8396
with:
8497
name: mpy-cross.static-aarch64
8598
path: mpy-cross/mpy-cross.static-aarch64
8699
- name: Build mpy-cross.static-raspbian
87100
run: make -C mpy-cross -j2 -f Makefile.static-raspbian
88-
- uses: actions/upload-artifact@v2
101+
- uses: actions/upload-artifact@v3
89102
with:
90103
name: mpy-cross.static-raspbian
91104
path: mpy-cross/mpy-cross.static-raspbian
92105
- name: Build mpy-cross.static
93106
run: make -C mpy-cross -j2 -f Makefile.static
94-
- uses: actions/upload-artifact@v2
107+
- uses: actions/upload-artifact@v3
95108
with:
96109
name: mpy-cross.static-amd64-linux
97110
path: mpy-cross/mpy-cross.static
98111
- name: Build mpy-cross.static-mingw
99112
run: make -C mpy-cross -j2 -f Makefile.static-mingw
100-
- uses: actions/upload-artifact@v2
113+
- uses: actions/upload-artifact@v3
101114
with:
102115
name: mpy-cross.static-x64-windows
103116
path: mpy-cross/mpy-cross.static.exe
@@ -112,44 +125,53 @@ jobs:
112125
[ -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
113126
[ -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
114127
[ -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
115-
- name: "Get changes"
128+
- name: Get last commit with checks
129+
id: get-last-commit-with-checks
130+
if: github.event_name == 'pull_request'
131+
working-directory: tools
132+
env:
133+
REPO: ${{ github.repository }}
134+
PULL: ${{ github.event.number }}
135+
GITHUB_TOKEN: ${{ github.token }}
136+
EXCLUDE_COMMIT: ${{ github.event.after }}
137+
run: python3 -u ci_changes_per_commit.py
138+
- name: Get changes
139+
id: get-changes
116140
if: github.event_name == 'pull_request'
117-
uses: dorny/paths-filter@v2
118-
id: filter
119-
with:
120-
list-files: json
121-
filters: |
122-
changed:
123-
- '**'
124-
- name: "Set matrix"
141+
uses: tj-actions/changed-files@v34
142+
with:
143+
json: "true"
144+
base_sha: ${{ steps.get-last-commit-with-checks.outputs.commit }}
145+
- name: Set matrix
125146
id: set-matrix
126147
working-directory: tools
127148
env:
128-
CHANGED_FILES: ${{ steps.filter.outputs.changed_files }}
149+
CHANGED_FILES: ${{ toJSON(steps.get-changes.outputs.all_changed_and_modified_files) }}
150+
LAST_FAILED_JOBS: ${{ steps.get-last-commit-with-checks.outputs.checkruns }}
129151
run: python3 -u ci_set_matrix.py
130152

131153

132154
mpy-cross-mac:
133-
runs-on: macos-10.15
155+
runs-on: macos-11
134156
steps:
135157
- name: Dump GitHub context
136158
env:
137159
GITHUB_CONTEXT: ${{ toJson(github) }}
138160
run: echo "$GITHUB_CONTEXT"
139-
- uses: actions/checkout@v2.2.0
161+
- uses: actions/checkout@v3
140162
with:
141163
submodules: false
142164
fetch-depth: 1
143165
- name: Set up Python 3
144-
uses: actions/setup-python@v2
166+
uses: actions/setup-python@v4
145167
with:
146-
python-version: "3.x"
168+
python-version: "3.10"
147169
- name: Get CP deps
148170
run: python tools/ci_fetch_deps.py mpy-cross-mac ${{ github.sha }}
149171
- name: CircuitPython version
150172
run: |
151-
git describe --dirty --tags
152-
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
173+
tools/describe || git log --parents HEAD~4..
174+
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
153175
- name: Install dependencies
154176
run: |
155177
brew install gettext
@@ -161,29 +183,27 @@ jobs:
161183
msgfmt --version
162184
- name: Build mpy-cross
163185
run: make -C mpy-cross -j2
164-
- uses: actions/upload-artifact@v2
186+
- uses: actions/upload-artifact@v3
165187
with:
166-
name: mpy-cross-macos-catalina
188+
name: mpy-cross-macos-11-x64
167189
path: mpy-cross/mpy-cross
168-
- name: Select SDK for M1 build
169-
run: sudo xcode-select -switch /Applications/Xcode_12.3.app
170190
- name: Build mpy-cross (arm64)
171191
run: make -C mpy-cross -j2 -f Makefile.m1 V=2
172-
- uses: actions/upload-artifact@v2
192+
- uses: actions/upload-artifact@v3
173193
with:
174-
name: mpy-cross-macos-bigsur-arm64
194+
name: mpy-cross-macos-11-arm64
175195
path: mpy-cross/mpy-cross-arm64
176196
- name: Make universal binary
177197
run: lipo -create -output mpy-cross-macos-universal mpy-cross/mpy-cross mpy-cross/mpy-cross-arm64
178-
- uses: actions/upload-artifact@v2
198+
- uses: actions/upload-artifact@v3
179199
with:
180-
name: mpy-cross-macos-universal
200+
name: mpy-cross-macos-11-universal
181201
path: mpy-cross-macos-universal
182202
- name: Upload mpy-cross build to S3
183203
run: |
184-
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross-macos-universal s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-universal-${{ env.CP_VERSION }} --no-progress --region us-east-1
185-
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross-arm64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-bigsur-${{ env.CP_VERSION }}-arm64 --no-progress --region us-east-1
186-
[ -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
204+
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross-macos-universal s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-11-${{ env.CP_VERSION }}-universal --no-progress --region us-east-1
205+
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross-arm64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-11-${{ env.CP_VERSION }}-arm64 --no-progress --region us-east-1
206+
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-11-${{ env.CP_VERSION }}-x64 --no-progress --region us-east-1
187207
env:
188208
AWS_PAGER: ''
189209
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -196,20 +216,20 @@ jobs:
196216
needs: test
197217
if: ${{ needs.test.outputs.build-doc == 'True' }}
198218
steps:
199-
- uses: actions/checkout@v2.2.0
219+
- uses: actions/checkout@v3
200220
with:
201221
submodules: false
202222
fetch-depth: 1
203223
- name: Get CP deps
204224
run: python tools/ci_fetch_deps.py docs ${{ github.sha }}
205225
- name: CircuitPython version
206226
run: |
207-
git describe --dirty --tags
208-
echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags)
227+
tools/describe || git log --parents HEAD~4..
228+
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
209229
- name: Set up Python 3
210-
uses: actions/setup-python@v2
230+
uses: actions/setup-python@v4
211231
with:
212-
python-version: "3.x"
232+
python-version: "3.10"
213233
- name: Install dependencies
214234
run: |
215235
sudo apt-get update
@@ -218,20 +238,20 @@ jobs:
218238
pip install -r requirements-ci.txt -r requirements-doc.txt
219239
- name: Build and Validate Stubs
220240
run: make check-stubs -j2
221-
- uses: actions/upload-artifact@v2
241+
- uses: actions/upload-artifact@v3
222242
with:
223243
name: stubs
224244
path: circuitpython-stubs/dist/*
225245
- name: Test Documentation Build (HTML)
226246
run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
227-
- uses: actions/upload-artifact@v2
247+
- uses: actions/upload-artifact@v3
228248
with:
229249
name: docs
230250
path: _build/html
231251
- name: Test Documentation Build (LaTeX/PDF)
232252
run: |
233253
make latexpdf
234-
- uses: actions/upload-artifact@v2
254+
- uses: actions/upload-artifact@v3
235255
with:
236256
name: docs
237257
path: _build/latex
@@ -265,21 +285,22 @@ jobs:
265285
if: ${{ needs.test.outputs.boards-arm != '[]' }}
266286
steps:
267287
- name: Set up Python 3
268-
uses: actions/setup-python@v2
288+
uses: actions/setup-python@v4
269289
with:
270-
python-version: "3.x"
271-
- uses: actions/checkout@v2.2.0
290+
python-version: "3.10"
291+
- uses: actions/checkout@v3
272292
with:
273293
submodules: false
274294
fetch-depth: 1
275295
- name: Get CP deps
276296
run: python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.sha }}
297+
- uses: carlosperate/arm-none-eabi-gcc-action@v1
298+
with:
299+
release: '10-2020-q4'
277300
- name: Install dependencies
278301
run: |
279302
sudo apt-get install -y gettext
280303
pip install -r requirements-ci.txt -r requirements-dev.txt
281-
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
282-
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
283304
- name: Versions
284305
run: |
285306
gcc --version
@@ -294,7 +315,7 @@ jobs:
294315
working-directory: tools
295316
env:
296317
BOARDS: ${{ matrix.board }}
297-
- uses: actions/upload-artifact@v2
318+
- uses: actions/upload-artifact@v3
298319
with:
299320
name: ${{ matrix.board }}
300321
path: bin/${{ matrix.board }}
@@ -317,10 +338,10 @@ jobs:
317338
if: ${{ needs.test.outputs.boards-riscv != '[]' }}
318339
steps:
319340
- name: Set up Python 3
320-
uses: actions/setup-python@v2
341+
uses: actions/setup-python@v4
321342
with:
322-
python-version: "3.x"
323-
- uses: actions/checkout@v2.2.0
343+
python-version: "3.10"
344+
- uses: actions/checkout@v3
324345
with:
325346
submodules: false
326347
fetch-depth: 1
@@ -346,7 +367,7 @@ jobs:
346367
working-directory: tools
347368
env:
348369
BOARDS: ${{ matrix.board }}
349-
- uses: actions/upload-artifact@v2
370+
- uses: actions/upload-artifact@v3
350371
with:
351372
name: ${{ matrix.board }}
352373
path: bin/${{ matrix.board }}
@@ -369,23 +390,26 @@ jobs:
369390
if: ${{ needs.test.outputs.boards-espressif != '[]' }}
370391
steps:
371392
- name: Set up Python 3
372-
uses: actions/setup-python@v2
393+
id: py3
394+
uses: actions/setup-python@v4
373395
with:
374-
python-version: "3.x"
375-
- uses: actions/checkout@v2.2.0
396+
python-version: "3.10"
397+
- uses: actions/checkout@v3
376398
with:
377399
submodules: false
378400
fetch-depth: 1
379401
- name: Get CP deps
380402
run: python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.sha }}
381403
- name: CircuitPython version
382-
run: git describe --dirty --tags
383-
- uses: actions/cache@v2
404+
run: |
405+
tools/describe || git log --parents HEAD~4..
406+
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
407+
- uses: actions/cache@v3
384408
name: Fetch IDF tool cache
385409
id: idf-cache
386410
with:
387411
path: ${{ github.workspace }}/.idf_tools
388-
key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/espressif/esp-idf/HEAD') }}-20210923
412+
key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/espressif/esp-idf/HEAD') }}-${{ steps.py3.outputs.python-path }}-20220404
389413
- name: Clone IDF submodules
390414
run: |
391415
(cd $IDF_PATH && git submodule update --init)
@@ -434,7 +458,7 @@ jobs:
434458
IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf
435459
IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools
436460
BOARDS: ${{ matrix.board }}
437-
- uses: actions/upload-artifact@v2
461+
- uses: actions/upload-artifact@v3
438462
with:
439463
name: ${{ matrix.board }}
440464
path: bin/${{ matrix.board }}
@@ -456,10 +480,10 @@ jobs:
456480
if: ${{ needs.test.outputs.boards-aarch != '[]' }}
457481
steps:
458482
- name: Set up Python 3
459-
uses: actions/setup-python@v2
483+
uses: actions/setup-python@v4
460484
with:
461-
python-version: "3.x"
462-
- uses: actions/checkout@v2.2.0
485+
python-version: "3.10"
486+
- uses: actions/checkout@v3
463487
with:
464488
submodules: false
465489
fetch-depth: 1
@@ -471,8 +495,9 @@ jobs:
471495
pip install -r requirements-ci.txt -r requirements-dev.txt
472496
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
473497
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
474-
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
475-
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
498+
- uses: carlosperate/arm-none-eabi-gcc-action@v1
499+
with:
500+
release: '10-2020-q4'
476501
- name: Install mkfs.fat
477502
run: |
478503
wget https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz
@@ -498,7 +523,7 @@ jobs:
498523
working-directory: tools
499524
env:
500525
BOARDS: ${{ matrix.board }}
501-
- uses: actions/upload-artifact@v2
526+
- uses: actions/upload-artifact@v3
502527
with:
503528
name: ${{ matrix.board }}
504529
path: bin/${{ matrix.board }}

0 commit comments

Comments
 (0)