Repository navigation
Merge pull request #151 from masarray/hardening/smv-p3a1-studio-binar… #1692
This file contains hidden or 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: BRCB Hard Profile CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| brcb-hard-profile: | |
| name: BRCB Hard / ${{ matrix.compiler }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [gcc, clang] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Select compiler | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.compiler }}" = "clang" ]; then | |
| echo "CC=clang" >> "$GITHUB_ENV" | |
| echo "CXX=clang++" >> "$GITHUB_ENV" | |
| else | |
| echo "CC=gcc" >> "$GITHUB_ENV" | |
| echo "CXX=g++" >> "$GITHUB_ENV" | |
| fi | |
| - name: Configure BRCB hard profile | |
| run: cmake -S embedded/brcb_hard_profile -B build-brcb-hard | |
| - name: Build BRCB hard profile | |
| run: cmake --build build-brcb-hard --parallel | |
| - name: Run BRCB smokes | |
| run: >- | |
| ctest --test-dir build-brcb-hard | |
| --output-on-failure | |
| --output-junit brcb-ctest.xml | |
| - name: Prove exception runtime is absent | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| for binary in \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_smoke \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_control_smoke \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_objects_smoke \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_lifecycle_smoke \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_connection_smoke \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_recovery_v2_smoke \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_persistence_smoke; do | |
| if nm -C "$binary" | grep -E '__cxa_throw|__cxa_begin_catch|__cxa_end_catch|__gxx_personality_v0'; then | |
| echo "exception runtime symbol found in $binary" >&2 | |
| exit 1 | |
| fi | |
| done | |
| echo 'NO_EXCEPTION_RUNTIME=PASS' | |
| - name: Report footprint | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| { | |
| echo "compiler=${{ matrix.compiler }}" | |
| size \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_smoke \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_control_smoke \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_objects_smoke \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_lifecycle_smoke \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_connection_smoke \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_recovery_v2_smoke \ | |
| build-brcb-hard/ariec61850_hard_mms_brcb_persistence_smoke | |
| } | tee build-brcb-hard/brcb-footprint.txt | |
| - name: Upload BRCB evidence | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: brcb-hard-${{ matrix.compiler }}-${{ github.event.pull_request.head.sha || github.sha }} | |
| if-no-files-found: error | |
| retention-days: 14 | |
| path: | | |
| build-brcb-hard/brcb-ctest.xml | |
| build-brcb-hard/brcb-footprint.txt |