Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DNM] Custom result merger #338

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,62 +8,7 @@ on:

jobs:

Test-Regression-Cache-Wayback-0:
name: Test-Regression Cache Wayback 0
uses: ./.github/workflows/test-regression-cache-wayback-0.yml

Test-Regression-Cache-Wayback-1:
name: Test-Regression Cache Wayback 1
uses: ./.github/workflows/test-regression-cache-wayback-1.yml

Test-Exceptions-Regression:
name: Test-Exceptions-Regression
uses: ./.github/workflows/test-regression-exceptions.yml

Test-Verification:
name: Test-Verification
uses: ./.github/workflows/test-verification.yml

Test-Microarchitectural:
name: Test-Microarchitectural
uses: ./.github/workflows/test-uarch.yml

Test-RISCV-DV:
name: Test-RISCV-DV
uses: ./.github/workflows/test-riscv-dv.yml

Test-RISCOF:
name: Test-RISCOF
uses: ./.github/workflows/test-riscof.yml

Test-UVM:
name: Test-UVM
uses: ./.github/workflows/test-uvm.yml

Test-Renode:
name: Test-Renode
uses: ./.github/workflows/test-renode.yml

Test-OpenOCD:
name: Test-OpenOCD
uses: ./.github/workflows/test-openocd.yml

Report-Coverage:
name: Report-Coverage
needs: [Test-Regression-Cache-Wayback-0, Test-Regression-Cache-Wayback-1, Test-Verification, Test-Microarchitectural, Test-RISCV-DV, Test-RISCOF, Test-OpenOCD]
uses: ./.github/workflows/report-coverage.yml

Build-Docs:
name: Build-Docs
uses: ./.github/workflows/build-docs.yml

Publish-to-GH-Pages:
concurrency:
group: concurrency-group-${{ github.repository }}-publish
cancel-in-progress: false
permissions:
actions: write
contents: write
name: Publish-to-GH-Pages
needs: [Report-Coverage, Test-Verification, Build-Docs]
uses: ./.github/workflows/publish-webpage.yml
236 changes: 2 additions & 234 deletions .github/workflows/report-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,237 +5,11 @@ on:

jobs:

merge-verilator-reports:
name: Merge Verilator info data
runs-on: ubuntu-latest
container: ghcr.io/antmicro/cores-veer-el2:20250103160559
env:
DEBIAN_FRONTEND: "noninteractive"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: regression_tests_coverage_data
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: regression_tests_coverage_data_cache_wayback_0
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: regression_tests_coverage_data_cache_wayback_1
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: verification_tests_coverage_data
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: uarch_tests_coverage_data
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: riscv-dv_coverage_data
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: riscof_coverage_data
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: openocd_coverage_data
path: ./

- name: Merge data
shell: bash
run: |
sudo apt update
sudo apt install -y zip unzip
.github/scripts/prepare_coverage_data.sh

- name: Pack artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: verilator_coverage_data
path: |
coverage_toggle_verilator_orig.info_
coverage_toggle_verilator.info
coverage_line_verilator.info
coverage_branch_verilator_orig.info_
coverage_branch_verilator.info

- name: Pack artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: coverview_data
path: |
data.zip

coverage-report:
name: Coverage report
runs-on: ubuntu-latest
container: ghcr.io/antmicro/cores-veer-el2:20250103160559
needs: [merge-verilator-reports, custom-coverage-report]
env:
DEBIAN_FRONTEND: "noninteractive"

steps:
- name: Setup repository
uses: actions/checkout@v3

- name: Install coverage dependencies
shell: bash
run: |
python3 -m venv .venv
source .venv/bin/activate
pip install -r .github/scripts/requirements-coverage.txt
echo "PATH=$PATH" >> $GITHUB_ENV

# This step is needed to have the same VeeR codebase as used in tests
- name: Configure VeeR
shell: bash
run: |
export RV_ROOT=`pwd`
make defines.h -f $RV_ROOT/tools/Makefile

- name: Setup lcov
shell: bash
run: |
git clone https://github.com/linux-test-project/lcov
pushd lcov
git checkout v2.1
echo "LCOV_PATH=`realpath bin`" >> "$GITHUB_ENV"
popd

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: regression_tests_coverage_data
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: regression_tests_coverage_data_cache_wayback_0
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: regression_tests_coverage_data_cache_wayback_1
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: verification_tests_coverage_data
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: uarch_tests_coverage_data
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: riscv-dv_coverage_data
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: riscof_coverage_data
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: openocd_coverage_data
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: coverview_data
path: ./

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: data_v
path: ./

- name: Generate reports
shell: bash
run: |
sudo apt update
sudo apt install -y zip unzip
export PATH=${{ env.LCOV_PATH }}:${PATH}
for f in $(ls *_branch.info); do
mv $f line.info
base_name=$(echo $f | rev | cut -d _ -f 2- | rev)
python3 .github/scripts/split_info.py line.info --branch > ${base_name}_branch.info
python3 .github/scripts/split_info.py line.info --line > ${base_name}_line.info
done
zip data_toggle_verilator_info.zip *_toggle.info
zip data_branch_verilator_info.zip *_branch.info
zip data_line_verilator_info.zip *_line.info
mkdir report
cp data.zip report
cp data_v.zip report
cp data_both.zip report
cp data_toggle_verilator_info.zip report
cp data_branch_verilator_info.zip report
cp data_line_verilator_info.zip report


cat *_toggle.info > coverage.toggle.info
cat *_branch.info > coverage.branch.info

- name: Pack artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: coverage_report
path: ./report

- name: Pack artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: combined_coverage_data
path: |
coverage.toggle.info
coverage.branch.info


custom-coverage-report:
name: Custom coverage report
runs-on: [ self-hosted, Linux, X64, gcp-custom-runners ]
container: centos:8
needs: [merge-verilator-reports]
env:
GHA_EXTERNAL_DISK: additional-tools
GHA_SA: gh-sa-veer-uploader
Expand All @@ -245,17 +19,11 @@ jobs:
with:
submodules: recursive

- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: verilator_coverage_data
path: ./

- name: Prepare Environment
run: _secret_prepare_env

- name: Generate custom report
run: _secret_custom_report
run: _secret_custom_report_tmp

- name: Pack artifacts
uses: actions/upload-artifact@v3
Expand All @@ -280,7 +48,7 @@ jobs:
submodules: recursive

- name: Generate custom report
run: _secret_custom_report_merger
run: _secret_custom_report_merger_tmp

- name: Pack artifacts
uses: actions/upload-artifact@v3
Expand Down
Loading