ci: cross-platform matrix (Linux+macOS+Windows) + reports-on-Linux split
This commit is contained in:
@@ -7,35 +7,65 @@ on:
|
|||||||
branches: [main, develop]
|
branches: [main, develop]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
# Build + Tests laufen auf allen 3 OS, um Portabilitaet zu zeigen.
|
||||||
runs-on: ubuntu-latest
|
build-test:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install dependencies (Linux)
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y --no-install-recommends \
|
sudo apt-get install -y --no-install-recommends \
|
||||||
build-essential gcc make \
|
build-essential gcc make cppcheck lcov \
|
||||||
cppcheck \
|
python3 python3-pip ca-certificates
|
||||||
lcov \
|
|
||||||
python3 python3-pip \
|
- name: Verify toolchain
|
||||||
git ca-certificates
|
shell: bash
|
||||||
|
run: |
|
||||||
|
which gcc && gcc --version | head -1
|
||||||
|
which make && make --version | head -1
|
||||||
|
which cppcheck && cppcheck --version | head -1
|
||||||
|
|
||||||
- name: Static Analysis (Cppcheck)
|
- name: Static Analysis (Cppcheck)
|
||||||
|
shell: bash
|
||||||
run: make static
|
run: make static
|
||||||
|
|
||||||
- name: MISRA Check
|
- name: MISRA Check
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
make misra || echo "MISRA findings present (Demo macht den Check non-failing)"
|
make misra || echo "MISRA findings present (Demo non-failing)"
|
||||||
|
|
||||||
- name: Build + Unit Tests
|
- name: Build + Unit Tests
|
||||||
|
shell: bash
|
||||||
run: make test
|
run: make test
|
||||||
|
|
||||||
- name: Coverage Report
|
# Coverage, Traceability, PlantUML laufen nur auf Linux (lcov-Tooling, Artifact-Upload).
|
||||||
run: make coverage
|
reports:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-test
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends \
|
||||||
|
build-essential gcc make cppcheck lcov \
|
||||||
|
python3 python3-pip ca-certificates
|
||||||
|
|
||||||
|
- name: Build + Tests + Coverage
|
||||||
|
run: |
|
||||||
|
make test
|
||||||
|
make coverage
|
||||||
|
|
||||||
- name: Traceability Check
|
- name: Traceability Check
|
||||||
run: python3 tools/traceability.py check
|
run: python3 tools/traceability.py check
|
||||||
@@ -66,10 +96,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: architecture-diagrams
|
name: architecture-diagrams
|
||||||
path: docs/diagrams/
|
path: docs/diagrams/
|
||||||
|
|
||||||
- name: Upload Test Results
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
name: test-output
|
|
||||||
path: build/
|
|
||||||
|
|||||||
Reference in New Issue
Block a user