Skip to content

Merge pull request #642 from danielinux/prepare-release-2.7.0 #26

Merge pull request #642 from danielinux/prepare-release-2.7.0

Merge pull request #642 from danielinux/prepare-release-2.7.0 #26

name: WolfBoot CMake Presets Build
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ "*" ]
permissions:
contents: read
jobs:
ubuntu-cmake:
name: Build on Ubuntu
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
target:
# - sim
# - imx-rt # Disabled, requires NXP SDK
- stm32c0
- stm32f1
- stm32f4
- stm32f7
- stm32g0
- stm32h5
- stm32h7
- stm32l0
- stm32l4
- stm32l5
- stm32u5
- stm32wb
include:
# Optional per-target cache variables you might want to pass later.
# Keep empty for now to avoid guessing addresses.
- target: stm32l4
extra_cache: ""
- target: stm32h7
extra_cache: ""
- target: stm32g0
extra_cache: ""
steps:
- name: Checkout (with submodules)
uses: actions/checkout@v4
with:
submodules: true
# Lock down network/runner
# See https://github.com/step-security/harden-runner/releases
# Currently only supported on Ubuntu
# ARM GCC toolchain (adds the bin dir to PATH)
- name: Set up ARM none-eabi GCC
run: |
sudo apt update
sudo apt install -y gcc-arm-none-eabi
- name: List all environment variables
run: |
# Show environment settings
echo "All environment settings"
env | sort
- name: List Presets
run: |
# Check available presets in CMakePresets.json
cmake -S . -B build-list --list-presets=configure
- name: Configure Preset "${{ matrix.target }}"
run: |
# cmake runs in git bash
cmake --preset "${{ matrix.target }}"
echo "Configured: ${{ matrix.target }}"
- name: Build "${{ matrix.target }}"
run: |
# cmake runs in git bash
# BUILD_DIR="build-${{ matrix.target }}"
cmake --build "build-${{ matrix.target }}" --parallel
# Optional: show interesting artifacts
- name: List build outputs
if: always()
run: |
BUILD_DIR="build-${{ matrix.target }}"
echo "=== Artifacts in $BUILD_DIR ==="
find "$BUILD_DIR" -maxdepth 3 -type f \( -name "*.elf" -o -name "*.bin" -o -name "*.hex" -o -name "bin-assemble" -o -name "keystore" \) -print || true
# Upload binaries if present (non-fatal if none)
- name: Upload firmware/artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: wolfboot-${{ matrix.target }}
path: |
build-${{ matrix.target }}/**/*.elf
build-${{ matrix.target }}/**/*.bin
build-${{ matrix.target }}/**/*.hex
if-no-files-found: warn