Skip to content

Commit d30b89d

Browse files
committed
Merge branch 'main' into boundary_fill_background_tasks
2 parents cc9ef30 + f708048 commit d30b89d

102 files changed

Lines changed: 2661 additions & 806 deletions

File tree

Some content is hidden

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

.github/actions/deps/external/action.yml

Lines changed: 12 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,54 +9,31 @@ inputs:
99
- cache
1010
- restore
1111

12-
platform:
12+
port:
1313
required: false
1414
default: none
15-
type: choice
16-
options:
17-
- arm
18-
- aarch
19-
- esp
20-
- riscv
21-
- none
15+
type: string
2216

2317
runs:
2418
using: composite
2519
steps:
26-
# aarch
27-
- name: Get aarch toolchain
28-
if: inputs.platform == 'aarch'
29-
run: |
30-
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
31-
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
32-
sudo apt-get install -y mtools
33-
shell: bash
34-
- name: Install mkfs.fat
35-
if: inputs.platform == 'aarch'
36-
run: |
37-
wget https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz
38-
tar -xaf dosfstools-4.2.tar.gz
39-
cd dosfstools-4.2
40-
./configure
41-
make -j 2
42-
cd src
43-
echo >> $GITHUB_PATH $(pwd)
44-
shell: bash
45-
4620
# arm
4721
- name: Get arm toolchain
48-
if: inputs.platform == 'aarch' || inputs.platform == 'arm'
22+
if: >-
23+
inputs.port != 'none' &&
24+
inputs.port != 'litex' &&
25+
inputs.port != 'espressif'
4926
uses: carlosperate/arm-none-eabi-gcc-action@v1
5027
with:
5128
release: '10-2020-q4'
5229

53-
# esp
54-
- name: Get esp toolchain
55-
if: inputs.platform == 'esp'
30+
# espressif
31+
- name: Get espressif toolchain
32+
if: inputs.port == 'espressif'
5633
run: sudo apt-get install -y ninja-build
5734
shell: bash
5835
- name: Install IDF tools
59-
if: inputs.platform == 'esp'
36+
if: inputs.port == 'espressif'
6037
run: |
6138
echo "Installing ESP-IDF tools"
6239
$IDF_PATH/tools/idf_tools.py --non-interactive install required
@@ -66,24 +43,16 @@ runs:
6643
rm -rf $IDF_TOOLS_PATH/dist
6744
shell: bash
6845
- name: Set environment
69-
if: inputs.platform == 'esp'
46+
if: inputs.port == 'espressif'
7047
run: |
7148
source $IDF_PATH/export.sh
7249
echo >> $GITHUB_ENV "IDF_PYTHON_ENV_PATH=$IDF_PYTHON_ENV_PATH"
7350
echo >> $GITHUB_PATH "$PATH"
7451
shell: bash
7552

76-
# riscv
77-
- name: Get riscv toolchain
78-
if: inputs.platform == 'riscv'
79-
run: |
80-
wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
81-
sudo tar -C /usr --strip-components=1 -xaf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
82-
shell: bash
83-
8453
# common
8554
- name: Cache python dependencies
86-
if: inputs.platform != 'esp'
55+
if: inputs.port != 'espressif'
8756
uses: ./.github/actions/deps/python
8857
with:
8958
action: ${{ inputs.action }}

.github/actions/deps/ports/action.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,18 @@ runs:
1919
if [ -z $PORT ]; then (exit 1); else echo >> $GITHUB_OUTPUT "port=$PORT"; fi
2020
shell: bash
2121

22-
- name: Set up espressif port
22+
- name: Set up broadcom
23+
if: steps.board-to-port.outputs.port == 'broadcom'
24+
uses: ./.github/actions/deps/ports/broadcom
25+
26+
- name: Set up espressif
2327
if: steps.board-to-port.outputs.port == 'espressif'
2428
uses: ./.github/actions/deps/ports/espressif
2529

26-
- name: Set up nrf port
30+
- name: Set up litex
31+
if: steps.board-to-port.outputs.port == 'litex'
32+
uses: ./.github/actions/deps/ports/litex
33+
34+
- name: Set up nrf
2735
if: steps.board-to-port.outputs.port == 'nrf'
2836
uses: ./.github/actions/deps/ports/nrf
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Fetch broadcom port deps
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Get broadcom toolchain
7+
run: |
8+
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
9+
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
10+
sudo apt-get install -y mtools
11+
shell: bash
12+
- name: Install mkfs.fat
13+
run: |
14+
wget https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz
15+
tar -xaf dosfstools-4.2.tar.gz
16+
cd dosfstools-4.2
17+
./configure
18+
make -j 2
19+
cd src
20+
echo >> $GITHUB_PATH $(pwd)
21+
shell: bash
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Fetch litex port deps
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Get litex toolchain
7+
run: |
8+
wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
9+
sudo tar -C /usr --strip-components=1 -xaf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
10+
shell: bash

.github/workflows/build-boards.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Build boards
33
on:
44
workflow_call:
55
inputs:
6-
platform:
7-
required: true
8-
type: string
96
boards:
107
required: true
118
type: string
@@ -19,7 +16,7 @@ on:
1916
required: false
2017

2118
jobs:
22-
build:
19+
board:
2320
runs-on: ubuntu-22.04
2421
env:
2522
CP_VERSION: ${{ inputs.cp-version }}
@@ -38,6 +35,7 @@ jobs:
3835
with:
3936
python-version: 3.x
4037
- name: Set up port
38+
id: set-up-port
4139
uses: ./.github/actions/deps/ports
4240
with:
4341
board: ${{ matrix.board }}
@@ -47,7 +45,7 @@ jobs:
4745
- name: Set up external
4846
uses: ./.github/actions/deps/external
4947
with:
50-
platform: ${{ inputs.platform }}
48+
port: ${{ steps.set-up-port.outputs.port }}
5149
- name: Set up mpy-cross
5250
if: steps.set-up-submodules.outputs.frozen == 'True'
5351
uses: ./.github/actions/mpy_cross

.github/workflows/build.yml

Lines changed: 30 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,18 @@ on:
99
pull_request:
1010
release:
1111
types: [published]
12-
check_suite:
13-
types: [rerequested]
1412

1513
concurrency:
1614
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1715
cancel-in-progress: true
1816

1917
jobs:
2018
scheduler:
21-
runs-on: ubuntu-20.04
19+
runs-on: ubuntu-22.04
2220
outputs:
23-
build-doc: ${{ steps.set-matrix.outputs.build-doc }}
24-
build-boards: ${{ steps.set-matrix.outputs.build-boards }}
25-
build-windows: ${{ steps.set-matrix.outputs.build-windows }}
26-
boards-aarch: ${{ steps.set-matrix.outputs.boards-aarch }}
27-
boards-arm: ${{ steps.set-matrix.outputs.boards-arm }}
28-
boards-atmel: ${{ steps.set-matrix.outputs.boards-atmel }}
29-
boards-esp: ${{ steps.set-matrix.outputs.boards-esp }}
30-
boards-riscv: ${{ steps.set-matrix.outputs.boards-riscv }}
21+
docs: ${{ steps.set-matrix.outputs.docs }}
22+
ports: ${{ steps.set-matrix.outputs.ports }}
23+
windows: ${{ steps.set-matrix.outputs.windows }}
3124
cp-version: ${{ steps.set-up-submodules.outputs.version }}
3225
steps:
3326
- name: Dump GitHub context
@@ -69,26 +62,27 @@ jobs:
6962
PULL: ${{ github.event.number }}
7063
GITHUB_TOKEN: ${{ github.token }}
7164
EXCLUDE_COMMIT: ${{ github.event.pull_request.head.sha }}
72-
- name: Set head sha
65+
- name: Set head sha (pull)
7366
if: github.event_name == 'pull_request'
7467
run: echo "HEAD_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
75-
- name: Set base sha
68+
- name: Set base sha (pull)
7669
if: github.event_name == 'pull_request'
77-
run: |
78-
git fetch --no-tags --no-recurse-submodules --depth=$((DEPTH + 1)) origin $HEAD_SHA
79-
echo "BASE_SHA=$(git rev-list $HEAD_SHA --skip=$DEPTH --max-count=1)" >> $GITHUB_ENV
70+
run: git cat-file -e $SHA && echo "BASE_SHA=$SHA" >> $GITHUB_ENV || true
8071
env:
81-
DEPTH: ${{ steps.get-last-commit-with-checks.outputs.commit_depth || github.event.pull_request.commits }}
82-
- name: Get changes
83-
id: get-changes
84-
if: github.event_name == 'pull_request'
85-
run: echo $(git diff $BASE_SHA...$HEAD_SHA --name-only) | echo "changed_files=[\"$(sed "s/ /\", \"/g")\"]" >> $GITHUB_OUTPUT
72+
SHA: ${{ steps.get-last-commit-with-checks.outputs.commit_sha || github.event.pull_request.base.sha }}
73+
- name: Set head sha (push)
74+
if: github.event_name == 'push'
75+
run: echo "HEAD_SHA=${{ github.event.after }}" >> $GITHUB_ENV
76+
- name: Set base sha (push)
77+
if: github.event_name == 'push'
78+
run: git cat-file -e $SHA && echo "BASE_SHA=$SHA" >> $GITHUB_ENV || true
79+
env:
80+
SHA: ${{ github.event.before }}
8681
- name: Set matrix
8782
id: set-matrix
88-
working-directory: tools
8983
run: python3 -u ci_set_matrix.py
84+
working-directory: tools
9085
env:
91-
CHANGED_FILES: ${{ steps.get-changes.outputs.changed_files }}
9286
LAST_FAILED_JOBS: ${{ steps.get-last-commit-with-checks.outputs.check_runs }}
9387

9488
tests:
@@ -99,7 +93,7 @@ jobs:
9993

10094
mpy-cross:
10195
needs: scheduler
102-
if: needs.scheduler.outputs.build-boards == 'True'
96+
if: needs.scheduler.outputs.ports != '{}'
10397
uses: ./.github/workflows/build-mpy-cross.yml
10498
secrets: inherit
10599
with:
@@ -108,7 +102,7 @@ jobs:
108102
mpy-cross-mac:
109103
runs-on: macos-11
110104
needs: scheduler
111-
if: needs.scheduler.outputs.build-boards == 'True'
105+
if: needs.scheduler.outputs.ports != '{}'
112106
env:
113107
CP_VERSION: ${{ needs.scheduler.outputs.cp-version }}
114108
steps:
@@ -160,10 +154,10 @@ jobs:
160154
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
161155
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
162156

163-
build-doc:
157+
docs:
164158
runs-on: ubuntu-22.04
165159
needs: scheduler
166-
if: needs.scheduler.outputs.build-doc == 'True'
160+
if: needs.scheduler.outputs.docs == 'True'
167161
env:
168162
CP_VERSION: ${{ needs.scheduler.outputs.cp-version }}
169163
steps:
@@ -218,10 +212,10 @@ jobs:
218212
[ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
219213
[ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*
220214
221-
build-windows:
215+
windows:
222216
runs-on: windows-2022
223217
needs: scheduler
224-
if: needs.scheduler.outputs.build-windows == 'True'
218+
if: needs.scheduler.outputs.windows == 'True'
225219
env:
226220
CP_VERSION: ${{ needs.scheduler.outputs.cp-version }}
227221
defaults:
@@ -286,52 +280,15 @@ jobs:
286280
# ERROR: Platform MINGW64_NT-10.0-17763-x86_64 appears to be unsupported
287281
# https://github.com/espressif/esp-idf/issues/7062
288282

289-
aarch:
290-
needs: [scheduler, mpy-cross, tests]
291-
if: ${{ needs.scheduler.outputs.boards-aarch != '[]' }}
292-
uses: ./.github/workflows/build-boards.yml
293-
secrets: inherit
294-
with:
295-
platform: aarch
296-
boards: ${{ needs.scheduler.outputs.boards-aarch }}
297-
cp-version: ${{ needs.scheduler.outputs.cp-version }}
298-
299-
arm:
300-
needs: [scheduler, mpy-cross, tests]
301-
if: ${{ needs.scheduler.outputs.boards-arm != '[]' }}
302-
uses: ./.github/workflows/build-boards.yml
303-
secrets: inherit
304-
with:
305-
platform: arm
306-
boards: ${{ needs.scheduler.outputs.boards-arm }}
307-
cp-version: ${{ needs.scheduler.outputs.cp-version }}
308-
309-
atmel:
310-
needs: [scheduler, mpy-cross, tests]
311-
if: ${{ needs.scheduler.outputs.boards-atmel != '[]' }}
312-
uses: ./.github/workflows/build-boards.yml
313-
secrets: inherit
314-
with:
315-
platform: arm
316-
boards: ${{ needs.scheduler.outputs.boards-atmel }}
317-
cp-version: ${{ needs.scheduler.outputs.cp-version }}
318-
319-
esp:
320-
needs: [scheduler, mpy-cross, tests]
321-
if: ${{ needs.scheduler.outputs.boards-esp != '[]' }}
322-
uses: ./.github/workflows/build-boards.yml
323-
secrets: inherit
324-
with:
325-
platform: esp
326-
boards: ${{ needs.scheduler.outputs.boards-esp }}
327-
cp-version: ${{ needs.scheduler.outputs.cp-version }}
328-
329-
riscv:
283+
ports:
330284
needs: [scheduler, mpy-cross, tests]
331-
if: ${{ needs.scheduler.outputs.boards-riscv != '[]' }}
285+
if: needs.scheduler.outputs.ports != '{}'
332286
uses: ./.github/workflows/build-boards.yml
333287
secrets: inherit
288+
strategy:
289+
fail-fast: false
290+
matrix:
291+
port: ${{ fromJSON(needs.scheduler.outputs.ports).ports }}
334292
with:
335-
platform: riscv
336-
boards: ${{ needs.scheduler.outputs.boards-riscv }}
293+
boards: ${{ toJSON(fromJSON(needs.scheduler.outputs.ports)[matrix.port]) }}
337294
cp-version: ${{ needs.scheduler.outputs.cp-version }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Update CircuitPython.org
66

77
on:
88
release:
9-
types: [published, rerequested]
9+
types: [published]
1010

1111
jobs:
1212
website:
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,6 @@ run-name: ${{ inputs.board }}-${{ inputs.language }}-${{ inputs.version }}${{ in
3232
jobs:
3333
build:
3434
runs-on: ubuntu-22.04
35-
env:
36-
PLATFORM_atmel-samd: arm
37-
PLATFORM_broadcom: aarch
38-
PLATFORM_cxd56: arm
39-
PLATFORM_espressif: esp
40-
PLATFORM_litex: riscv
41-
PLATFORM_mimxrt10xx: arm
42-
PLATFORM_nrf: arm
43-
PLATFORM_raspberrypi: arm
44-
PLATFORM_stm: arm
4535
steps:
4636
- name: Set up repository
4737
run: |
@@ -70,7 +60,7 @@ jobs:
7060
uses: ./.github/actions/deps/external
7161
with:
7262
action: cache
73-
platform: ${{ env[format('PLATFORM_{0}', steps.set-up-port.outputs.port)] }}
63+
port: ${{ steps.set-up-port.outputs.port }}
7464
- name: Set up mpy-cross
7565
if: steps.set-up-submodules.outputs.frozen == 'True'
7666
uses: ./.github/actions/mpy_cross
File renamed without changes.

0 commit comments

Comments
 (0)