-
Notifications
You must be signed in to change notification settings - Fork 1
112 lines (96 loc) · 3.09 KB
/
project_submission.yaml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: project_submission
on:
workflow_dispatch:
pull_request:
paths:
- projects/tt_um_*/**
jobs:
check_submission:
name: Check user project submission
runs-on: ubuntu-24.04
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- run: pip install -r tt-multiplexer/py/requirements.txt -r tt/requirements.txt
- name: Update caravel configuration
run: python ./tt/configure.py --update-shuttle
- name: upload shuttle_index.json
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: shuttle_index
path: shuttle_index.json
precheck:
name: Run precheck
if: github.event_name == 'pull_request'
runs-on: ubuntu-24.04
env:
PDK_ROOT: '/home/runner/pdk'
PDK_VERSION: 'e0f692f46654d6c7c99fc70a0c94a080dab53571'
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
shell: bash
working-directory: tt/precheck
run: pip install -r requirements.txt
- name: Install Sky130 PDK
uses: TinyTapeout/volare-action@v2
with:
pdk_name: sky130
pdk_version: ${{ env.PDK_VERSION }}
pdk_root: ${{ env.PDK_ROOT }}
- name: Install Nix
uses: rikhuijzer/cache-install@v1.1.4
with:
key: nix-${{ hashFiles('precheck/default.nix') }}
nix_file: 'tt/precheck/default.nix'
- name: Build Nix packages
shell: bash
working-directory: tt/precheck
run: nix-build
- name: Get all project GDS files that have changed
id: changed-files
uses: tj-actions/changed-files@v42
with:
files: projects/tt_um_*/*.gds
- name: Run precheck
shell: bash
working-directory: tt/precheck
if: steps.changed-files.outputs.any_changed == 'true'
env:
GDS_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for gds_file in $GDS_FILES; do
nix-shell --run "python precheck.py --gds ${{ github.workspace }}/${gds_file}"
done
- name: Test Summary
uses: test-summary/action@v2.3
with:
paths: 'tt/precheck/reports/results.xml'
if: steps.changed-files.outputs.any_changed == 'true'
- name: Capture test results
shell: bash
working-directory: tt/precheck
if: steps.changed-files.outputs.any_changed == 'true'
run: cat reports/results.md >> $GITHUB_STEP_SUMMARY
- name: Upload reports
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/upload-artifact@v4
with:
name: precheck-reports
path: tt/precheck/reports