Add community docs and templates #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: Basic CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install lightweight dependencies | |
| run: python -m pip install --upgrade pip pyyaml | |
| - name: Validate repository metadata files | |
| run: | | |
| test -f README.md | |
| test -f LICENSE | |
| test -f CONTRIBUTING.md | |
| test -f .gitignore | |
| test -f .gitattributes | |
| test -f .editorconfig | |
| test -f .github/CODEOWNERS | |
| test -f .github/pull_request_template.md | |
| test -f .github/ISSUE_TEMPLATE/bug_report.md | |
| test -f .github/ISSUE_TEMPLATE/feature_request.md | |
| - name: Validate README sections | |
| run: | | |
| grep -q '^## Quick Links' README.md | |
| grep -q '^## Current Scope' README.md | |
| grep -q '^## Repository Layout' README.md | |
| grep -q '^## Getting Started' README.md | |
| grep -q '^## Typical Workflow' README.md | |
| grep -q '^## Contributing' README.md | |
| grep -q '^## License' README.md | |
| - name: Check Python syntax | |
| run: | | |
| python -m compileall \ | |
| scripts \ | |
| generated_openram_configs \ | |
| generated_openram_power_configs | |
| - name: Validate YAML configs | |
| run: | | |
| python - <<'PY' | |
| from pathlib import Path | |
| import yaml | |
| for path in Path("configs").glob("*.y*ml"): | |
| with path.open("r", encoding="utf-8") as f: | |
| yaml.safe_load(f) | |
| print(f"validated {path}") | |
| PY | |
| - name: Check shell script syntax | |
| run: | | |
| shopt -s nullglob | |
| for file in scripts/*.sh; do | |
| bash -n "$file" | |
| echo "validated $file" | |
| done |