Skip to content

lvs: store translated file in tmp dir #46

lvs: store translated file in tmp dir

lvs: store translated file in tmp dir #46

Workflow file for this run

# 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: LVS 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/lvs/**'
workflow_dispatch:
jobs:
build_lvs-matrix:
runs-on: ubuntu-latest
outputs:
lvs_categories: ${{ steps.set-matrix.outputs.lvs_categories }}
steps:
- uses: actions/checkout@v6
- id: set-matrix
run: |
cd klayout/lvs/testing/unit/
lvs_categories=$(find . -maxdepth 1 -type d ! -name '.' ! -name '__pycache__' | sed 's|^\./||' | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "lvs_categories=$lvs_categories" >> $GITHUB_OUTPUT
echo "Found categories: $lvs_categories"
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
lvs_regression:
needs: [build_lvs-matrix, setup_klayout]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
category: ${{ fromJson(needs.build_lvs-matrix.outputs.lvs_categories) }}
name: LVS | ${{ matrix.category }}
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 LVS for ${{ matrix.category }}
run: |
cd klayout/lvs/testing/
pytest --category=${{ matrix.category }}