-
Notifications
You must be signed in to change notification settings - Fork 149
43 lines (33 loc) · 1.32 KB
/
EBeam_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
name: EBeam Tests
on:
push:
branches:
- '**'
pull_request:
branches:
- master
jobs:
ebeam-lib-pcell-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Pull siepic_klayout image
run: docker pull ghcr.io/farihais/siepic_klayout:latest
- name: Run docker container from image
run: docker run -itd --name ebeam_test -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --security-opt label=type:container_runtime_t ghcr.io/farihais/siepic_klayout:latest
- name: Copy pymacros folder to docker container
run: docker cp $GITHUB_WORKSPACE/klayout/EBeam/pymacros ebeam_test:/home/pymacros
- name: Run KLayout Python script inside container and capture exit code
run: docker exec ebeam_test klayout -zz -r pymacros/EBeam_Lib_PCellTests.py || echo "KLAYOUT_EXIT_CODE=$?" >> $GITHUB_ENV
continue-on-error: true
- name: Stop container and remove it
run: |
docker stop ebeam_test
docker rm ebeam_test
- name: Fail job if exit code is non-zero
run: |
if [ $KLAYOUT_EXIT_CODE -ne 0 ]; then
echo "KLayout exited with non-zero exit code"
exit 1
fi