Skip to content

Commit

Permalink
use custom action for arm toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
jefflongo committed Jul 20, 2024
1 parent 9d0c87b commit 13dc640
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 31 deletions.
30 changes: 13 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,40 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
pip install cmake-format
run: sudo apt install -y cmake-format

- name: Lint
run: |
find . \( -name CMakeLists.txt -o -name *.cmake \) -exec cmake-format --check {} +
run: find . \( -name CMakeLists.txt -o -name *.cmake \) -exec cmake-format --check {} +

compile:
name: Compile
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
mkdir -p .deps
pip install cmake
wget -q https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz -P .deps
tar -xf .deps/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz -C .deps
echo "$(pwd)/.deps/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin" >> $GITHUB_PATH
- name: Install ARM toolchain
uses: carlosperate/arm-none-eabi-gcc-action@v1

- name: Install CMake
run: sudo apt install -y cmake

- name: Checkout STM32CubeL4
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: STMicroelectronics/STM32CubeL4
submodules: true
path: ./STM32CubeL4

- name: Compile LL
- name: Compile blinky-ll
run: cmake -S examples/blinky-ll --preset debug -DSTM32CUBEL4_PATH=$(pwd)/STM32CubeL4 && cmake --build examples/blinky-ll/build

- name: Compile HAL
- name: Compile blinky-hal
run: cmake -S examples/blinky-hal --preset debug -DSTM32CUBEL4_PATH=$(pwd)/STM32CubeL4 && cmake --build examples/blinky-ll/build

- name: Compile Multiboard
- name: Compile blinky-multiboard
run: cmake -S examples/blinky-multiboard --preset debug -DSTM32CUBEL4_PATH=$(pwd)/STM32CubeL4 && cmake --build examples/blinky-ll/build

18 changes: 4 additions & 14 deletions examples/blinky-multiboard/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,13 @@
"STM32CUBEL4_PATH": "${sourceDir}/STM32CubeL4",
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_EXPORT_COMPILE_COMMANDS": "1"
},
"condition": {
"type": "notEquals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "debug-windows",
"inherits": "debug",
"displayName": "Debug",
"description": "Debug build preset",
"displayName": "Debug (Windows)",
"description": "Windows debug build preset",
"generator": "MinGW Makefiles",
"condition": {
"type": "equals",
Expand All @@ -43,18 +38,13 @@
"description": "Release build preset",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
},
"condition": {
"type": "notEquals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "release-windows",
"inherits": "debug-windows",
"displayName": "Release",
"description": "Release build preset",
"displayName": "Release (Windows)",
"description": "Windows release build preset",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
Expand Down

0 comments on commit 13dc640

Please sign in to comment.