Run Tests #150
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: '30 3 * * *' # Run everyday at 3:30AM | |
permissions: | |
contents: write | |
jobs: | |
build-and-test: | |
name: Build and test | |
runs-on: ubuntu-latest | |
env: | |
DEBIAN_FRONTEND: "noninteractive" | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt -qqy update | |
sudo apt -qqy --no-install-recommends install help2man libfl-dev make g++ git bison flex gperf \ | |
libreadline-dev libbz2-dev autoconf python3-sphinx \ | |
python3-docopt | |
- name: Setup repository | |
uses: actions/checkout@v4 | |
- name: Get Submodules | |
run: | | |
git submodule update --init --recursive | |
- name: Install Pyenv | |
run: | | |
./install.sh | |
- name: Build Icarus | |
run: | | |
git clone https://github.com/steveicarus/iverilog.git | |
cd iverilog | |
git checkout 06077ed026b4d8498d9129a6acfb0b44d0b51f18 | |
sh autoconf.sh | |
./configure | |
make -j$(nproc) | |
sudo make install | |
iverilog -V | |
- name: Build Verilator | |
run: | | |
git clone https://github.com/verilator/verilator -b v5.024 | |
cd verilator | |
autoconf | |
./configure | |
make -j$(nproc) | |
sudo make install | |
verilator --version | |
- name: Run Tests | |
run: | | |
make install-uvm | |
source activate.sh | |
make tests-axi | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tests-results | |
path: verification/cocotb | |
docs-build: | |
name: Documentation build | |
runs-on: ubuntu-latest | |
needs: [build-and-test] | |
env: | |
DEBIAN_FRONTEND: "noninteractive" | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \ | |
python3 python3-pip python3-venv git | |
- name: Setup repository | |
uses: actions/checkout@v4 | |
- name: Get Submodules | |
run: | | |
git submodule update --init --recursive | |
- uses: actions/download-artifact@v4 | |
- name: Install dependencies | |
run: | | |
python3 -m venv .venv | |
source .venv/bin/activate | |
export I3C_ROOT_DIR="`pwd`" | |
pip3 install -r requirements.txt | |
pip3 install -r doc/requirements.txt | |
- name: Generate VP | |
run: | | |
source .venv/bin/activate | |
cp -r tests-results/* verification/cocotb/ | |
REPO_URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$GITHUB_REF_NAME/" make verification-docs-with-sim | |
- name: Build Docs | |
run: | | |
pushd doc | |
pip3 install -r requirements.txt | |
TZ=UTC make html | |
popd | |
ls -lah doc/build | |
git clone https://github.com/antmicro/i3c-core-coverage-results || exit 0 | |
cp i3c-core-coverage-results/*html doc/build/html | |
- name: Pack artifacts | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: ./doc/build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./doc/build/html |