ci: cross-platform matrix (Linux+macOS+Windows) + reports-on-Linux split
This commit is contained in:
@@ -7,35 +7,65 @@ on:
|
||||
branches: [main, develop]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
# Build + Tests laufen auf allen 3 OS, um Portabilitaet zu zeigen.
|
||||
build-test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install build dependencies
|
||||
- name: Install dependencies (Linux)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
build-essential gcc make \
|
||||
cppcheck \
|
||||
lcov \
|
||||
python3 python3-pip \
|
||||
git ca-certificates
|
||||
build-essential gcc make cppcheck lcov \
|
||||
python3 python3-pip ca-certificates
|
||||
|
||||
- name: Verify toolchain
|
||||
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)
|
||||
shell: bash
|
||||
run: make static
|
||||
|
||||
- name: MISRA Check
|
||||
shell: bash
|
||||
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
|
||||
shell: bash
|
||||
run: make test
|
||||
|
||||
- name: Coverage Report
|
||||
run: make coverage
|
||||
# Coverage, Traceability, PlantUML laufen nur auf Linux (lcov-Tooling, Artifact-Upload).
|
||||
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
|
||||
run: python3 tools/traceability.py check
|
||||
@@ -66,10 +96,3 @@ jobs:
|
||||
with:
|
||||
name: architecture-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