-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy path.gitlab-ci.yml
98 lines (89 loc) · 2.37 KB
/
.gitlab-ci.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
stages:
- docker-base-image
- test
- export
- docker-image
variables:
DOCKER_TAG: latest
build-docker-base-image:
stage: docker-base-image
tags:
- runnersv2-shell
only:
changes:
- Dockerfile-base
- config/*
- src/requirements.txt
before_script:
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USER --password-stdin
script:
- docker build -f Dockerfile-base -t productize/kicad-automation-base:$DOCKER_TAG .
- docker push productize/kicad-automation-base
test-erc:
image: productize/kicad-automation-base
tags:
- docker
script:
- ./src/eeschema/schematic.py run_erc ./test-projects/good-project/good-project.sch output
stage: test
artifacts:
paths:
- output
expire_in: 1 day
test-erc-warning:
image: productize/kicad-automation-base
tags:
- runner-v11.2
script:
- ./src/eeschema/schematic.py run_erc ./test-projects/warning-project/warning-project.sch output
stage: test
export-schematic-pdf:
image: productize/kicad-automation-base
tags:
- docker
script:
- ./src/eeschema/schematic.py export -a -f pdf ./test-projects/good-project/good-project.sch output
stage: export
artifacts:
paths:
- output
expire_in: 1 day
test-drc:
image: productize/kicad-automation-base
tags:
- docker
script:
- ./src/pcbnew_automation/run_drc.py ./test-projects/good-project/good-project.kicad_pcb output
stage: test
export-layout-gerbers:
image: productize/kicad-automation-base
tags:
- docker
script:
- ./src/pcbnew_automation/plot.py ./test-projects/good-project/good-project.kicad_pcb plot
stage: export
artifacts:
paths:
- plot
expire_in: 1 day
export-layout-pdf:
image: productize/kicad-automation-base
tags:
- docker
script:
- ./src/pcbnew_automation/plot.py -f pdf ./test-projects/good-project/good-project.kicad_pcb plot
- ./src/pcbnew_automation/plot.py -f pdf ./test-projects/good-project/good-project.kicad_pcb plot Dwgs.User
stage: export
artifacts:
paths:
- plot
expire_in: 1 day
build-docker-image:
stage: docker-image
tags:
- runnersv2-shell
before_script:
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USER --password-stdin
script:
- docker build -t productize/kicad-automation-scripts --build-arg base_tag=$DOCKER_TAG .
- docker push productize/kicad-automation-scripts