Skip to content

Raspberry Pi 4B & 5 baremetal blink example #90

Raspberry Pi 4B & 5 baremetal blink example

Raspberry Pi 4B & 5 baremetal blink example #90

Workflow file for this run

name: Build Pico SDK Examples
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
# Build on Mondays at 9am PST every week
- cron: '0 17 * * 1'
jobs:
build-pico-sdk:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
example:
- name: pico-blink-sdk
board: pico
- name: pico-w-blink-sdk
board: pico_w
swift: [swift-DEVELOPMENT-SNAPSHOT-2024-12-04-a]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install apt dependencies
run: sudo apt-get -qq update && sudo apt-get -qq -y install curl ninja-build python3
- name: Install CMake 3.30.2
run: |
ARCH=`uname -m`
curl -sL https://github.com/Kitware/CMake/releases/download/v3.30.2/cmake-3.30.2-linux-$ARCH.tar.gz -O
tar xzf cmake-3.30.2-linux-$ARCH.tar.gz
export PATH="`pwd`/cmake-3.30.2-linux-$ARCH/bin:$PATH"
echo "PATH=$PATH" >> $GITHUB_ENV
cmake --version
- name: Install GNU ARM toolchain
run: |
ARCH=`uname -m`
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
tar xf arm-gnu-toolchain-13.3.rel1-$ARCH-arm-none-eabi.tar.xz
- name: Install ${{ matrix.swift }}
run: |
wget -q https://download.swift.org/development/ubuntu2404/${{ matrix.swift }}/${{ matrix.swift }}-ubuntu24.04.tar.gz
tar xzf ${{ matrix.swift }}-ubuntu24.04.tar.gz
export PATH="`pwd`/${{ matrix.swift }}-ubuntu24.04/usr/bin/:$PATH"
echo "PATH=$PATH" >> $GITHUB_ENV
which swiftc
swiftc --version
- name: Clone Pico SDK
run: |
git clone https://github.com/raspberrypi/pico-sdk.git
cd pico-sdk
git submodule update --init --recursive
cd ..
- name: Set Pico environment variables
run: |
ARCH=`uname -m`
echo "PICO_BOARD=${{ matrix.example.board }}" >> $GITHUB_ENV
echo "PICO_SDK_PATH=`pwd`/pico-sdk" >> $GITHUB_ENV
echo "PICO_TOOLCHAIN_PATH=`pwd`/arm-gnu-toolchain-13.3.rel1-$ARCH-arm-none-eabi" >> $GITHUB_ENV
- name: Build ${{ matrix.example.name }}
run: |
cd ${{ matrix.example.name }}
cmake -B build -G Ninja .
cmake --build build