From c4f0dec606b4248f03bddf90cfe6a802ab8add20 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Thu, 27 Mar 2025 15:50:09 +0100 Subject: [PATCH] Added cmake build test to github actions --- .github/workflows/test-build-cmake.yml | 30 ++++++++++++++++++++++++++ CMakeLists.txt | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-build-cmake.yml diff --git a/.github/workflows/test-build-cmake.yml b/.github/workflows/test-build-cmake.yml new file mode 100644 index 00000000..673e6255 --- /dev/null +++ b/.github/workflows/test-build-cmake.yml @@ -0,0 +1,30 @@ +name: Wolfboot CMake Build Workflow + +on: + push: + branches: [ 'master', 'main', 'release/**' ] + pull_request: + branches: [ '*' ] + +jobs: + build-cmake: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Install cross compilers + run: | + sudo sed -i 's|http://azure.archive.ubuntu.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/sources.list + sudo apt-get update + sudo apt-get install -y gcc-arm-none-eabi gcc-powerpc-linux-gnu cmake + + - name: Run CMake + run: | + rm -rf ./build + cmake -B build -DWOLFBOOT_TARGET=stm32u5 -DBUILD_TEST_APPS=yes -DWOLFBOOT_PARTITION_BOOT_ADDRESS=0x08100000 -DWOLFBOOT_SECTOR_SIZE=0x2000 -DWOLFBOOT_PARTITION_SIZE=0x20000 -DWOLFBOOT_PARTITION_UPDATE_ADDRESS=0x817F000 -DWOLFBOOT_PARTITION_SWAP_ADDRESS=0x81FE000 -DNO_MPU=yes + + - name: Build wolfBoot + run: make -C build diff --git a/CMakeLists.txt b/CMakeLists.txt index 0069e7c7..ac48a37c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,7 @@ if(NOT DEFINED WOLFBOOT_SECTOR_SIZE) endif() if(NOT DEFINED ARM_TARGETS) - list(APPEND ARM_TARGETS stm32h7 stm32l0 stm32f4 stm32u5) + list(APPEND ARM_TARGETS cypsoc6 imx kinetis lpc54606j512 mcxa mcxw nrf52 nrf52840 nrf5340 nrf5340_net rp2350 sama5d3 same51 stm32c0 stm32f1 stm32f4 stm32f7 stm32g0 stm32h5 stm32h7 stm32l0 stm32l5 stm32u5 stm32wb ti zynqmp) set(ARM_TARGETS "${ARM_TARGETS}" CACHE INTERNAL "")