Merge pull request #6 from jefflongo/actions-refactor #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: sudo apt install -y cmake-format | |
- name: Lint | |
run: find . \( -name CMakeLists.txt -o -name *.cmake \) -exec cmake-format --check {} + | |
compile: | |
name: Compile | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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@v4 | |
with: | |
repository: STMicroelectronics/STM32CubeL4 | |
submodules: true | |
path: ./STM32CubeL4 | |
- name: Compile blinky-ll | |
run: cmake -S examples/blinky-ll --preset debug -DSTM32CUBEL4_PATH=$(pwd)/STM32CubeL4 && cmake --build examples/blinky-ll/build | |
- name: Compile blinky-hal | |
run: cmake -S examples/blinky-hal --preset debug -DSTM32CUBEL4_PATH=$(pwd)/STM32CubeL4 && cmake --build examples/blinky-ll/build | |
- name: Compile blinky-multiboard | |
run: cmake -S examples/blinky-multiboard --preset debug -DSTM32CUBEL4_PATH=$(pwd)/STM32CubeL4 && cmake --build examples/blinky-ll/build | |