CI Pipeline #3
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: CI Pipeline | |
on: | |
workflow_dispatch: | |
# push: | |
jobs: | |
build_unit_tets: | |
name: Build Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Get Ninja | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Build | |
working-directory: test/modbus | |
run: | | |
mkdir out | |
cmake -Bout -GNinja | |
cmake --build out | |
build_STM32G070RB_modbus_master: | |
name: Build STM32G070RB ModBus Master | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc) | |
uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
- name: Get Ninja | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Build | |
working-directory: examples/STM32G070RB_MODBUS_MASTER | |
run: | | |
mkdir out | |
cmake -Bout -GNinja -DCMAKE_BUILD_TYPE=Debug | |
cmake --build out | |
build_STM32G070RB_modbus_slave: | |
name: Build STM32G070RB ModBus Slave | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc) | |
uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
- name: Get Ninja | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Build | |
working-directory: examples/STM32G070RB_MODBUS_SLAVE | |
run: | | |
mkdir out | |
cmake -Bout -GNinja -DCMAKE_BUILD_TYPE=Debug | |
cmake --build out | |
run_clang-format_check: | |
name: Run Clang-format Check | |
runs-on: ubuntu-latest | |
needs: [build_unit_tets,build_STM32G070RB_modbus_master, build_STM32G070RB_modbus_slave] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
run_unit_tests: | |
name: Run Unit Tests | |
runs-on: ubuntu-latest | |
needs: [build_unit_tets,build_STM32G070RB_modbus_master, build_STM32G070RB_modbus_slave] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
run_code_coverage_check: | |
name: Run Code Coverage Check | |
runs-on: ubuntu-latest | |
needs: [build_unit_tets,build_STM32G070RB_modbus_master, build_STM32G070RB_modbus_slave] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Run Unit Tests | |
continue-on-error: true | |
run: arm-none-eabi-gcc --version # This step will fail | |
- name: Check Code Coverage | |
run: echo "test" # This step will not fail | |
run_cppcheck: | |
name: Run CppCheck | |
runs-on: ubuntu-latest | |
needs: [build_unit_tets,build_STM32G070RB_modbus_master, build_STM32G070RB_modbus_slave] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
run_code_complexity_check: | |
name: Run Code Complexity Check | |
runs-on: ubuntu-latest | |
needs: [build_unit_tets,build_STM32G070RB_modbus_master, build_STM32G070RB_modbus_slave] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
generate_code_coverage_report: | |
name: Generate Code Coverage Report | |
runs-on: ubuntu-latest | |
needs: | |
- run_clang-format_check | |
- run_unit_tests | |
- run_code_coverage_check | |
- run_cppcheck | |
- run_code_complexity_check | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
generate_code_complexity_report: | |
name: Generate Code Complexity Report | |
runs-on: ubuntu-latest | |
needs: | |
- run_clang-format_check | |
- run_unit_tests | |
- run_code_coverage_check | |
- run_cppcheck | |
- run_code_complexity_check | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 |