|
6 | 6 | CHIPFLOW_API_KEY: |
7 | 7 | required: true |
8 | 8 |
|
| 9 | +permissions: |
| 10 | + contents: write |
| 11 | + |
9 | 12 | jobs: |
10 | 13 | test-all: |
11 | 14 | runs-on: ubuntu-latest |
|
15 | 18 | repo: |
16 | 19 | - name: "ChipFlow/chipflow-examples" |
17 | 20 | design: "minimal" |
| 21 | + artifact: chipflow-examples |
18 | 22 | env: |
19 | 23 | DRY: ${{ matrix.dry && '--dry-run' || '' }} |
20 | 24 | is_dry: ${{ matrix.dry && '(dry run)' || '' }} |
@@ -84,45 +88,36 @@ jobs: |
84 | 88 | pdm test-cov |
85 | 89 |
|
86 | 90 | - name: Run sim |
87 | | - working-directory: ${{ env.test_repo_path }} |
| 91 | + working-directory: ${{ env.test_repo_path }}/${{ matrix.repo.design }} |
88 | 92 | run: | |
89 | | - pdm run coverage run -a .venv/bin/chipflow pin lock |
90 | | - pdm run coverage run -a .venv/bin/chipflow sim |
91 | | - pdm run coverage run -a .venv/bin/chipflow software |
| 93 | + pdm run coverage run -a ../.venv/bin/chipflow pin lock |
| 94 | + pdm run coverage run -a ../.venv/bin/chipflow sim |
| 95 | + pdm run coverage run -a ../.venv/bin/chipflow software |
92 | 96 | ./build/sim/sim_soc |
93 | 97 |
|
94 | 98 | - name: Submit build ${{ env.is_dry }} |
95 | 99 | working-directory: ${{ env.test_repo_path }}/${{ matrix.repo.design }} |
96 | 100 | run: | |
97 | | - pdm run coverage run -a .venv/bin/chipflow pin lock |
98 | | - pdm run coverage run -a .venv/bin/chipflow silicon submit --wait $DRY | cat |
99 | | - mv .coverage .coverage-${{matrix.repo.name}}-${{matrix.dry}} |
| 101 | + pdm run coverage run -a ../.venv/bin/chipflow pin lock |
| 102 | + pdm run coverage run -a ../.venv/bin/chipflow silicon submit --wait $DRY | cat |
100 | 103 | env: |
101 | 104 | CHIPFLOW_API_KEY: ${{ secrets.CHIPFLOW_API_KEY}} |
102 | 105 |
|
103 | | - - name: Upload coverage artefact |
104 | | - uses: actions/upload-artifact@v4 |
105 | | - with: |
106 | | - name: coverage-${{matrix.repo.name}}-${{matrix.dry}} |
107 | | - path: .coverage-${{matrix.repo.name}}-${{matrix.dry}} |
108 | | - |
109 | | - coverage: |
110 | | - runs-on: ubuntu-latest |
111 | | - needs: [test-all] |
112 | | - steps: |
113 | | - - name: Fetch coverage artefacts |
114 | | - uses: actions/download-artifact@v4 |
115 | | - with: |
116 | | - path: coverage/ |
117 | | - merge-multiple: true |
118 | | - - name: Combine coverage artefacts |
119 | | - run: pdm coverage combine coverage/ |
120 | 106 | - name: Generate coverage report |
121 | | - run: pdm coverage html |
| 107 | + working-directory: ${{ env.test_repo_path }}/${{ matrix.repo.design }} |
| 108 | + run: pdm run coverage html |
| 109 | + |
122 | 110 | - name: upload html coverage artifact |
123 | | - uses: actions/upload-pages-artifact@v1 |
| 111 | + uses: actions/upload-pages-artifact@v3 |
124 | 112 | with: |
125 | | - path: './htmlcov/' |
| 113 | + path: '${{ env.test_repo_path }}/${{ matrix.repo.design }}/htmlcov/' |
| 114 | + |
| 115 | + |
126 | 116 | - name: deploy to Github Pages |
127 | | - uses: actions/deploy-pages@v2 |
128 | | - id: deployment |
| 117 | + uses: JamesIves/github-pages-deploy-action@v4 |
| 118 | + with: |
| 119 | + folder: '${{ env.test_repo_path }}/${{ matrix.repo.design }}/htmlcov/' |
| 120 | + branch: gh-pages |
| 121 | + clean: false |
| 122 | + force: false |
| 123 | + target-folder: coverage |
0 commit comments