Skip to content

Commit 9d7ab9a

Browse files
committed
CI: add ArtistIC to the full-flow CI
1 parent fb59f5b commit 9d7ab9a

File tree

4 files changed

+296
-0
lines changed

4 files changed

+296
-0
lines changed

.github/config/croc_ci.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"general" : {
3+
"chip" : "croc"
4+
},
5+
"gds" : {
6+
"file" : "/fosic/designs/croc/artistic/meerkat_work/croc_chip.gds.gz",
7+
"x_offset_um" : -80,
8+
"y_offset_um" : -80,
9+
"width_um" : 1920,
10+
"height_um" : 1920
11+
},
12+
"image": {
13+
"px_width" : 1920,
14+
"px_height" : 1920,
15+
"overrender_factor" : 4,
16+
"num_segs_width" : 1,
17+
"num_segs_height" : 1
18+
},
19+
"paper": {
20+
"width_cm" : 84.1,
21+
"height_cm" : "-"
22+
},
23+
"colors" : {
24+
"CONT" : {"layer" : "6/0", "color" : "#0000CD", "alpha" : "0.8" },
25+
"M1" : {"layer" : "8/0", "color" : "#0000CD", "alpha" : "0.8" },
26+
"V1" : {"layer" : "19/0", "color" : "#7CCD7C", "alpha" : "0.7" },
27+
"M2" : {"layer" : "10/0", "color" : "#7CCD7C", "alpha" : "0.7" },
28+
"V2" : {"layer" : "29/0", "color" : "#5c0c02", "alpha" : "0.6" },
29+
"M3" : {"layer" : "30/0", "color" : "#5c0c02", "alpha" : "0.6" },
30+
"V3" : {"layer" : "49/0", "color" : "#CD3700", "alpha" : "0.5" },
31+
"M4" : {"layer" : "50/0", "color" : "#CD3700", "alpha" : "0.5" },
32+
"V4" : {"layer" : "66/0", "color" : "#00CD00", "alpha" : "0.5" },
33+
"M5" : {"layer" : "67/0", "color" : "#00CD00", "alpha" : "0.5" },
34+
"TV1" : {"layer" : "125/0", "color" : "#7FFFD4", "alpha" : "0.5" },
35+
"T1" : {"layer" : "126/0", "color" : "#7FFFD4", "alpha" : "0.5" },
36+
"TV2" : {"layer" : "133/0", "color" : "#1E90FF", "alpha" : "0.5" },
37+
"T2" : {"layer" : "134/0", "color" : "#FFFFFF", "alpha" : "0.8" }
38+
},
39+
"work" : {
40+
"dir" : "/fosic/designs/croc/artistic/renderics"
41+
},
42+
"tech" : {
43+
"manifest_version" : 1,
44+
"max_px_tile" : 2500000000,
45+
"pdk" : "ihp13",
46+
"layer_order" : [
47+
"CONT",
48+
"M1",
49+
"V1",
50+
"M2",
51+
"V2",
52+
"M3",
53+
"V3",
54+
"M4",
55+
"V4",
56+
"M5",
57+
"TV1",
58+
"T1",
59+
"TV2",
60+
"T2"
61+
],
62+
"db_unit_nm" : 0.1,
63+
"dry_run" : false
64+
}
65+
}
66+

.github/workflows/full-flow.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
# Author: Philippe Sauter <[email protected]>
6+
# Author: Thomas Benz <[email protected]>
67

78
name: Full-flow
89

@@ -47,3 +48,129 @@ jobs:
4748
name: croc-gds
4849
path: klayout/croc_chip.gds
4950
continue-on-error: true
51+
52+
# Render below (have all in one task to keep the oseda container cached)
53+
- name: Checkout ArtistIC repository
54+
uses: actions/checkout@v4
55+
with:
56+
repository: pulp-platform/artistic
57+
path: artistic
58+
- name: Update package lists and install Inkscape, img2pdf
59+
run: |
60+
sudo apt-get update
61+
sudo apt-get install -y inkscape img2pdf
62+
- name: Customize input logo
63+
run : |
64+
sed "s/#DATE#/$(date '+%Y-%m-%d')/g" doc/artwork/logo_chip.svg > doc/artwork/logo.svg
65+
sed -i "s/#HASH#/$(git rev-parse --short HEAD)/g" doc/artwork/logo.svg
66+
sed -i "s|#REPO#|gh.io/$GITHUB_REPOSITORY|g" doc/artwork/logo.svg
67+
inkscape doc/artwork/logo.svg -w 660 -h 660 -o doc/artwork/logo.png
68+
- name: Upload logo
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: png-logo
72+
path: doc/artwork/logo.png
73+
continue-on-error: true
74+
- name: Install ImageMagick
75+
run: |
76+
sudo apt-get install -y imagemagick
77+
- name: Install packages in OSEDA
78+
uses: ./.github/actions/oseda-cmd
79+
with:
80+
cmd: "pip install gdspy"
81+
- name: Meercat setup, export top-level GDS
82+
uses: ./.github/actions/oseda-cmd
83+
with:
84+
cmd: "ls -lah klayout; cd artistic; mkdir -p meerkat_work; python3 scripts/meerkat_interface.py -i ../../klayout/croc_chip.gds -m croc_tm.gds.gz -g croc_logo.gds -o croc_chip.gds.gz -w meerkat_work -l 134; cd meerkat_work; klayout -zz -rm ../scripts/export_top_metal.py; gzip -d croc_tm.gds.gz"
85+
- name: Upload top-level GDS
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: top-level-gds
89+
path: artistic/meerkat_work/croc_tm.gds
90+
continue-on-error: true
91+
- name: Translate the logo to mono
92+
run: |
93+
convert doc/artwork/logo.png -remap pattern:gray50 artistic/meerkat_work/logo_mono.png
94+
- name: Upload mono logo
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: mono-logo
98+
path: artistic/meerkat_work/logo_mono.png
99+
continue-on-error: true
100+
- name: Generate logo GDS
101+
uses: ./.github/actions/oseda-cmd
102+
with:
103+
cmd: "cd artistic; python3 scripts/meerkat.py -m '112,112,178,178' -i meerkat_work/logo_mono.png -g meerkat_work/croc_tm.gds -l 134 -n croc -s meerkat_work/croc_logo.svg -o meerkat_work/croc_logo.gds"
104+
- name: Upload logo GDS
105+
uses: actions/upload-artifact@v4
106+
with:
107+
name: logo-gds
108+
path: artistic/meerkat_work/croc_logo.gds
109+
continue-on-error: true
110+
- name: Upload logo SVG
111+
uses: actions/upload-artifact@v4
112+
with:
113+
name: logo-svg
114+
path: artistic/meerkat_work/croc_logo.svg
115+
continue-on-error: true
116+
- name: Merge logo GDS with chip GDS
117+
uses: ./.github/actions/oseda-cmd
118+
with:
119+
cmd: "cd artistic; cd meerkat_work; klayout -zz -rm ../scripts/merge_logo.py"
120+
- name: Upload chip GDS
121+
uses: actions/upload-artifact@v4
122+
with:
123+
name: chip-gds
124+
path: artistic/meerkat_work/croc_chip.gds.gz
125+
continue-on-error: true
126+
- name: Prepare render
127+
run: |
128+
mkdir -p artistic/renderics
129+
cp -v .github/config/croc_ci.json artistic/renderics/croc_ci.json
130+
sed "s|/fosic/designs|/home/runner/work/croc|g" artistic/renderics/croc_ci.json > artistic/renderics/croc_ci_runner.json
131+
- name: Analyze render
132+
uses: ./.github/actions/oseda-cmd
133+
with:
134+
cmd: "cd artistic; make analyze CFG_FILE=/fosic/designs/croc/artistic/renderics/croc_ci.json > renderics/analyze.txt"
135+
- name: Upload render summary
136+
uses: actions/upload-artifact@v4
137+
with:
138+
name: render-summary
139+
path: artistic/renderics/analyze.txt
140+
continue-on-error: true
141+
- name: Upload color preview
142+
uses: actions/upload-artifact@v4
143+
with:
144+
name: render-color-preview
145+
path: artistic/renderics/colors_croc.svg
146+
continue-on-error: true
147+
- name: Render b/w layer tiles
148+
uses: ./.github/actions/oseda-cmd
149+
with:
150+
cmd: "cd artistic; make gen_raw CFG_FILE=/fosic/designs/croc/artistic/renderics/croc_ci.json"
151+
- name: Render
152+
run: |
153+
cd artistic; make gen_pdfs CFG_FILE=renderics/croc_ci_runner.json
154+
- name: Finish render
155+
run: |
156+
mv artistic/renderics//DPI__croc_0-0.png artistic/renderics/croc_render.png
157+
mv artistic/renderics//PDF__croc_0-0.pdf artistic/renderics/croc_render.pdf
158+
convert artistic/renderics/croc_render.png artistic/renderics/croc_render.jpg
159+
- name: Upload render PNG
160+
uses: actions/upload-artifact@v4
161+
with:
162+
name: render-png
163+
path: artistic/renderics/croc_render.png
164+
continue-on-error: true
165+
- name: Upload render PDF
166+
uses: actions/upload-artifact@v4
167+
with:
168+
name: render-pdf
169+
path: artistic/renderics/croc_render.pdf
170+
continue-on-error: true
171+
- name: Upload render JPG
172+
uses: actions/upload-artifact@v4
173+
with:
174+
name: render-jpg
175+
path: artistic/renderics/croc_render.jpg
176+
continue-on-error: true

doc/artwork/logo_chip.svg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
logo_template.svg

doc/artwork/logo_template.svg

Lines changed: 102 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)