Skip to content

Commit

Permalink
add linting github flow
Browse files Browse the repository at this point in the history
  • Loading branch information
gadfort committed Jul 11, 2024
1 parent 0eb97f6 commit aa49bf5
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,63 @@ jobs:
python3 -m pip install .[dev]
rm -rf build
codespell
sc_version:
name: Get SiliconCompiler version
runs-on: ubuntu-latest

outputs:
version: ${{ steps.sc_version.outputs.version }}

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Install gallery
run: |
pip3 install --upgrade pip
pip3 install .
- name: Get version
id: sc_version
run: |
echo "version=v$(sc -version)" >> $GITHUB_OUTPUT
docker_image:
needs: sc_version
if: always() && !cancelled()
name: Get tools image
permissions:
contents: write
packages: read
uses: siliconcompiler/siliconcompiler/.github/workflows/docker_image.yml@main
with:
sc_version: ${{ needs.sc_version.outputs.version }}

lint_RTL:
needs: docker_image
name: Check RTL
runs-on: ubuntu-latest

if: always() && !cancelled()
runs-on: ubuntu-latest
container:
image: ${{ needs.docker_image.outputs.sc_tool }}

strategy:
fail-fast: ${{ inputs.fail-fast }}
max-parallel: ${{ inputs.concurrency }}
matrix:
tool: ['verilator']

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Install gallery
run: |
pip3 install --upgrade pip
pip3 install .
- name: Run lint
run: sc-gallery -lint

0 comments on commit aa49bf5

Please sign in to comment.