github/workflows: preview wrapper, remove webgl
diff --git a/.github/workflows/user_project_ci.yml b/.github/workflows/user_project_ci.yml
index 8093c7d..84e4bed 100644
--- a/.github/workflows/user_project_ci.yml
+++ b/.github/workflows/user_project_ci.yml
@@ -247,66 +247,27 @@
python -m pip install gdstk
python << EOF
import gdstk
- library = gdstk.read_gds('gds/tiny_user_project.gds')
+ library = gdstk.read_gds('gds/user_project_wrapper.gds')
top_cells = library.top_level()
- top_cells[0].write_svg('tiny_user_project.svg')
+ top_cells[0].write_svg('user_project_wrapper.svg')
EOF
- name: convert to png
run: |
python -m pip install cairosvg
python << EOF
import cairosvg
- cairosvg.svg2png(url='tiny_user_project.svg', write_to='tiny_user_project.png')
+ cairosvg.svg2png(url='user_project_wrapper.svg', write_to='user_project_wrapper.png')
EOF
- name: populate img cache
uses: actions/cache@v3
with:
- path: 'tiny_user_project.png'
+ path: 'user_project_wrapper.png'
key: ${{ runner.os }}-img-${{ github.run_id }}
- webgl:
- needs: gds
- runs-on: ubuntu-latest
- steps:
- - name: checkout repo
- uses: actions/checkout@v3
- with:
- repository: s-holst/GDS2WebGL
- - name: setup python
- uses: actions/setup-python@v4
- with:
- python-version: '3.10'
- - name: restore gds cache
- uses: actions/cache@v3
- with:
- path: |
- def/
- gds/
- lef/
- mag/
- maglef/
- sdc/
- sdf/
- signoff/
- spef/
- spi/
- verilog/
- key: ${{ runner.os }}-gds-${{ github.run_id }}
- - name: GDS2WebGL
- run: |
- python -m pip install gdspy pyclipper mapbox_earcut
- python gds2webgl.py -i gds/tiny_user_project.gds -o index.html
- - name: populate webgl cache
- uses: actions/cache@v3
- with:
- path: 'index.html'
- key: ${{ runner.os }}-webgl-${{ github.run_id }}
-
pages:
if: github.ref_name == 'main'
needs:
- svg
- - webgl
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
@@ -317,13 +278,8 @@
- name: restore img cache
uses: actions/cache@v3
with:
- path: 'tiny_user_project.png'
+ path: 'user_project_wrapper.png'
key: ${{ runner.os }}-img-${{ github.run_id }}
- - name: restore webgl cache
- uses: actions/cache@v3
- with:
- path: 'index.html'
- key: ${{ runner.os }}-webgl-${{ github.run_id }}
- name: setup pages
uses: actions/configure-pages@v2
- name: upload artifact
@@ -340,11 +296,9 @@
steps:
- name: add gds preview
run: |
- PAGE_URL=${{ needs.pages.outputs.page_url }}
+ PAGE_URL=${{ needs.pages.outputs.page_url }}
PAGE_URL=$(echo "$PAGE_URL" | sed -e 's/\/$//')
cat << EOF >> $GITHUB_STEP_SUMMARY
# layout
- ![layout]($PAGE_URL/tiny_user_project.png)
- # webgl
- [open preview]($PAGE_URL)
+ ![layout]($PAGE_URL/user_project_wrapper.png)
EOF