Skip to content

Updated: CMakeLists to include support for compiling binaries with co… #18

Updated: CMakeLists to include support for compiling binaries with co…

Updated: CMakeLists to include support for compiling binaries with co… #18

name: Publish firmware binaries to release
on:
push:
tags:
- '*'
env:
BUILD_TYPE: Release
jobs:
build-and-prepare-binaries:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install GCC ARM toolchain
run: sudo apt-get update && sudo apt-get install -y gcc-arm-none-eabi
- name: Install Ninja Build Generator
run: sudo apt-get install -y ninja-build
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build firmware binaries
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Run tests
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{github.workspace}}/build/*.{elf,hex,bin}
tag: ${{ github.ref }}
overwrite: true
file_glob: true