add build automation #1
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: build-branches | |
on: | |
push: | |
pull_request: | |
types: [synchronize] | |
#cancel running jobs if new build is started | |
concurrency: | |
group: build-feature-branches-${{ github.ref }}-1 | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: self-hosted | |
strategy: | |
# visualize which variants fail and pass to derive upstream dependency status | |
fail-fast: false | |
matrix: | |
configs: [ | |
CPack_Clang_STM32F031K6, | |
CPack_Clang_STM32H7A3ZI, | |
CPack_Clang_STM32H743XI | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure | |
run: | | |
cmake --preset ${{ matrix.configs }} | |
- name: Build | |
run: | | |
mkdir compiler_output -p | |
cmake --build --preset ${{ matrix.configs }} 2>&1 | tee -a compiler_output/${{ matrix.configs }}.txt | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build | |
path: | | |
build/**/*.a | |
retention-days: 5 | |
- name: Filter out warnings that are on dependencies | |
run: | | |
sed -i '/.*\/_deps\/.*\swarning:/d' compiler_output/${{ matrix.configs }}.txt | |
- name: Post PR comment for warnings/errors | |
if: always() | |
uses: JacobDomagala/CompileResult@v0.0.2 | |
with: | |
comment_title: Compiler warnings for ${{ matrix.configs}} | |
compile_result_file: compiler_output/${{ matrix.configs }}.txt |