feat: cocotb test for example 2 #2
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: cocotb_unit_test | |
| on: [push, workflow_dispatch] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install iverilog | |
| shell: bash | |
| run: sudo apt-get update && sudo apt-get install -y iverilog | |
| - name: Setup python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install cocotb | |
| run: pip install cocotb | |
| - name: Run cocotb unit test [ex01_and_gate] | |
| run: | | |
| cd ex01_and_gate/test | |
| make | |
| ! grep failure results.xml | |
| cd ../.. | |
| - name: Run cocotb unit test [ex02_1_bit_full_adder] | |
| run: | | |
| cd ex02_1_bit_full_adder/test | |
| make | |
| ! grep failure results.xml | |
| cd ../.. |