-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (103 loc) · 3.52 KB
/
integration-tests.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
##
## --------------------------------------------------------------------------------
## SPDX-FileCopyrightText: 2024 Martin Jan Köhler and Harald Pretl
## Johannes Kepler University, Institute for Integrated Circuits.
##
## This file is part of KPEX
## (see https://github.com/martinjankoehler/klayout-pex).
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
## SPDX-License-Identifier: GPL-3.0-or-later
## --------------------------------------------------------------------------------
##
name: "Integration tests"
on:
workflow_call:
workflow_dispatch:
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/integration-tests.yml'
env:
KLAYOUT_DEB: "klayout_0.29.10-1_amd64.deb"
KLAYOUT_URL: "https://www.klayout.org/downloads/Ubuntu-22/klayout_0.29.10-1_amd64.deb"
jobs:
run-tests:
name: "Run integration tests"
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: "Cache klayout deb 📦 download"
id: cache-klayout-deb
uses: actions/cache@v4
with:
path: klayout-deb
key: ${{ runner.os }}-klayout-deb
- name: "Download klayout deb 📦"
if: steps.cache-klayout-deb.outputs.cache-hit != 'true'
run: |
mkdir -p klayout-deb
pushd klayout-deb
wget "$KLAYOUT_URL"
popd
- name: "Install klayout deb 📦"
run: |
pushd klayout-deb
sudo apt-get update
sudo apt-get install ./$KLAYOUT_DEB
popd
- name: "KLayout version check"
run: |
klayout -v
- name: "Download and merge Python dist artifacts"
uses: actions/download-artifact@v4
with:
pattern: python-dist-ubuntu-latest*
merge-multiple: true
path: dist # destination
- name: "Install 🐍 Wheel"
run: |
pip install dist/*ubuntu-.whl
- name: "KPEX version check"
run: |
kpex --version
# run-inside-docker:
# name: "Run tests"
# runs-on: ubuntu-latest
# continue-on-error: true
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Generate Cache Key from Dockerfiles
# id: generate_cache_key
# run: |
# files="./tests/fixtures/docker-compose.yml"
# file_contents=$(cat $files)
# key=$(echo "${file_contents}" | sha1sum | awk '{print $1}')
# echo "key=${key}" >> "$GITHUB_OUTPUT"
#
# - name: "Cache Docker images"
# uses: ScribeMD/[email protected]
# with:
# key: docker-${{ runner.os }}-integration-tests-${{ steps.generate_cache_key.outputs.key }}
#
# - name: "Install Docker and run tests"
# uses: adambirds/[email protected]
# with:
# compose-file: "./tests/fixtures/docker-compose.yml"
# test-container: iic-osic-tools
# test-command: --skip ./run_integration_tests.sh
# continue-on-error: true # ensure docker cache is written nevertheless