-
Notifications
You must be signed in to change notification settings - Fork 110
189 lines (167 loc) · 5.94 KB
/
verify_latest_tools_versions.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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#This flow will build the latest docker image, test the OpenFASOC generators (only drc and lvs for now) in it and if it works, update the readme file and push it to the docker hub for reference
name: Build and test with the latest version of tools set
on:
#push:
#pull_request:
workflow_dispatch:
schedule:
- cron: 0 1 * * * # run at 1 AM UTC
jobs:
build_docker_image:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build the docker image
env:
IMAGE_NAME: msaligane/openfasoc:alpha
run: |
cd $GITHUB_WORKSPACE/docker/conda
docker build -t $IMAGE_NAME .
docker push $IMAGE_NAME
sky130hd_temp:
needs: build_docker_image
runs-on: ubuntu-latest
steps:
- name: Remove unnecessary files
run: |
du . -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
du . -h
- name: Checkout repo
uses: actions/checkout@v2
- name: Test sky130hd Temp sensor
env:
IMAGE_NAME: msaligane/openfasoc:alpha
run: |
cd $GITHUB_WORKSPACE
touch file.log
docker run --rm \
-v $PWD:$PWD\
-w $PWD\
$IMAGE_NAME\
bash -c "\
pip3 install -r requirements.txt &&\
cd ./openfasoc/generators/temp-sense-gen &&\
make sky130hd_temp\
" && exit_code=$? | tee -a file.log
if [ $? -ne 0 ]; then exit 1; fi
if grep "\[ERROR\]" file.log; then exit 1; else exit 0; fi
sky130hd_ldoGen:
needs: build_docker_image
runs-on: ubuntu-latest
steps:
- name: Remove unnecessary files
run: |
du . -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
du . -h
- name: Checkout repo
uses: actions/checkout@v2
# - name: Test sky130hvl LDO
# env:
# IMAGE_NAME: msaligane/openfasoc:alpha
# run: |
# cd $GITHUB_WORKSPACE
# touch file.log
# docker run --rm \
# -v $PWD:$PWD\
# -w $PWD\
# $IMAGE_NAME\
# bash -c "\
# cp ./.github/scripts/parse_rpt.py ./openfasoc/generators/ldo-gen/. &&\
# pip3 install -r requirements.txt &&\
# cd ./openfasoc/generators/ldo-gen &&\
# make sky130hvl_ldo &&\
# python3 parse_rpt.py sky130hvl_ldo
# " && exit_code=$? | tee -a file.log
# if [ $? -ne 0 ]; then exit 1; fi
# if grep "\[ERROR\]" file.log; then exit 1; else exit 0; fi
cryoGenerator:
needs: build_docker_image
runs-on: ubuntu-latest
strategy:
matrix:
platform: [sky130hd, sky130hs, sky130hvl]
steps:
- name: Remove unnecessary files
run: |
du . -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
du . -h
- name: Checkout repo
uses: actions/checkout@v2
- name: Test ${{ matrix.platform }} Cryo Gen
env:
IMAGE_NAME: msaligane/openfasoc:stable
run: |
cd $GITHUB_WORKSPACE
touch file.log
docker run --rm \
-v $PWD:$PWD\
-w $PWD\
$IMAGE_NAME\
bash -c "\
cp ./.github/scripts/parse_rpt.py ./openfasoc/generators/cryo-gen/. &&\
pip3 install -r requirements.txt &&\
cd ./openfasoc/generators/cryo-gen &&\
make ${{ matrix.platform }}_cryo &&\
python3 parse_rpt.py ${{ matrix.platform }}
" && exit_code=$? | tee -a file.log
if [ $? -ne 0 ]; then exit 1; fi
if grep "^Error" file.log; then exit 1; else exit 0; fi
update_readme:
needs: [sky130hd_temp,sky130hd_ldoGen,cryoGenerator,build_docker_image]
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Grep the commit numbers of all dependent tools and update README.rst
env:
IMAGE_NAME: msaligane/openfasoc:alpha
run: |
cd $GITHUB_WORKSPACE
docker run --rm \
-v $PWD:$PWD\
-w $PWD\
$IMAGE_NAME\
bash -c "\
chmod 755 /scripts/extract_conda_versions.sh
/scripts/extract_conda_versions.sh > conda_versions.txt
chmod 755 /scripts/extract_tool_versions.sh
/scripts/extract_tool_versions.sh > versions.txt
/scripts/modify_readme.py"
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push the docker image
env:
IMAGE_NAME: msaligane/openfasoc:stable
run: |
docker tag msaligane/openfasoc:alpha $IMAGE_NAME
docker push $IMAGE_NAME
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.BOT_TOKEN }}
title: "[BOT] Update successful version records of dependencies to the repository"
author: ${{ secrets.BOT_AUTHOR_LINE }}
committer: ${{ secrets.BOT_AUTHOR_LINE }}
body: |
This is an automated PR.
See the individual commits for details.
commit-message: |
[BOT] Update dependencies successful version records in the repository
branch: versions-update-branch
push-to-fork: ${{ secrets.FORK_NAME }}
delete-branch: true