|
| 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 python3-venv |
| 78 | +
|
| 79 | + - name: Setup repository |
| 80 | + uses: actions/checkout@v4 |
| 81 | + |
| 82 | + - name: Get Submodules |
| 83 | + run: | |
| 84 | + git submodule update --init --recursive |
| 85 | +
|
| 86 | + - uses: actions/download-artifact@v4 |
| 87 | + |
| 88 | + - name: Install dependencies |
| 89 | + run: | |
| 90 | + python3 -m venv .venv |
| 91 | + source .venv/bin/activate |
| 92 | + export I3C_ROOT_DIR="`pwd`" |
| 93 | + pip3 install -r requirements.txt |
| 94 | + pip3 install -r doc/requirements.txt |
| 95 | +
|
| 96 | + - name: Generate VP |
| 97 | + run: | |
| 98 | + source .venv/bin/activate |
| 99 | + cp -r tests-results/* verification/cocotb/ |
| 100 | + REPO_URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$GITHUB_REF_NAME/" make verification-docs-with-sim |
| 101 | +
|
| 102 | + - name: Build Docs |
| 103 | + run: | |
| 104 | + pushd doc |
| 105 | + pip3 install -r requirements.txt |
| 106 | + TZ=UTC make html |
| 107 | + popd |
| 108 | + ls -lah doc/build |
| 109 | +
|
| 110 | + - name: Pack artifacts |
| 111 | + if: always() |
| 112 | + uses: actions/upload-artifact@v4 |
| 113 | + with: |
| 114 | + name: docs |
| 115 | + path: ./doc/build |
| 116 | + |
| 117 | + - name: Deploy |
| 118 | + uses: peaceiris/actions-gh-pages@v4 |
| 119 | + if: ${{ github.ref == 'refs/heads/main' }} |
| 120 | + with: |
| 121 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 122 | + publish_dir: ./doc/build/html |
0 commit comments