-
Notifications
You must be signed in to change notification settings - Fork 79
59 lines (59 loc) · 1.97 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 2022 OpenHW Group
# Solderpad Hardware License, Version 2.1, see LICENSE.md for details.
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
# Run all lint checks
name: lint
on: [push, pull_request]
env:
VERIBLE_VERSION: 0.0-1824-ga3b5bedf
jobs:
#####################
# Vendor Up-to-Date #
#####################
# Check that all vendored sources are up-to-date.
check-vendor:
name: Vendor Up-to-Date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install requirements
run: pip install -r python-requirements.txt
- name: Re-vendor and diff
run: |
find . \
-name '*.vendor.hjson' \
| xargs -n1 util/vendor.py --verbose \
&& util/git-diff.py --error-msg "::error ::Found differences, please re-vendor."
##################
# MCU Generator #
##################
mcu_generator:
name: Generates sv files
# This job runs on Linux (fixed ubuntu version)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install requirements
run: |
make venv
echo "PATH=`pwd`/.venv/bin:$PATH" >> $GITHUB_ENV
pip install -r python-requirements.txt
- name: Install Verible
run: |
set -e
mkdir -p build/verible
cd build/verible
curl -Ls -o verible.tar.gz https://github.com/google/verible/releases/download/v$VERIBLE_VERSION/verible-v$VERIBLE_VERSION-Ubuntu-18.04-bionic-x86_64.tar.gz
sudo mkdir -p /tools/verible && sudo chmod 777 /tools/verible
tar -C /tools/verible -xf verible.tar.gz --strip-components=1
echo "PATH=$PATH:/tools/verible/bin" >> $GITHUB_ENV
- name: Run Gen
run: |
make mcu-gen
util/git-diff.py --error-msg "::error ::Found differences in SystemVerilog files generated with default configuration."