Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 25 additions & 24 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-24.04
name: Linux
cache-key: linux
cmake-args: '-DPIMORONI_PICO_PATH=$GITHUB_WORKSPACE/pimoroni-pico -DPICO_SDK_PATH=$GITHUB_WORKSPACE/pico-sdk -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install'
apt-packages: clang-tidy gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib

runs-on: ${{matrix.os}}

Expand All @@ -31,30 +30,42 @@ jobs:

steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: project

# Checkout the Pimoroni Pico Libraries
- name: Checkout Pimoroni Pico Libraries
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pimoroni/pimoroni-pico
path: pimoroni-pico

# Checkout the Pico SDK
- name: Checkout Pico SDK
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: raspberrypi/pico-sdk
path: pico-sdk
ref: '2.1.1'
submodules: true

# Linux deps
- name: Install deps
if: runner.os == 'Linux'
run: |
sudo apt update && sudo apt install ${{matrix.apt-packages}}
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '13.3.Rel1'

# CMake 4.0 - erroneously introduced into GitHub runners? -
# removed support for <3.5 and mbedtls hits this
# https://github.com/raspberrypi/pico-sdk/issues/2391
# https://github.com/actions/runner-images/issues/11926
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.6'

- name: CMake Version
run: cmake --version

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand All @@ -79,22 +90,12 @@ jobs:

- name: Upload .zip
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
uses: softprops/action-gh-release@v2
with:
asset_path: ${{runner.workspace}}/build/${{env.RELEASE_FILE}}.zip
upload_url: ${{github.event.release.upload_url}}
asset_name: ${{env.RELEASE_FILE}}.zip
asset_content_type: application/zip
files: ${{runner.workspace}}/build/${{env.RELEASE_FILE}}.zip

- name: Upload .tar.gz
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
uses: softprops/action-gh-release@v2
with:
asset_path: ${{runner.workspace}}/build/${{env.RELEASE_FILE}}.tar.gz
upload_url: ${{github.event.release.upload_url}}
asset_name: ${{env.RELEASE_FILE}}.tar.gz
asset_content_type: application/octet-stream
files: ${{runner.workspace}}/build/${{env.RELEASE_FILE}}.tar.gz
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.13...3.27)

# Change your executable name to something creative!
set(NAME pico-boilerplate) # <-- Name your project/executable here!
Expand Down