Skip to content

Commit

Permalink
Merge pull request #333 from chipsalliance/new-dashboard
Browse files Browse the repository at this point in the history
CI: switch to new dashboard
  • Loading branch information
kgugala authored Jan 8, 2025
2 parents dd9a186 + 2b3beb0 commit c4d8104
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 35 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/gh-pages-pr-remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- completed

env:
ROOT_DIR: './public.old'
ROOT_DIR: './public.new'

jobs:
remove:
Expand Down Expand Up @@ -52,12 +52,6 @@ jobs:
run: |
rm -rf ${{ env.ROOT_DIR }}/html/dev/${{ steps.PR.outputs.number }}
rm -rf ${{ env.ROOT_DIR }}/doctrees/dev/${{ steps.PR.outputs.number }}
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
74 changes: 47 additions & 27 deletions .github/workflows/publish-webpage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,14 @@ jobs:
concurrency:
group: gh-pages
runs-on: ubuntu-latest
container:
image: debian:trixie
permissions:
contents: write
steps:
- name: Setup repository
uses: actions/checkout@v3

- name: Setup python
uses: actions/setup-python@v4

- name: Install coverage dependencies
run: |
python3 -m venv .venv
source .venv/bin/activate
pip install -r .github/scripts/requirements-coverage.txt
echo "PATH=$PATH" >> $GITHUB_ENV
- 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,24 +54,38 @@ jobs:

- name: Preserve only valid items
run: |
mkdir -p ./public.old
mv ./public.checkout/doctrees ./public.old/ | true
mv ./public.checkout/html ./public.old/ | true
mkdir -p ./public.new
mv ./public.checkout/doctrees ./public.new/ | true
mv ./public.checkout/html ./public.new/ | true
- name: Update webpage
if: github.event_name != 'pull_request'
run: |
apt -y update
apt -y install nodejs npm python3 zip git
mv coverage_dashboard/*.zip .
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
# use docs from the artifact
# get coverview
git clone https://github.com/antmicro/coverview
cd coverview
npm install
npm run build
unzip ../data.zip -d data
python3 embed.py --inject-data data
cd ../
# dashboard
rm -rf public.new/html/main/coverage_dashboard*
mkdir -p public.new/html/main/coverage_dashboard/all
cp -a coverview/dist/* public.new/html/main/coverage_dashboard/all
#docs
rm -rf public.new/html/main/docs_rendered
mkdir -p public.new/html/main/docs_rendered
mv ./docs_rendered/* public.new/html/main/docs_rendered
# data
mv data_*_verilator_info.zip public.new/html/main/
mv data.zip public.new/html/main/
mv data_v.zip public.new/html/main/
Expand All @@ -90,17 +96,31 @@ jobs:
- name: Update webpage PR
if: github.event_name == 'pull_request'
run: |
apt -y update
apt -y install nodejs npm python3 zip git
mv coverage_dashboard/*.zip .
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 }}
# use docs from the artifact
# get coverview
git clone https://github.com/antmicro/coverview
cd coverview
npm install
npm run build
unzip ../data.zip -d data
python3 embed.py --inject-data data
cd ../
# dashboard
rm -rf public.new/html/dev/${{ github.event.number }}/coverage_dashboard*
mkdir -p public.new/html/dev/${{ github.event.number }}/coverage_dashboard/all
cp -a coverview/dist/* public.new/html/dev/${{ github.event.number }}/coverage_dashboard/all
# docs
rm -rf public.new/html/dev/${{ github.event.number }}/docs_rendered
mkdir -p public.new/html/dev/${{ github.event.number }}/docs_rendered
mv ./docs_rendered/* public.new/html/dev/${{ github.event.number }}/docs_rendered
# data
mv data_*_verilator_info.zip public.new/html/dev/${{ github.event.number }}/
mv data.zip public.new/html/dev/${{ github.event.number }}/
mv data_v.zip public.new/html/dev/${{ github.event.number }}/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/report-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
zip data_toggle_verilator_info.zip *_toggle.info
zip data_branch_verilator_info.zip *_branch.info
zip data_line_verilator_info.zip *_line.info
sis -d reports . --report-dir report --src-pattern \*design\*
mkdir report
cp data.zip report
cp data_v.zip report
cp data_both.zip report
Expand Down

0 comments on commit c4d8104

Please sign in to comment.