|
7 | 7 | required: true |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - test-submit: |
| 10 | + test-all: |
11 | 11 | runs-on: ubuntu-latest |
12 | 12 | strategy: |
13 | 13 | matrix: |
@@ -65,12 +65,47 @@ jobs: |
65 | 65 | - name: Run tests |
66 | 66 | working-directory: ${{ env.test_repo_path }} |
67 | 67 | run: | |
68 | | - pdm test |
| 68 | + pdm test-cov |
| 69 | +
|
| 70 | + - name: Run sim |
| 71 | + working-directory: ${{ env.test_repo_path }} |
| 72 | + run: | |
| 73 | + pdm run coverage run -a chipflow pin lock |
| 74 | + pdm run coverage run -a chipflow sim |
| 75 | + pdm run coverage run -a chipflow software |
| 76 | + ./build/sim/sim_soc |
69 | 77 |
|
70 | 78 | - name: Submit build ${{ env.is_dry }} |
71 | 79 | working-directory: ${{ env.test_repo_path }}/${{ matrix.repo.design }} |
72 | 80 | run: | |
73 | | - pdm run chipflow pin lock |
74 | | - pdm run chipflow silicon submit --wait $DRY | cat |
| 81 | + pdm run coverage run -a chipflow pin lock |
| 82 | + pdm run coverage run -a chipflow silicon submit --wait $DRY | cat |
| 83 | + mv .coverage .coverage-${{matrix.repo.name}}-${{matrix.dry}} |
75 | 84 | env: |
76 | 85 | CHIPFLOW_API_KEY: ${{ secrets.CHIPFLOW_API_KEY}} |
| 86 | + |
| 87 | + - name: Upload coverage artefact |
| 88 | + uses: actions/upload-artifact@v4 |
| 89 | + with: |
| 90 | + name: coverage-${{matrix.repo.name}}-${{matrix.dry}} |
| 91 | + path: .coverage-${{matrix.repo.name}}-${{matrix.dry}} |
| 92 | + |
| 93 | + coverage: |
| 94 | + needs: [test-all] |
| 95 | + steps: |
| 96 | + - name: Fetch coverage artefacts |
| 97 | + uses: actions/download-artifact@v4 |
| 98 | + with: |
| 99 | + path: coverage/ |
| 100 | + merge-multiple: true |
| 101 | + - name: Combine coverage artefacts |
| 102 | + run: pdm coverage combine coverage/ |
| 103 | + - name: Generate coverage report |
| 104 | + run: pdm coverage html |
| 105 | + - name: upload html coverage artifact |
| 106 | + uses: actions/upload-pages-artifact@v1 |
| 107 | + with: |
| 108 | + path: './htmlcov/' |
| 109 | + - name: deploy to Github Pages |
| 110 | + uses: actions/deploy-pages@v2 |
| 111 | + id: deployment |
0 commit comments