Initial prototype of test refactor #688
Workflow file for this run
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: Code Coverage | |
| on: | |
| push: | |
| branches: [ 'master', 'main', 'release/**' ] | |
| pull_request: | |
| branches: [ '*' ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: base | |
| flags: "" | |
| - name: dma | |
| flags: "DMA=1" | |
| - name: threadsafe | |
| flags: "THREADSAFE=1" | |
| - name: she | |
| flags: "SHE=1" | |
| - name: auth | |
| flags: "AUTH=1" | |
| - name: nocrypto | |
| flags: "NOCRYPTO=1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install gcovr | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcovr | |
| - name: Checkout wolfssl | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: wolfssl/wolfssl | |
| path: wolfssl | |
| - name: Build, run, and emit tracefile (${{ matrix.name }}) | |
| run: | | |
| cd test && make coverage-json \ | |
| OUT=$GITHUB_WORKSPACE/cov-json/legacy-${{ matrix.name }}.json \ | |
| WOLFSSL_DIR=../wolfssl ${{ matrix.flags }} | |
| - name: Upload tracefile | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: legacy-tracefile-${{ matrix.name }} | |
| path: cov-json/legacy-${{ matrix.name }}.json | |
| retention-days: 7 | |
| merge: | |
| needs: coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install gcovr | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcovr | |
| - name: Download legacy tracefiles | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: legacy-tracefile-* | |
| path: cov-json | |
| merge-multiple: true | |
| - name: Merge tracefiles into HTML report | |
| run: | | |
| mkdir -p coverage-merged | |
| gcovr \ | |
| $(for f in cov-json/legacy-*.json; do echo --add-tracefile $f; done) \ | |
| --html-details coverage-merged/index.html \ | |
| --print-summary | |
| - name: Upload merged coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage-merged/ | |
| retention-days: 30 |