Files
retroSoC/.github/workflows/quality.yml
T

150 lines
5.1 KiB
YAML

name: quality
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: quality-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
scripts:
runs-on: ubuntu-22.04
timeout-minutes: 90
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Restore pip cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-${{ hashFiles('requirements/build.txt', 'requirements/ci.txt') }}
- name: Restore locked source dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
physical/pdk/IHP-Open-PDK
physical/pdk/icsprout55-pdk
.cache/retrosoc/sources/ics55_ecos_pll
rtl/managed/third_party
.cache/retrosoc/pdk
.cache/retrosoc/stamps
key: quality-sources-${{ runner.os }}-${{ hashFiles('dependencies/dependencies.lock.json') }}
- name: Restore locked toolchains
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
.cache/retrosoc/downloads
.cache/retrosoc/toolchains
key: tools-${{ runner.os }}-${{ hashFiles('dependencies/dependencies.lock.json') }}
- name: Restore accelerator reference cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
.cache/retrosoc/sources/apu-libflac
.cache/retrosoc/sources/apu-flac-corpus
.cache/retrosoc/sources/apu-mlperf-tiny
.cache/retrosoc/sources/apu-kws-mfcc
.cache/retrosoc/sources/apu-tensorflow
.cache/retrosoc/sources/apu-gemmlowp
.cache/retrosoc/sources/npu-vww-corpus
.cache/retrosoc/downloads/npu
key: accelerator-reference-${{ runner.os }}-${{ hashFiles('dependencies/dependencies.lock.json') }}
- name: Install pinned quality tools
run: >-
python3 -m pip install
--requirement requirements/build.txt
--requirement requirements/ci.txt
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends --yes clang-format-14
- name: Set up locked RTL formatter
uses: ./.github/actions/locked-tools
with:
tools: verible
- name: Validate dependency lock
run: python3 scripts/dependency_lock.py --lock dependencies/dependencies.lock.json
- name: Set up locked RTL dependencies
run: |
python3 setup.py
python3 rtl/managed/clusterip/setup.py
python3 rtl/ip/setup.py
- name: Set up locked IHP130 PDK
run: make CONFIG=configs/ci/ihp130.mk setup-pdk
- name: Set up locked Tiny ICS55 PDK and PLL
run: make CONFIG=configs/ci/ics55-tiny.mk SOC=TINY PDK=ICS55 setup-pdk
- name: Validate SoC integration topology
run: make check-soc-topology check-user-extensions check-clock-reset-domains
- name: Lint Python
run: ruff check .
- name: Check source formatting
run: make format-check
- name: Check all self-owned RTL style rules
run: make rtl-style-check-all
- name: Check RTL readiness records
run: make rtl-readiness-check-all
- name: Check embedded C safety policy
run: make sw-policy-check
- name: Run embedded C host tests
run: make sw-host-test
- name: Set up locked test tools
uses: ./.github/actions/locked-tools
with:
tools: verilator sv2v iverilog yosys
- name: Set up locked accelerator references
run: make setup-apu-reference setup-apu-kws-reference setup-npu-reference
- name: Test scripts and RTL fixtures
run: python3 -m pytest -q
- name: Lint YAML
run: yamllint .github .yamllint.yml
- name: Install pinned actionlint
env:
GOBIN: ${{ runner.temp }}/actionlint-bin
run: |
go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.12
echo "${GOBIN}" >> "${GITHUB_PATH}"
- name: Lint GitHub Actions
run: actionlint
- name: Validate regression definitions
run: |
python3 scripts/regress.py --root . --suite pr --pdk IHP130 --behavioral-only --dry-run
python3 scripts/regress.py --root . --suite pr --pdk GF180 --behavioral-only --dry-run
python3 scripts/regress.py --root . --suite pr --pdk ICS55 --behavioral-only --dry-run
python3 scripts/regress.py --root . --suite pr --pdk SKY130 --behavioral-only --dry-run
python3 scripts/regress.py --root . --suite nightly --pdk IHP130 --behavioral-only --dry-run
python3 scripts/regress.py --root . --suite nightly-extra --pdk IHP130 --behavioral-only --dry-run
python3 scripts/regress.py --root . --suite smoke --pdk IHP130 --dry-run