Update based off work done in diceshaker.
This commit is contained in:
@@ -5,13 +5,18 @@ workflow:
|
||||
when: never
|
||||
- if: $CI_COMMIT_BRANCH
|
||||
|
||||
variables:
|
||||
GIT_STRATEGY: clone
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
GIT_SUBMODULE_DEPTH: 1
|
||||
GIT_SUBMODULE_FORCE_HTTPS: "true"
|
||||
|
||||
stages:
|
||||
- run_erc
|
||||
- run_drc
|
||||
- gen_mech
|
||||
- gen_fab
|
||||
|
||||
image:
|
||||
name: ghcr.io/inti-cmnb/kicad7_auto:latest
|
||||
name: ghcr.io/inti-cmnb/kicad7_auto:1.6.2
|
||||
|
||||
.main_rules:
|
||||
rules:
|
||||
@@ -50,25 +55,34 @@ image:
|
||||
- |
|
||||
for i in $(seq 1 $END)
|
||||
do
|
||||
if [[ ${dir_arr[i-1]} == "./Frame" ]]; then
|
||||
continue
|
||||
fi
|
||||
echo ${dir_arr[i-1]}
|
||||
echo ${sch_arr[i-1]}
|
||||
cd $CI_PROJECT_DIR/${dir_arr[i-1]}
|
||||
kibot -e ${sch_arr[i-1]} -c $CI_PROJECT_DIR/default.kibot.yaml -d $CI_PROJECT_DIR/Fabrication/${dir_arr[i-1]} -s $SUFFIX
|
||||
done
|
||||
- cd $CI_PROJECT_DIR
|
||||
|
||||
panel:
|
||||
- 'SEARCH="boards.json"'
|
||||
- 'SEARCH="_panel.json"'
|
||||
- !reference [.commands, get_dirs]
|
||||
- |
|
||||
for d in $DIRS
|
||||
do
|
||||
echo $d
|
||||
cd $CI_PROJECT_DIR/$d
|
||||
JSON=$(find panel_*.json )
|
||||
JSON=$(find *_panel.json)
|
||||
NAME=$(echo "${JSON%.json}")
|
||||
mkdir panel
|
||||
kikit -p $JSON boards.json panel/$NAME.kicad_pcb
|
||||
touch panel/$NAME.kicad_sch
|
||||
PCB=$(find *.kicad_pcb)
|
||||
mkdir $CI_PROJECT_DIR/$NAME
|
||||
kikit panelize -p $JSON $PCB $CI_PROJECT_DIR/$NAME/$NAME.kicad_pcb
|
||||
touch $CI_PROJECT_DIR/$NAME/$NAME.kicad_sch
|
||||
cp fp-lib-table $CI_PROJECT_DIR/$NAME/
|
||||
python3 $CI_PROJECT_DIR/.scripts/post_panel.py $CI_PROJECT_DIR/$NAME/$NAME.kicad_pro
|
||||
done
|
||||
- cd $CI_PROJECT_DIR
|
||||
|
||||
neo:
|
||||
- 'SEARCH=".kicad_pro"'
|
||||
@@ -76,35 +90,31 @@ image:
|
||||
- |
|
||||
for d in $DIRS
|
||||
do
|
||||
python3 scripts/neo.py $d
|
||||
if [[ $d == "./Frame" ]]; then
|
||||
continue
|
||||
fi
|
||||
echo $d
|
||||
python3 .scripts/neo.py $d
|
||||
done
|
||||
|
||||
.template:
|
||||
rules:
|
||||
- !reference [.main_rules, rules]
|
||||
variables:
|
||||
SUFFIX: ""
|
||||
templates:
|
||||
- if [ $GITLAB_CI == 'true' ]; then git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/Micromelon/kicad-project.git .templates; fi
|
||||
- cd .templates
|
||||
- shopt -s extglob
|
||||
- rm -rf !(*.kicad_wks)
|
||||
- cd $CI_PROJECT_DIR
|
||||
|
||||
output_mech:
|
||||
stage: gen_mech
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- Fabrication/
|
||||
variables:
|
||||
SUFF_MECH: run_erc,run_drc step
|
||||
script:
|
||||
- SUFFIX=$SUFF_MECH
|
||||
- !reference [.commands, kibot]
|
||||
dependencies: []
|
||||
|
||||
.temprc:
|
||||
extends: .template
|
||||
rules:
|
||||
- !reference [.main_rules, rules]
|
||||
- !reference [.dev_rules, rules]
|
||||
|
||||
erc:
|
||||
extends: .temprc
|
||||
stage: run_erc
|
||||
variables:
|
||||
SUFFIX: update_xml,run_drc -i
|
||||
|
||||
drc:
|
||||
extends: .temprc
|
||||
stage: run_drc
|
||||
variables:
|
||||
SUFFIX: update_xml,run_erc -i
|
||||
|
||||
outputs_dev:
|
||||
rules:
|
||||
@@ -115,9 +125,10 @@ outputs_dev:
|
||||
paths:
|
||||
- Fabrication/
|
||||
variables:
|
||||
SUFF_SCH: run_drc,run_erc print_sch step
|
||||
SUFF_PCB: all print_front
|
||||
SUFF_SCH: run_drc print_sch
|
||||
SUFF_PCB: run_erc,update_xml print_front
|
||||
script:
|
||||
- !reference [.commands, templates]
|
||||
- SUFFIX=$SUFF_SCH
|
||||
- !reference [.commands, kibot]
|
||||
- SUFFIX=$SUFF_PCB
|
||||
@@ -128,15 +139,14 @@ outputs_all:
|
||||
rules:
|
||||
- !reference [.main_rules, rules]
|
||||
variables:
|
||||
SUFF_SCH: run_drc,run_erc print_sch step bom
|
||||
SUFF_PCB: all print_front gerbers drill position
|
||||
SUFF_SCH: run_drc sch
|
||||
SUFF_PCB: run_erc,update_xml pcb
|
||||
script:
|
||||
- !reference [.commands, templates]
|
||||
- SUFFIX=$SUFF_SCH
|
||||
- !reference [.commands, kibot]
|
||||
- cd $CI_PROJECT_DIR
|
||||
- !reference [.commands, panel]
|
||||
- SUFFIX=$SUFF_PCB
|
||||
- cd $CI_PROJECT_DIR
|
||||
- !reference [.commands, kibot]
|
||||
- cd $CI_PROJECT_DIR
|
||||
- !reference [.commands, neo]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user