Add DRC check GH action

This commit is contained in:
Marco Massarelli 2023-05-10 14:24:07 -04:00
parent 8405b06d2f
commit 5a1fa1e2c6
1 changed files with 24 additions and 0 deletions

24
.github/actions/run-drc/action.yaml vendored Normal file
View File

@ -0,0 +1,24 @@
name: 'Run DRC'
description: 'Run Design Rules Check on generated PCB'
inputs:
boards:
description: Bboard names'
required: true
runs:
using: 'docker'
image: 'docker://soundmonster/kicad-automation-scripts:latest'
entrypoint: '/bin/sh'
args:
- '-c'
# GH actions set $HOME to a weird location and we have to move Kicad settings there first
- |
mkdir -p $HOME/.config/kicad ;
cp /root/.config/kicad/* $HOME/.config/kicad ;
for board in ${{ inputs.boards }};
do
/usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/run_drc.py $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_routed.kicad_pcb $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_drc/
echo "## DRC result $board" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
cat $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}_drc/drc_result.rpt >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
done