From 4bdb626ec8f62ad290f0f0f5ba91ccd0dabe19f5 Mon Sep 17 00:00:00 2001 From: Tilman Baumann Date: Fri, 5 May 2023 11:47:34 +0100 Subject: [PATCH] DRC check in github actions --- .github/actions/import-ses/action.yml | 1 - .github/actions/run-drc/action.yml | 20 ++++++++++++++++++++ .github/workflows/build.yml | 11 +++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/actions/run-drc/action.yml diff --git a/.github/actions/import-ses/action.yml b/.github/actions/import-ses/action.yml index 0f4c479..a5d89aa 100644 --- a/.github/actions/import-ses/action.yml +++ b/.github/actions/import-ses/action.yml @@ -21,4 +21,3 @@ runs: mkdir -p $HOME/.config/kicad ; cp /root/.config/kicad/* $HOME/.config/kicad ; /usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/import_ses.py $GITHUB_WORKSPACE/${{ inputs.pcb_input_file }} $GITHUB_WORKSPACE/${{ inputs.ses_file }} --output-file $GITHUB_WORKSPACE/${{ inputs.pcb_output_file }}; - #ls -lh $GITHUB_WORKSPACE/${{ inputs.pcb_input_file }} $GITHUB_WORKSPACE/${{ inputs.ses_file }} diff --git a/.github/actions/run-drc/action.yml b/.github/actions/run-drc/action.yml new file mode 100644 index 0000000..ff4c89e --- /dev/null +++ b/.github/actions/run-drc/action.yml @@ -0,0 +1,20 @@ +name: 'Run DRC' +description: 'Run Design Rules Check on generated PCB' +inputs: + pcb_input_file: + description: 'Kicad input file' + required: true + drc_output: + description: 'DRC output' + 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 ; + /usr/lib/python2.7/dist-packages/kicad-automation/pcbnew_automation/run_drc.py $GITHUB_WORKSPACE/${{ inputs.pcb_input_file }} $GITHUB_WORKSPACE/${{ inputs.drc_file }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4bad72..6801f0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,6 +48,17 @@ jobs: pcb_input_file: output/pcbs/right.kicad_pcb pcb_output_file: output/pcbs/right_routed.kicad_pcb ses_file: output/pcbs/right.ses + - name: Left board DRC check + uses: ./.github/actions/run-drc + with: + pcb_input_file: output/pcbs/left_routed.kicad_pcb + drc_output: output/pcbs/left-drc/ + - name: Right board DRC check + uses: ./.github/actions/run-drc + with: + pcb_input_file: output/pcbs/right_routed.kicad_pcb + drc_output: output/pcbs/right-drc/ + - name: Export Gerbers for Left PCB uses: ./.github/actions/export-gerbers with: