Skip to content

Commit eca9393

Browse files
authored
Merge branch 'adafruit:main' into main
2 parents 3feaf6a + bca7d6e commit eca9393

File tree

223 files changed

+8283
-1724
lines changed

Some content is hidden

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

223 files changed

+8283
-1724
lines changed

.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: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Fetch port deps
2+
3+
inputs:
4+
board:
5+
required: true
6+
type: string
7+
8+
outputs:
9+
port:
10+
value: ${{ steps.board-to-port.outputs.port }}
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Board to port
16+
id: board-to-port
17+
run: |
18+
PORT=$(find ports/*/boards/ -type d -name ${{ inputs.board }} | sed 's/^ports\///g;s/\/boards.*//g')
19+
if [ -z $PORT ]; then (exit 1); else echo >> $GITHUB_OUTPUT "port=$PORT"; fi
20+
shell: bash
21+
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
27+
if: steps.board-to-port.outputs.port == 'espressif'
28+
uses: ./.github/actions/deps/ports/espressif
29+
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
35+
if: steps.board-to-port.outputs.port == 'nrf'
36+
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
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Fetch nrf port deps
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Get nrfutil 7+
7+
run: |
8+
wget https://developer.nordicsemi.com/.pc-tools/nrfutil/x64-linux/nrfutil
9+
chmod +x nrfutil
10+
./nrfutil install nrf5sdk-tools
11+
mkdir -p $HOME/.local/bin
12+
mv nrfutil $HOME/.local/bin
13+
echo "$HOME/.local/bin" >> $GITHUB_PATH
14+
shell: bash
15+
- name: Print nrfutil version
16+
run: nrfutil -V
17+
shell: bash

.github/workflows/build-boards.yml

Lines changed: 6 additions & 7 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,15 +35,17 @@ jobs:
3835
with:
3936
python-version: 3.x
4037
- name: Set up port
41-
if: inputs.platform == 'esp'
42-
uses: ./.github/actions/deps/ports/espressif
38+
id: set-up-port
39+
uses: ./.github/actions/deps/ports
40+
with:
41+
board: ${{ matrix.board }}
4342
- name: Set up submodules
4443
id: set-up-submodules
4544
uses: ./.github/actions/deps/submodules
4645
- name: Set up external
4746
uses: ./.github/actions/deps/external
4847
with:
49-
platform: ${{ inputs.platform }}
48+
port: ${{ steps.set-up-port.outputs.port }}
5049
- name: Set up mpy-cross
5150
if: steps.set-up-submodules.outputs.frozen == 'True'
5251
uses: ./.github/actions/mpy_cross

0 commit comments

Comments
 (0)