|
| 1 | +name: gds |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + workflow_dispatch: |
| 6 | + |
| 7 | +jobs: |
| 8 | + gds: |
| 9 | + runs-on: ubuntu-24.04 |
| 10 | + steps: |
| 11 | + - name: checkout repo |
| 12 | + uses: actions/checkout@v4 |
| 13 | + with: |
| 14 | + submodules: recursive |
| 15 | + |
| 16 | + - name: Build GDS |
| 17 | + uses: TinyTapeout/tt-gds-action/orfs@tt09 |
| 18 | + |
| 19 | + #precheck: |
| 20 | + # needs: gds |
| 21 | + # runs-on: ubuntu-24.04 |
| 22 | + # steps: |
| 23 | + # - name: Run Tiny Tapeout Precheck |
| 24 | + # uses: TinyTapeout/tt-gds-action/precheck@tt09 |
| 25 | + |
| 26 | + gl_test: |
| 27 | + needs: gds |
| 28 | + runs-on: ubuntu-24.04 |
| 29 | + env: |
| 30 | + PDK_ROOT: ${{ github.workspace }}/IHP-Open-PDK |
| 31 | + TEST_DIR: ${{ github.workspace }}/test |
| 32 | + steps: |
| 33 | + - name: checkout repo |
| 34 | + uses: actions/checkout@v4 |
| 35 | + with: |
| 36 | + submodules: recursive |
| 37 | + |
| 38 | + - name: Download GDS artifact |
| 39 | + uses: actions/download-artifact@v4 |
| 40 | + with: |
| 41 | + name: tt_submission |
| 42 | + |
| 43 | + - name: install PDK |
| 44 | + uses: actions/checkout@v4 |
| 45 | + with: |
| 46 | + repository: tinytapeout/IHP-Open-PDK |
| 47 | + ref: tt |
| 48 | + path: IHP-Open-PDK |
| 49 | + |
| 50 | + - name: Setup python |
| 51 | + uses: actions/setup-python@v5 |
| 52 | + with: |
| 53 | + python-version: '3.11' |
| 54 | + |
| 55 | + - name: Install Python packages |
| 56 | + shell: bash |
| 57 | + run: pip install -r test/requirements.txt |
| 58 | + |
| 59 | + - name: ccache |
| 60 | + uses: hendrikmuhs/[email protected] |
| 61 | + |
| 62 | + - name: Install iverilog |
| 63 | + shell: bash |
| 64 | + run: | |
| 65 | + wget https://github.com/htfab/iverilog/releases/download/13.0-git-d8c3c51/iverilog_13.0-git-d8c3c51a-1_amd64.deb |
| 66 | + sudo apt-get update -y |
| 67 | + sudo apt-get install -y ./iverilog_13.0-git-d8c3c51a-1_amd64.deb |
| 68 | +
|
| 69 | + - name: Run tests |
| 70 | + shell: bash |
| 71 | + run: | |
| 72 | + cp tt_submission/*.v "$TEST_DIR/gate_level_netlist.v" |
| 73 | + cd "$TEST_DIR" |
| 74 | + rm -f tb.vcd results.xml |
| 75 | + make clean |
| 76 | + GATES=yes make |
| 77 | + |
| 78 | + # `make` will return success even if the tests fail, so check for failure in results.xml |
| 79 | + test -f results.xml |
| 80 | + ! grep failure results.xml |
| 81 | + |
| 82 | + - name: Upload VCD |
| 83 | + if: always() |
| 84 | + uses: actions/upload-artifact@v4 |
| 85 | + with: |
| 86 | + name: gatelevel_test_vcd |
| 87 | + path: | |
| 88 | + ${{ env.TEST_DIR }}/tb.vcd |
| 89 | + ${{ env.TEST_DIR }}/results.xml |
| 90 | +
|
| 91 | + - name: Test Summary |
| 92 | + if: always() |
| 93 | + uses: test-summary/[email protected] |
| 94 | + with: |
| 95 | + paths: ${{ env.TEST_DIR }}/results.xml |
| 96 | + |
| 97 | + viewer: |
| 98 | + needs: gds |
| 99 | + runs-on: ubuntu-24.04 |
| 100 | + permissions: |
| 101 | + pages: write # to deploy to Pages |
| 102 | + id-token: write # to verify the deployment originates from an appropriate source |
| 103 | + steps: |
| 104 | + - uses: TinyTapeout/tt-gds-action/viewer@tt09 |
0 commit comments