-
Notifications
You must be signed in to change notification settings - Fork 1
/
.ci.yml
95 lines (89 loc) · 2.89 KB
/
.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
stages:
- code-checks
- test
- build
- deploy
image: $CI_DOCS_DOCKER_IMAGE
type-correctness:
stage: code-checks
image: 'debian:bookworm'
allow_failure: true
script:
- apt update && apt -qqy install pip python3-poetry python3.11
- poetry add mypy fake-bpy-module-4.1==20240604
- poetry install
- poetry run mypy --install-types --non-interactive --disallow-untyped-defs src/
code-formatting:
stage: code-checks
image: 'debian:bookworm'
allow_failure: true
script:
- apt update && apt -qqy install pip python3-poetry python3.11
- poetry add black
- poetry install
- poetry run black --check src/
test:
stage: test
image: 'debian:bookworm'
before_script:
- export PATH=$HOME/.local/bin:$PATH
- mkdir -p logs
- echo 'deb http://deb.debian.org/debian bookworm-backports main' > /etc/apt/sources.list.d/backports.list
- apt-get -qqy update >> logs/debian_install.log
- apt-get -qqy update --fix-missing >> logs/debian_install.log
- apt update && apt -qqy install git pip python3-poetry gerbv inkscape python3.11 pipx >> logs/debian_install.log
- apt-get -qqy install -t bookworm-backports kicad >> logs/debian_install.log
- python3.11 -m pipx install 'git+https://github.com/antmicro/gerber2blend.git'
- python3.11 -m pipx install .
- python3.11 -m pip install 'git+https://github.com/antmicro/kicad-make.git' --break-system-packages
- git clone --quiet https://github.com/antmicro/environment-sensor.git
- git clone --quiet https://github.com/antmicro/hardware-components.git --depth=1
script:
- export PATH=$HOME/.local/bin:$PATH
- export MODEL_LIBRARY_PATHS=$PWD/hardware-components/
- cd environment-sensor
- mkdir fab
- kicad-cli pcb export gerbers --no-protel-ext -o fab/ environment-sensor.kicad_pcb
- kicad-cli pcb export drill --format gerber --excellon-separate-th -o fab/ environment-sensor.kicad_pcb
- kmake bom
- kmake bom --dnp
- kmake pnp
- gerber2blend
- picknblend
artifacts:
paths:
- environment-sensor/assets
- environment-sensor/doc
- environment-sensor/img
- environment-sensor/fab
- environment-sensor/*.kicad*
- environment-sensor/sym-lib-table
- environment-sensor/fp-lib-table
- environment-sensor/README.md
- environment-sensor/LICENSE
- environment-sensor/blendcfg.yaml
docs-build:
stage: build
before_script:
- cd documentation/
- pip3 install -r requirements.txt
- pip3 install sphinxcontrib-mermaid
script:
- cd documentation/
- make html latexpdf
- cp build/latex/*.pdf build/html/
- tar cf ../$CI_DOCS_ARCHIVE -C build/html/ .
artifacts:
paths:
- build
- $CI_DOCS_ARCHIVE
docs-deploy:
variables:
GIT_STRATEGY: none
dependencies:
- docs-build
stage: deploy
script: echo 'Deploying docs'
artifacts:
paths:
- $CI_DOCS_ARCHIVE