Skip to content

Commit

Permalink
Merge pull request #228 from antmicro/63639-use-sis-package-for-cover…
Browse files Browse the repository at this point in the history
…ages

Use sis package for coverage generation
  • Loading branch information
tmichalak authored Sep 17, 2024
2 parents e2f31eb + 067cc09 commit ceb5d14
Show file tree
Hide file tree
Showing 37 changed files with 2,939 additions and 226 deletions.
44 changes: 0 additions & 44 deletions .github/scripts/convert_coverage_data.sh

This file was deleted.

70 changes: 0 additions & 70 deletions .github/scripts/gen_coverage_reports.sh

This file was deleted.

95 changes: 0 additions & 95 deletions .github/scripts/update_webpage.sh

This file was deleted.

17 changes: 16 additions & 1 deletion .github/workflows/gh-pages-pr-remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ jobs:
- name: Setup repository
uses: actions/checkout@v3

- name: install SiteSpawner package
run: |
python3 -m venv .venv
.venv/bin/python3 -m pip install tools/SiteSpawner
source .venv/bin/activate
echo "PATH=$PATH" >> $GITHUB_ENV
python3 -m pip install tools/SiteSpawner
- name: Download deployment
uses: actions/checkout@v3
with:
Expand All @@ -45,7 +53,14 @@ jobs:
run: |
rm -rf ${{ env.ROOT_DIR }}/html/dev/${{ steps.PR.outputs.number }}
rm -rf ${{ env.ROOT_DIR }}/doctrees/dev/${{ steps.PR.outputs.number }}
.github/scripts/update_webpage.sh ${{ github.ref_name }} ${{ github.event_name }} ${{ steps.PR.outputs.number }}
mkdir -p public.new/html/dev/${{ steps.PR.outputs.number }}/docs_rendered
cp -arf ./docs_rendered/* public.new/html/dev/${{ steps.PR.outputs.number }}/docs_rendered
sis -d webpage \
--include-documentation \
--doc-project-name "Cores VeeR EL2" \
--loc-github-ref-name ${{ github.ref_name }} \
--loc-github-event-name ${{ github.event_name }} \
--pr-number ${{ steps.PR.outputs.number }}
- name: Add redirect index page
run: |
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/publish-webpage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ jobs:
- name: Setup python
uses: actions/setup-python@v4

- name: install SiteSpawner package
run: |
python3 -m venv .venv
.venv/bin/python3 -m pip install tools/SiteSpawner
source .venv/bin/activate
echo "PATH=$PATH" >> $GITHUB_ENV
python3 -m pip install tools/SiteSpawner
- name: Print metadata
run: |
run_information="Repository: ${{ github.repository }} Commit SHA:${{ github.sha }} Workflow: ${{ github.workflow }} Run:${{ github.run_id }}"
Expand Down Expand Up @@ -62,12 +70,26 @@ jobs:
- name: Update webpage
if: github.event_name != 'pull_request'
run: |
.github/scripts/update_webpage.sh ${{ github.ref_name }} ${{ github.event_name }} 0
mkdir -p public.new/html/main/docs_rendered
cp -arf ./docs_rendered/* public.new/html/main/docs_rendered
sis -d webpage \
--include-documentation \
--doc-project-name "Cores VeeR EL2" \
--loc-github-ref-name ${{ github.ref_name }} \
--loc-github-event-name ${{ github.event_name }} \
--pr-number 0
- name: Update webpage PR
if: github.event_name == 'pull_request'
run: |
.github/scripts/update_webpage.sh ${{ github.ref_name }} ${{ github.event_name }} ${{ github.event.number }}
mkdir -p public.new/html/dev/${{ github.event.number }}/docs_rendered
cp -arf ./docs_rendered/* public.new/html/dev/${{ github.event.number }}/docs_rendered
sis -d webpage \
--include-documentation \
--doc-project-name "Cores VeeR EL2" \
--loc-github-ref-name ${{ github.ref_name }} \
--loc-github-event-name ${{ github.event_name }} \
--pr-number ${{ github.event.number }}
- name: Add redirect index page
run: |
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/report-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ jobs:
- name: Setup repository
uses: actions/checkout@v3

- name: install SiteSpawner package
run: |
python3 -m venv .venv
.venv/bin/python3 -m pip install tools/SiteSpawner
source .venv/bin/activate
echo "PATH=$PATH" >> $GITHUB_ENV
python3 -m pip install tools/SiteSpawner
# This step is needed to have the same VeeR codebase as used in tests
- name: Configure VeeR
run: |
Expand All @@ -32,7 +40,7 @@ jobs:
run: |
git clone https://github.com/linux-test-project/lcov
pushd lcov
git checkout v1.16
git checkout v2.1
echo "LCOV_PATH=`realpath bin`" >> "$GITHUB_ENV"
popd
Expand Down Expand Up @@ -75,7 +83,7 @@ jobs:
- name: Generate reports
run: |
export PATH=${{ env.LCOV_PATH }}:${PATH}
bash .github/scripts/gen_coverage_reports.sh
sis -d reports . --report-dir report --src-pattern \*design\*
- name: Pack artifacts
if: always()
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test-openocd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ jobs:
with:
submodules: recursive

- name: install SiteSpawner package
run: |
python3 -m venv .venv
.venv/bin/python3 -m pip install tools/SiteSpawner
source .venv/bin/activate
echo "PATH=$PATH" >> $GITHUB_ENV
python3 -m pip install tools/SiteSpawner
- name: Build verilated simulation
run: |
export PATH=/opt/verilator/bin:/opt/openocd/bin:$PATH
Expand All @@ -87,8 +95,7 @@ jobs:
run: |
export PATH=/opt/verilator/bin:$PATH
export RV_ROOT=$(pwd)
.github/scripts/convert_coverage_data.sh ${RV_ROOT}/run
echo "convert_coverage_data.sh exited with RET_CODE = "$?
sis -d convert --dat-dir ${RV_ROOT}/run
mkdir -p results
mv ${RV_ROOT}/run/coverage.info \
results/coverage_openocd_${{ matrix.bus }}_${{ matrix.coverage }}.info
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ jobs:
with:
submodules: recursive

- name: install SiteSpawner package
run: |
python3 -m venv .venv
.venv/bin/python3 -m pip install tools/SiteSpawner
source .venv/bin/activate
echo "PATH=$PATH" >> $GITHUB_ENV
python3 -m pip install tools/SiteSpawner
- name: Setup environment
run: |
echo "/opt/verilator/bin" >> $GITHUB_PATH
Expand All @@ -92,8 +100,7 @@ jobs:
- name: Prepare coverage data
run: |
.github/scripts/convert_coverage_data.sh ${TEST_PATH}/
echo "convert_coverage_data.sh exited with RET_CODE = "$?
sis -d convert --dat-dir ${TEST_PATH}/
mkdir -p results
mv ${TEST_PATH}/coverage.info \
results/coverage_${{ matrix.bus }}_${{ matrix.test }}_${{ matrix.coverage }}.info
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test-riscof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ jobs:
with:
submodules: recursive

- name: install SiteSpawner package
run: |
python3 -m venv .venv
.venv/bin/python3 -m pip install tools/SiteSpawner
source .venv/bin/activate
echo "PATH=$PATH" >> $GITHUB_ENV
python3 -m pip install tools/SiteSpawner
- name: Install RISCOF
run: |
pip3 install git+https://github.com/riscv/riscof@a25e315
Expand Down Expand Up @@ -146,8 +154,7 @@ jobs:
- name: Prepare coverage data
run: |
export PATH=/opt/verilator/bin:$PATH
.github/scripts/convert_coverage_data.sh riscof/coverage/
echo "convert_coverage_data.sh exited with RET_CODE = "$?
sis -d convert --dat-dir riscof/coverage/
mv riscof/coverage/coverage.info \
riscof/coverage/coverage_riscof_${{matrix.priv}}_${{ matrix.coverage }}.info
Expand Down
Loading

0 comments on commit ceb5d14

Please sign in to comment.