forked from The-OpenROAD-Project/OpenROAD
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-actions-are-odb-files-generated.yml
More file actions
43 lines (39 loc) · 1.14 KB
/
github-actions-are-odb-files-generated.yml
File metadata and controls
43 lines (39 loc) · 1.14 KB
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
name: Check That ODB Files Are Generated
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Are-Odb-Files-Generated:
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }}
steps:
- name: Check out repository code
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: 'recursive'
- name: setup
run: |
python3 -m venv venv
venv/bin/pip install jinja2==3.1.6
- name: Check that ODB Generated Files Are Up To Date
run: |
source venv/bin/activate
cd src/odb/src/codeGenerator/
./generate
if [ -z "$(git status --porcelain)" ]; then
exit 0
else
echo ::group::Non-Empty Git Status Oputput
git status --porcelain
echo ::endgroup::
echo ::group::Non-Empty Git Diff Oputput
git diff
echo ::endgroup::
printf "Your ODB generated files are out of date\n"
printf "run ./generate in the src/odb/src/codeGenerator folder"
exit 1
fi