ato-test/.gitlab-ci.yml

52 lines
1.3 KiB
YAML
Raw Normal View History

2023-11-14 20:03:19 +01:00
stages:
- build
- store
2023-11-26 20:13:57 +01:00
variables:
GIT_SUBMODULE_STRATEGY: recursive
2023-11-14 20:03:19 +01:00
build-gerbers-default:
stage: build
image:
name: kicad/kicad:7.0
2023-11-14 20:03:19 +01:00
pull_policy: if-not-present
script:
- mkdir -p build/default/src
- cd build/default
2023-12-12 03:34:50 +01:00
- cp ../../elec/layout/default/*.kicad_pcb src/
2023-11-14 20:03:19 +01:00
- sed -i "s/"'{{GITHASH}}'"/$CI_COMMIT_SHORT_SHA/g" src/*.kicad_pcb
- mkdir gerbers
- kicad-cli pcb export gerbers -o gerbers/ src/*.kicad_pcb
- kicad-cli pcb export drill -o gerbers/ src/*.kicad_pcb
- zip "gerbers-$CI_COMMIT_SHORT_SHA.zip" gerbers/*
# position files need some massaging for JLCPCB
2023-11-26 20:13:57 +01:00
- kicad-cli pcb export pos --format csv --units mm --use-drill-file-origin -o $CI_COMMIT_SHORT_SHA-pos.csv src/*.kicad_pcb
2023-11-14 20:03:19 +01:00
- POS_HEADER="$(cat ../../metadata/pos-header)"
2023-11-26 20:13:57 +01:00
- sed -i "1s/.*/$POS_HEADER/" $CI_COMMIT_SHORT_SHA-pos.csv
2023-11-14 20:03:19 +01:00
# Export step file
- kicad-cli pcb export step --subst-models -o board_3d_shape.step src/*.kicad_pcb
artifacts:
paths:
- build/
build-ato-default:
stage: build
2023-11-27 02:37:06 +01:00
image: registry.atopile.io/atopile/atopile/ci:latest
2023-11-14 20:03:19 +01:00
script:
2023-12-12 03:26:28 +01:00
- ato install
2023-11-26 20:20:31 +01:00
- ato build
2023-11-14 20:03:19 +01:00
artifacts:
paths:
- build/
store-build:
stage: store
image: alpine
script:
- echo "noop"
artifacts:
paths:
- build/