-
Notifications
You must be signed in to change notification settings - Fork 21
83 lines (76 loc) · 2.16 KB
/
floogen.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright 2024 ETH Zurich and University of Bologna.
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
# SPDX-License-Identifier: SHL-0.51
# Author: Tim Fischer <[email protected]>
name: floogen
on: [push, pull_request]
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Run unit tests
run: |
python -m pytest -v
#####################
# Generate SV files #
#####################
gen-nocs:
runs-on: ubuntu-latest
strategy:
matrix:
examples: ["single_cluster", "occamy_mesh", "occamy_tree"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install floogen
run: |
python -m pip install .
- name: Generate NoCs
run: |
floogen -c floogen/examples/${{ matrix.examples }}.yml -o generated --no-format
- name: Format generated NoCs
uses: chipsalliance/verible-formatter-action@main
with:
files:
./generated/${{ matrix.examples }}_floo_noc.sv
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.examples }}
path: generated/${{ matrix.examples }}_floo_noc.sv
if-no-files-found: error
retention-days: 1
#################
# Lint SV files #
#################
lint-nocs:
runs-on: ubuntu-latest
needs: gen-nocs
steps:
- uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
path: generated
- name: Lint SV files
uses: chipsalliance/verible-linter-action@main
with:
paths:
./generated
github_token: ${{ secrets.GITHUB_TOKEN }}