ci: codecov: fix platform names for hwmv2

Replace / with _ in platform names when generating files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2024-03-05 08:09:56 -05:00
parent 16a6063083
commit 5e7286fac5

View file

@ -21,6 +21,15 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
platform: ["mps2/an385", "native_sim", "qemu_x86", "unit_testing"] platform: ["mps2/an385", "native_sim", "qemu_x86", "unit_testing"]
include:
- platform: 'mps2/an385'
normalized: 'mps2_an385'
- platform: 'native_sim'
normalized: 'native_sim'
- platform: 'qemu_x86'
normalized: 'qemu_x86'
- platform: 'unit_testing'
normalized: 'unit_testing'
steps: steps:
- name: Apply container owner mismatch workaround - name: Apply container owner mismatch workaround
run: | run: |
@ -90,7 +99,8 @@ jobs:
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
mkdir -p coverage/reports mkdir -p coverage/reports
pip3 install gcovr==6.0 pip3 install gcovr==6.0
./scripts/twister -E ${{ matrix.platform }}-testplan.json ./scripts/twister -E ${{matrix.normalized}}-testplan.json
ls -la
./scripts/twister -i --force-color -N -v --filter runnable -p ${{ matrix.platform }} --coverage -T tests --coverage-tool gcovr -xCONFIG_TEST_EXTRA_STACK_SIZE=4096 -e nano ./scripts/twister -i --force-color -N -v --filter runnable -p ${{ matrix.platform }} --coverage -T tests --coverage-tool gcovr -xCONFIG_TEST_EXTRA_STACK_SIZE=4096 -e nano
- name: ccache stats post - name: ccache stats post
@ -101,16 +111,16 @@ jobs:
- name: Rename coverage files - name: Rename coverage files
if: always() if: always()
run: | run: |
cp twister-out/coverage.json coverage/reports/${{ matrix.platform }}.json mv twister-out/coverage.json coverage/reports/${{matrix.normalized}}.json
- name: Upload Coverage Results - name: Upload Coverage Results
if: always() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Coverage Data (Subset ${{ matrix.platform }}) name: Coverage Data (Subset ${{ matrix.normalized }})
path: | path: |
coverage/reports/${{ matrix.platform }}.json coverage/reports/${{ matrix.normalized }}.json
${{ matrix.platform }}-testplan.json ${{ matrix.normalized }}-testplan.json
codecov-results: codecov-results:
name: "Publish Coverage Results" name: "Publish Coverage Results"