Skip to content

Commit 559f476

Browse files
authored
Merge branch 'main' into RPi-4B-BCM2711
2 parents ecf9076 + 5aa3f03 commit 559f476

File tree

252 files changed

+137985
-17772
lines changed

Some content is hidden

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

252 files changed

+137985
-17772
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Install Swift
2+
description: Installs the Swift specified by a .swift-version file
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Install `apt` Dependencies
8+
shell: bash
9+
run: |
10+
SUDO=$(if [[ $EUID -ne 0 ]]; then echo sudo; fi)
11+
$SUDO apt-get -qq update
12+
$SUDO apt-get -qq -y install curl gpg
13+
env:
14+
DEBIAN_FRONTEND: noninteractive
15+
16+
- name: Install Swiftly
17+
shell: bash
18+
run: |
19+
export SWIFTLY_HOME_DIR="$HOME/.local/share/swiftly"
20+
echo "SWIFTLY_HOME_DIR=$SWIFTLY_HOME_DIR" >> $GITHUB_ENV
21+
echo "SWIFTLY_HOME_DIR=$SWIFTLY_HOME_DIR" >> $HOME/.bashrc
22+
23+
export SWIFTLY_BIN_DIR="$HOME/.local/share/swiftly/bin"
24+
echo "SWIFTLY_BIN_DIR=$SWIFTLY_BIN_DIR" >> $GITHUB_ENV
25+
echo "SWIFTLY_BIN_DIR=$SWIFTLY_BIN_DIR" >> $HOME/.bashrc
26+
27+
UNAME=$(uname -m)
28+
curl -O "https://download.swift.org/swiftly/linux/swiftly-$UNAME.tar.gz"
29+
tar zxf "swiftly-$UNAME.tar.gz"
30+
./swiftly init \
31+
--skip-install \
32+
--assume-yes \
33+
--quiet-shell-followup \
34+
--no-modify-profile
35+
36+
echo "PATH=$SWIFTLY_BIN_DIR:$PATH" >> $GITHUB_ENV
37+
echo "PATH=\$SWIFTLY_BIN_DIR:\$PATH" >> $HOME/.bashrc
38+
39+
- name: Install Swift
40+
shell: bash
41+
run: |
42+
swiftly install --post-install-file ./out.sh
43+
swift --version

.github/workflows/build-esp.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
name: Build ESP Examples
1+
name: ESP
22

33
on:
44
push:
55
branches: ["main"]
66
pull_request:
7-
branches: ["main"]
8-
schedule:
9-
# Build on Mondays at 9am PST every week
10-
- cron: '0 17 * * 1'
7+
types: [opened, reopened, synchronize, ready_for_review]
118

129
jobs:
13-
build-esp:
10+
build:
11+
name: Build
1412
runs-on: ubuntu-24.04
1513
container: espressif/idf:latest
14+
1615
strategy:
1716
fail-fast: false
1817
matrix:
1918
example: [esp32-led-blink-sdk, esp32-led-strip-sdk]
20-
swift: [swift-DEVELOPMENT-SNAPSHOT-2024-12-04-a]
2119

2220
steps:
2321
- name: Checkout repo
@@ -26,13 +24,8 @@ jobs:
2624
- name: Install apt dependencies
2725
run: apt-get -qq update && apt-get -qq -y install pkg-config
2826

29-
- name: Install ${{ matrix.swift }}
30-
run: |
31-
wget -q https://download.swift.org/development/ubuntu2404/${{ matrix.swift }}/${{ matrix.swift }}-ubuntu24.04.tar.gz
32-
tar xzf ${{ matrix.swift }}-ubuntu24.04.tar.gz
33-
export PATH="`pwd`/${{ matrix.swift }}-ubuntu24.04/usr/bin/:$PATH"
34-
echo "PATH=$PATH" >> $GITHUB_ENV
35-
swiftc --version
27+
- name: Install Swift
28+
uses: ./.github/actions/install-swift
3629

3730
- name: Build ${{ matrix.example }}
3831
run: |

.github/workflows/build-nuttx.yml

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1-
name: Build NuttX Examples
1+
name: NuttX
22

33
on:
44
push:
55
branches: ["main"]
66
pull_request:
7-
branches: ["main"]
8-
schedule:
9-
# Build on Mondays at 9am PST every week
10-
- cron: '0 17 * * 1'
7+
types: [opened, reopened, synchronize, ready_for_review]
118

129
jobs:
13-
build-nuttx:
10+
build:
11+
name: Build
1412
runs-on: ubuntu-24.04
1513

1614
strategy:
1715
fail-fast: false
1816
matrix:
1917
example: [nuttx-riscv-blink]
20-
swift: [swift-DEVELOPMENT-SNAPSHOT-2024-12-22-a]
2118

2219
steps:
2320
- name: Checkout repo
@@ -50,18 +47,11 @@ jobs:
5047
echo "PATH=$PATH" >> $GITHUB_ENV
5148
riscv-none-elf-gcc --version
5249
53-
- name: Install ${{ matrix.swift }}
54-
run: |
55-
wget -q https://download.swift.org/development/ubuntu2404/${{ matrix.swift }}/${{ matrix.swift }}-ubuntu24.04.tar.gz
56-
tar xzf ${{ matrix.swift }}-ubuntu24.04.tar.gz
57-
export PATH="`pwd`/${{ matrix.swift }}-ubuntu24.04/usr/bin/:$PATH"
58-
echo "PATH=$PATH" >> $GITHUB_ENV
59-
swiftc --version
60-
61-
- name: Config ${{ matrix.example }}
62-
working-directory: ${{ matrix.example }}
63-
run: cmake -B build -GNinja -DBOARD_CONFIG=rv-virt:leds_swift -DENABLE_NUTTX_TRACE=ON
50+
- name: Install Swift
51+
uses: ./.github/actions/install-swift
6452

6553
- name: Build ${{ matrix.example }}
6654
working-directory: ${{ matrix.example }}
67-
run: cmake --build build
55+
run: |
56+
cmake -B build -GNinja -DBOARD_CONFIG=rv-virt:leds_swift -DENABLE_NUTTX_TRACE=ON
57+
cmake --build build
Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
name: Build Pico SDK Examples
1+
name: Raspberry Pi Pico SDK
22

33
on:
44
push:
55
branches: ["main"]
66
pull_request:
7-
branches: ["main"]
8-
schedule:
9-
# Build on Mondays at 9am PST every week
10-
- cron: '0 17 * * 1'
7+
types: [opened, reopened, synchronize, ready_for_review]
118

129
jobs:
13-
build-pico-sdk:
10+
build:
11+
name: Build
1412
runs-on: ubuntu-24.04
13+
1514
strategy:
1615
fail-fast: false
1716
matrix:
1817
example:
19-
- name: pico-blink-sdk
18+
- name: rpi-pico-blink-sdk
2019
board: pico
21-
- name: pico-w-blink-sdk
20+
- name: rpi-picow-blink-sdk
21+
board: pico_w
22+
- name: harmony
2223
board: pico_w
23-
swift: [swift-DEVELOPMENT-SNAPSHOT-2024-12-04-a]
2424

2525
steps:
2626
- name: Checkout repo
@@ -41,17 +41,11 @@ jobs:
4141
- name: Install GNU ARM toolchain
4242
run: |
4343
ARCH=`uname -m`
44-
curl -sL https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-$ARCH-arm-none-eabi.tar.xz -O
45-
tar xf arm-gnu-toolchain-13.3.rel1-$ARCH-arm-none-eabi.tar.xz
44+
curl -sL https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-$ARCH-arm-none-eabi.tar.xz -O
45+
tar xf arm-gnu-toolchain-14.2.rel1-$ARCH-arm-none-eabi.tar.xz
4646
47-
- name: Install ${{ matrix.swift }}
48-
run: |
49-
wget -q https://download.swift.org/development/ubuntu2404/${{ matrix.swift }}/${{ matrix.swift }}-ubuntu24.04.tar.gz
50-
tar xzf ${{ matrix.swift }}-ubuntu24.04.tar.gz
51-
export PATH="`pwd`/${{ matrix.swift }}-ubuntu24.04/usr/bin/:$PATH"
52-
echo "PATH=$PATH" >> $GITHUB_ENV
53-
which swiftc
54-
swiftc --version
47+
- name: Install Swift
48+
uses: ./.github/actions/install-swift
5549

5650
- name: Clone Pico SDK
5751
run: |
@@ -60,15 +54,23 @@ jobs:
6054
git submodule update --init --recursive
6155
cd ..
6256
57+
- name: Clone Pico Extras
58+
run: |
59+
git clone https://github.com/raspberrypi/pico-extras.git
60+
cd pico-extras
61+
git submodule update --init --recursive
62+
cd ..
63+
6364
- name: Set Pico environment variables
6465
run: |
6566
ARCH=`uname -m`
6667
echo "PICO_BOARD=${{ matrix.example.board }}" >> $GITHUB_ENV
6768
echo "PICO_SDK_PATH=`pwd`/pico-sdk" >> $GITHUB_ENV
68-
echo "PICO_TOOLCHAIN_PATH=`pwd`/arm-gnu-toolchain-13.3.rel1-$ARCH-arm-none-eabi" >> $GITHUB_ENV
69+
echo "PICO_EXTRAS_PATH=`pwd`/pico-extras" >> $GITHUB_ENV
70+
echo "PICO_TOOLCHAIN_PATH=`pwd`/arm-gnu-toolchain-14.2.rel1-$ARCH-arm-none-eabi" >> $GITHUB_ENV
6971
7072
- name: Build ${{ matrix.example.name }}
73+
working-directory: ${{ matrix.example.name }}
7174
run: |
72-
cd ${{ matrix.example.name }}
7375
cmake -B build -G Ninja .
7476
cmake --build build

.github/workflows/build-stm.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: STM32
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
types: [opened, reopened, synchronize, ready_for_review]
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-24.04
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
example: [stm32-blink]
18+
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: 3.11
27+
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v5
30+
31+
- name: Install Swift
32+
uses: ./.github/actions/install-swift
33+
34+
- name: Build ${{ matrix.example }}
35+
working-directory: ${{ matrix.example }}
36+
run: |
37+
export STM_BOARD=STM32F746G_DISCOVERY
38+
./build-elf.sh

.github/workflows/build-zephyr.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1-
name: Build Zephyr Examples
1+
name: Zephyr
22

33
on:
44
push:
55
branches: ["main"]
66
pull_request:
7-
branches: ["main"]
8-
schedule:
9-
# Build on Mondays at 9am PST every week
10-
- cron: '0 17 * * 1'
7+
types: [opened, reopened, synchronize, ready_for_review]
118

129
jobs:
13-
build-zephyr:
10+
build:
11+
name: Build
1412
runs-on: ubuntu-24.04
1513

1614
strategy:
1715
fail-fast: false
1816
matrix:
1917
example: [nrfx-blink-sdk]
20-
swift: [swift-DEVELOPMENT-SNAPSHOT-2024-12-04-a]
2118

2219
steps:
2320
- name: Checkout repo
@@ -34,13 +31,8 @@ jobs:
3431
app-path: ${{ matrix.example }}
3532
toolchains: arm-zephyr-eabi
3633

37-
- name: Install ${{ matrix.swift }}
38-
run: |
39-
wget -q https://download.swift.org/development/ubuntu2404/${{ matrix.swift }}/${{ matrix.swift }}-ubuntu24.04.tar.gz
40-
tar xzf ${{ matrix.swift }}-ubuntu24.04.tar.gz
41-
export PATH="`pwd`/${{ matrix.swift }}-ubuntu24.04/usr/bin/:$PATH"
42-
echo "PATH=$PATH" >> $GITHUB_ENV
43-
swiftc --version
34+
- name: Install Swift
35+
uses: ./.github/actions/install-swift
4436

4537
- name: Build ${{ matrix.example }}
4638
working-directory: ${{ matrix.example }}

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: ["main"]
66
pull_request:
7-
branches: ["main"]
7+
types: [opened, reopened, synchronize, ready_for_review]
88

99
jobs:
1010
validate_format_config:

0 commit comments

Comments
 (0)