[CI] fix CI; use Verilator for sim; and add contest.py for config #39
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: DevContainer CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Prepare devcontainer mount paths for CI | |
| run: | | |
| mkdir -p /tmp/.X11-unix | |
| touch "$HOME/.Xauthority" | |
| - name: Cache Docker layers | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/devcontainers | |
| key: devcontainer-${{ hashFiles('.devcontainer/Dockerfile', '.devcontainer/devcontainer.json') }} | |
| restore-keys: | | |
| devcontainer- | |
| - name: Run tests in DevContainer | |
| uses: devcontainers/ci@v0.3 | |
| with: | |
| runCmd: | | |
| verilator --version | |
| verilator --version | grep -E '^Verilator 5\.' | |
| python3 -m venv .venv | |
| .venv/bin/pip install --upgrade pip | |
| .venv/bin/pip install -r tests/requirements.txt | |
| cd tests | |
| ../.venv/bin/pytest -v |