Merge pull request #4 from abduazimov-workspace/dev #20
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: CMake | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "master", "dev" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
cmake_presets: | |
- "SCan-Sigma" | |
- "SCan-2CAN" | |
- "SCan-CSat" | |
- "SCan-2CAN30" | |
- "SCan-2CAN2LIN" | |
- "SCanBoot-Sigma" | |
- "SCanBoot-CSat" | |
- "SCanBoot-2CAN2LIN" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install latest gcc-arm-none-eabi | |
uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
- name: Install python converter dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install intelhex | |
- name: Run CMake | |
uses: lukka/run-cmake@v10 | |
with: | |
# This is the default path to the CMakeLists.txt along side the | |
# CMakePresets.json. Change if you need have CMakeLists.txt and CMakePresets.json | |
# located elsewhere. | |
# cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | |
# This is the name of the CMakePresets.json's configuration to use to generate | |
# the project files. This configuration leverages the vcpkg.cmake toolchain file to | |
# run vcpkg and install all dependencies specified in vcpkg.json. | |
configurePreset: ${{ matrix.cmake_presets }} | |
# This is the name of the CMakePresets.json's configuration to build the project. | |
buildPreset: ${{ matrix.cmake_presets }} | |
- name: Upload generated binaries | |
uses: actions/upload-artifact@v3 | |
with: | |
name: binaries | |
path: | | |
build/${{ matrix.cmake_presets }}.dfu | |
build/${{ matrix.cmake_presets }}.hex | |
if-no-files-found: ignore | |