Skip to content

Merge pull request #15 from Scafir/spice_translated_in_tmp #83

Merge pull request #15 from Scafir/spice_translated_in_tmp

Merge pull request #15 from Scafir/spice_translated_in_tmp #83

# Copyright 2022 GlobalFoundries PDK Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: DRC regression testing
# Prevent keeping resources busy when a branch/PR is updated
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
pull_request:
paths:
- 'klayout/drc/**'
workflow_dispatch:
jobs:
build_drc-matrix:
runs-on: ubuntu-latest
outputs:
drc_table: ${{ steps.set-matrix.outputs.drc_table }}
steps:
- uses: actions/checkout@v6
- id: set-matrix
run: |
cd klayout/drc/rule_decks/
drc_table=`echo '[' ; find -iname '*.drc' -a ! -iname 'main.drc' -a ! -iname 'tail.drc' -a ! -iname 'layers_def.drc' ! -iname '*_split.drc' | tr '\n' ','|sed -e 's/^/\"/'| sed -e 's/,$/\"]/'|sed -e 's/,/\", \"/g'`
drc_table="${drc_table//'./'/}"; drc_table="${drc_table//'"", '/}"; drc_table="${drc_table//'.drc'/}";
drc_table=`echo $drc_table | jq -c .`
echo $drc_table
echo "drc_table=$drc_table" >>$GITHUB_OUTPUT
setup_klayout:
runs-on: ubuntu-latest
steps:
- name: 💾 Restore KLayout .deb from cache
id: cache-klayout
uses: actions/cache@v5
with:
path: klayout_0.30.5-1_amd64.deb
key: klayout-deb-cache-ubuntu-0_30_5
- name: Download KLayout .deb if not cached
if: steps.cache-klayout.outputs.cache-hit != 'true'
run: |
curl -L --retry 5 --retry-delay 5 --retry-all-errors \
-o klayout_0.30.5-1_amd64.deb \
https://www.klayout.org/downloads/Ubuntu-24/klayout_0.30.5-1_amd64.deb
drc_regression:
needs: [build_drc-matrix, setup_klayout]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
part: [drc]
test: ${{ fromJson(needs.build_drc-matrix.outputs.drc_table) }}
name: ${{ matrix.part }} | ${{ matrix.test }}
steps:
- uses: actions/checkout@v6
- name: Restore KLayout .deb from cache
uses: actions/cache@v5
with:
path: klayout_0.30.5-1_amd64.deb
key: klayout-deb-cache-ubuntu-0_30_5
- name: Install KLayout
run: sudo apt-get update && sudo apt-get install ./klayout_0.30.5-1_amd64.deb
- name: Get dependencies
run: |
pip install -r requirements.txt
- name: Testing ${{ matrix.part }} for ${{ matrix.test }}
run: |
make test-"$(python -c 'print("${{ matrix.part }}".upper())')"-${{ matrix.test }}
drc_switch:
needs: setup_klayout
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { tool: klayout, part: drc, test: switch }
name: ${{ matrix.part }} | ${{ matrix.test }}
steps:
- uses: actions/checkout@v6
- name: Restore KLayout .deb from cache
uses: actions/cache@v5
with:
path: klayout_0.30.5-1_amd64.deb
key: klayout-deb-cache-ubuntu-0_30_5
- name: Install KLayout
run: sudo apt-get update && sudo apt-get install ./klayout_0.30.5-1_amd64.deb
- name: Get dependencies
run: |
pip install -r requirements.txt
- name: Testing ${{ matrix.part }} for ${{ matrix.test }}
run: |
make test-"$(python -c 'print("${{ matrix.part }}".upper())')"-${{ matrix.test }}