Skip to content

Commit b8a232f

Browse files
committed
[#72831] GHA: Added including tests' simulation in documentation
Signed-off-by: Grzegorz Latosinski <[email protected]>
1 parent d424636 commit b8a232f

File tree

3 files changed

+110
-106
lines changed

3 files changed

+110
-106
lines changed

.github/workflows/build-docs.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
build-and-test:
11+
name: Build and test
12+
runs-on: ubuntu-latest
13+
env:
14+
DEBIAN_FRONTEND: "noninteractive"
15+
steps:
16+
- name: Install dependencies
17+
run: |
18+
sudo apt -qqy update
19+
sudo apt -qqy --no-install-recommends install help2man libfl-dev make g++ git bison flex gperf \
20+
libreadline-dev libbz2-dev autoconf python3-sphinx \
21+
python3-docopt
22+
23+
- name: Setup repository
24+
uses: actions/checkout@v4
25+
26+
- name: Get Submodules
27+
run: |
28+
git submodule update --init --recursive
29+
30+
- name: Install Pyenv
31+
run: |
32+
./install.sh
33+
34+
- name: Build Icarus
35+
run: |
36+
git clone https://github.com/steveicarus/iverilog.git
37+
cd iverilog
38+
git checkout 06077ed026b4d8498d9129a6acfb0b44d0b51f18
39+
sh autoconf.sh
40+
./configure
41+
make -j$(nproc)
42+
sudo make install
43+
iverilog -V
44+
45+
- name: Build Verilator
46+
run: |
47+
git clone https://github.com/verilator/verilator -b v5.024
48+
cd verilator
49+
autoconf
50+
./configure
51+
make -j$(nproc)
52+
sudo make install
53+
verilator --version
54+
55+
- name: Run Tests
56+
run: |
57+
make install-uvm
58+
source activate.sh
59+
make tests
60+
61+
- name: Upload artifacts
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: tests-results
65+
path: verification/cocotb
66+
67+
docs-build:
68+
name: Documentation build
69+
runs-on: ubuntu-latest
70+
needs: [build-and-test]
71+
env:
72+
DEBIAN_FRONTEND: "noninteractive"
73+
steps:
74+
- name: Install dependencies
75+
run: |
76+
sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \
77+
python3 python3-pip
78+
79+
- name: Setup repository
80+
uses: actions/checkout@v4
81+
82+
- uses: actions/download-artifact@v4
83+
84+
- name: Generate VP
85+
run: |
86+
cp -r tests-results/* verification/cocotb/
87+
export I3C_ROOT_DIR="`pwd`"
88+
pip3 install git+https://github.com/antmicro/testplanner.git
89+
REPO_URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$GITHUB_REF_NAME/" make verification-docs-with-sim
90+
91+
- name: Build Docs
92+
run: |
93+
pushd testplans-template
94+
pip3 install -r requirements.txt
95+
TZ=UTC make html
96+
popd
97+
98+
- name: Pack artifacts
99+
if: always()
100+
uses: actions/upload-artifact@v4
101+
with:
102+
name: docs
103+
path: ./testplans-template/build
104+
105+
- name: Deploy
106+
uses: peaceiris/actions-gh-pages@v4
107+
if: ${{ github.ref == 'refs/heads/main' }}
108+
with:
109+
github_token: ${{ secrets.GITHUB_TOKEN }}
110+
publish_dir: ./testplans-template/build/html

.github/workflows/tests.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)