Skip to content

Commit 1f8759d

Browse files
committed
GHA: Added building documentation after tests to include their results
Signed-off-by: Grzegorz Latosinski <[email protected]>
1 parent b4da3b0 commit 1f8759d

File tree

3 files changed

+119
-107
lines changed

3 files changed

+119
-107
lines changed

.github/workflows/build-docs.yml

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

.github/workflows/tests.yml

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

0 commit comments

Comments
 (0)