feat(hardware-test): implement first automated hw test #407
Workflow file for this run
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: "PR-Tests" | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- 'main' | |
jobs: | |
lint-commits: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Lint Commits | |
uses: wagoid/commitlint-github-action@v6 | |
with: | |
failOnWarnings: true | |
failOnErrors: true | |
clang-format: | |
name: Check Code Formatting | |
needs: | |
- lint-commits | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
path: | |
- 'src' | |
- 'test' | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Run clang-format style check for C/C++/Protobuf programs. | |
uses: jidicula/[email protected] | |
with: | |
clang-format-version: '17' | |
check-path: ${{ matrix.path }} | |
fallback-style: 'LLVM' | |
unit-tests: | |
runs-on: ubuntu-latest | |
needs: | |
- clang-format | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
submodules: 'true' | |
- name: Install Environment | |
run: | | |
sudo apt update | |
sudo apt install -y ninja-build | |
- name: Setup CMake | |
run: | | |
cmake -B build/host -D UNIT_TEST:BOOL=ON -D CMAKE_BUILD_TYPE=DEBUG -D ELASTIC_AI_TARGET=HOST -G Ninja . | |
- name: Build Targets | |
run: | | |
cmake --build build/host -j 4 | |
- name: Run Unit-Tests | |
run: ctest --test-dir build/host/test/unit --output-on-failure | |
build_all_targets: | |
runs-on: ubuntu-latest | |
needs: | |
- unit-tests | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setup Environment | |
run: | | |
sudo apt update && sudo apt install -y ninja-build gcc-arm-none-eabi graphviz | |
- name: Setup CMake | |
run: | | |
cmake -B build -D CMAKE_BUILD_TYPE=RELEASE -D ELASTIC_AI_TARGET=ENV5_REV2 -G Ninja . | |
- name: Build Targets | |
run: | | |
cmake --build build |