diff --git a/.github/actions/run-drc/action.yaml b/.github/actions/run-drc/action.yaml new file mode 100644 index 0000000..e30beb1 --- /dev/null +++ b/.github/actions/run-drc/action.yaml @@ -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