diff --git a/.github/actions/kibot/action.yaml b/.github/actions/kibot/action.yaml index 8eec905..fe2d991 100644 --- a/.github/actions/kibot/action.yaml +++ b/.github/actions/kibot/action.yaml @@ -4,6 +4,9 @@ inputs: boards: description: 'KiCad PCB names' required: true + config: + description: 'KiBot config file' + required: true runs: using: 'docker' image: 'docker://ghcr.io/inti-cmnb/kicad7_auto:latest' @@ -15,5 +18,5 @@ runs: for board in ${{ inputs.boards }}; do echo Processing $board; - kibot -b $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.kicad_pcb -c $GITHUB_WORKSPACE/kibot/boards.kibot.yaml + kibot -b $GITHUB_WORKSPACE/ergogen/output/pcbs/${board}.kicad_pcb -c $GITHUB_WORKSPACE/kibot/${{ inputs.config }}.kibot.yaml done \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b740c53..5c3ef4f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,10 +36,12 @@ jobs: uses: ./.github/actions/kibot with: boards: frontplate backplate controller_overlay + config: default - name: Run KiBot to generate images, gerbers for the unrouted board uses: ./.github/actions/kibot with: boards: corney_island + config: plates - name: Export DSN file for Freerouting uses: ./.github/actions/export-dsn with: @@ -56,6 +58,7 @@ jobs: uses: ./.github/actions/kibot with: boards: corney_island_autorouted + config: boards - name: Persist output uses: actions/upload-artifact@v3 with: diff --git a/build.sh b/build.sh index aeb21a2..cccd11f 100755 --- a/build.sh +++ b/build.sh @@ -40,7 +40,7 @@ fi for plate in ${plates} do echo "\n\n>>>>>> Processing $plate <<<<<<\n\n" - ${container_cmd} run ${container_args} ghcr.io/inti-cmnb/kicad7_auto:latest kibot -b ergogen/output/pcbs/${plate}.kicad_pcb -c kibot/boards.kibot.yaml + ${container_cmd} run ${container_args} ghcr.io/inti-cmnb/kicad7_auto:latest kibot -b ergogen/output/pcbs/${plate}.kicad_pcb -c kibot/default.kibot.yaml done for board in ${boards} @@ -53,12 +53,12 @@ do if [ -e ergogen/output/pcbs/${board}.kicad_pcb ]; then echo Export DSN ${container_cmd} run ${container_args} ghcr.io/inti-cmnb/kicad7_auto:latest kibot/export_dsn.py -b ergogen/output/pcbs/${board}.kicad_pcb -o ergogen/output/pcbs/${board}.dsn - ${container_cmd} run ${container_args} ghcr.io/inti-cmnb/kicad7_auto:latest kibot -b ergogen/output/pcbs/${board}.kicad_pcb -c kibot/boards.kibot.yaml + ${container_cmd} run ${container_args} ghcr.io/inti-cmnb/kicad7_auto:latest kibot -b ergogen/output/pcbs/${board}.kicad_pcb -c kibot/default.kibot.yaml fi if [ -e ergogen/output/pcbs/${board}.dsn ]; then echo Autoroute PCB - # java -jar freerouting/freerouting-1.8.0.jar -de ergogen/output/pcbs/${board}.dsn -do ergogen/output/pcbs/${board}.ses -dr freerouting/corney_island.rules - ${container_cmd} run ${container_args} soundmonster/freerouting_cli:v0.1.0 java -jar /opt/freerouting_cli.jar -de ergogen/output/pcbs/${board}.dsn -do ergogen/output/pcbs/${board}.ses -dr freerouting/corney_island.rules + # java -jar freerouting/freerouting-1.8.0.jar -de ergogen/output/pcbs/${board}.dsn -do ergogen/output/pcbs/${board}.ses -dr freerouting/freerouting.rules + ${container_cmd} run ${container_args} soundmonster/freerouting_cli:v0.1.0 java -jar /opt/freerouting_cli.jar -de ergogen/output/pcbs/${board}.dsn -do ergogen/output/pcbs/${board}.ses -dr freerouting/freerouting.rules -mp 30 fi if [ -e ergogen/output/pcbs/${board}.ses ]; then echo "Import SES" @@ -67,4 +67,4 @@ do if [ -e ergogen/output/pcbs/${board}_autorouted.kicad_pcb ]; then ${container_cmd} run ${container_args} ghcr.io/inti-cmnb/kicad7_auto:latest kibot -b ergogen/output/pcbs/${board}_autorouted.kicad_pcb -c kibot/boards.kibot.yaml fi -done +done \ No newline at end of file diff --git a/kibot/boards.kibot.yaml b/kibot/boards.kibot.yaml index c705873..6a4bb5d 100644 --- a/kibot/boards.kibot.yaml +++ b/kibot/boards.kibot.yaml @@ -1,84 +1,27 @@ -# Gerber and drill files for JLCPCB, without stencil, plus board images -# URL: https://jlcpcb.com/help/article/16-How-to-generate-Gerber-and-Drill-files-in-KiCad-6 - kibot: version: 1 preflight: run_erc: false # There are no sch files generated by Ergogen - run_drc: false # Keeping it off for the moment, too many errors due to footprints + run_drc: true check_zone_fills: false # There are no zones to fill ignore_unconnected: false # Auto-routing doesn't always connect all traces + filters: + - filter: 'Ignore library warnings' + error: 'lib_footprint_issues' -outputs: - - name: jlcpcb_gerbers - comment: Gerbers compatible with JLCPCB - type: gerber - dir: ergogen/output/gerbers/%f - options: &gerber_options - exclude_edge_layer: true - exclude_pads_from_silkscreen: true - plot_sheet_reference: false - plot_footprint_refs: true - plot_footprint_values: false - force_plot_invisible_refs_vals: false - tent_vias: true - use_protel_extensions: true - create_gerber_job_file: false - disable_aperture_macros: true - gerber_precision: 4.6 - use_gerber_x2_attributes: false - use_gerber_net_attributes: false - line_width: 0.1 - subtract_mask_from_silk: true - layers: - - F.Cu - - B.Cu - - F.SilkS - - B.SilkS - - F.Mask - - B.Mask - - Edge.Cuts +global: + filters: + - number: 58 + regex: 'copper_edge_clearance' + - number: 8 + regex: 'Unable to find KiCad configuration file' + - number: 10 + regex: 'Unable to find KiCad user templates' + - number: 10 + regex: 'Unable to find KiCad 3D models' + - number: 58 + regex: 'KiCad project file not found|Missing KiCad main config file' - - name: jlcpcb_drill - comment: Drill files compatible with JLCPCB - type: excellon - dir: ergogen/output/gerbers/%f - options: - mirror_y_axis: false - minimal_header: false - pth_and_npth_single_file: false - route_mode_for_oval_holes: false - map: gerber - use_aux_axis_as_origin: false - metric_units: true - zeros_format: 'DECIMAL_FORMAT' - - - name: jlcpcb - comment: ZIP file for JLCPCB gerbers - type: compress - dir: ergogen/output/gerbers - options: - files: - - from_output: jlcpcb_gerbers - dest: / - - from_output: jlcpcb_drill - dest: / - output: '%f.%x' - - - name: top_view - comment: "Top view of the PCB" - type: pcbdraw - dir: ergogen/output/images - options: - format: png - style: oshpark-afterdark - margin: 5 - - - name: bottom_view - comment: "Bottom view of the PCB" - type: pcbdraw - dir: ergogen/output/images - extends: top_view - options: - bottom: true +import: + - ./default.kibot.yaml diff --git a/kibot/default.kibot.yaml b/kibot/default.kibot.yaml new file mode 100644 index 0000000..6b41b05 --- /dev/null +++ b/kibot/default.kibot.yaml @@ -0,0 +1,84 @@ +# Gerber and drill files for JLCPCB, without stencil, plus board images +# URL: https://jlcpcb.com/help/article/16-How-to-generate-Gerber-and-Drill-files-in-KiCad-6 + +kibot: + version: 1 + +preflight: + run_erc: false + run_drc: false + check_zone_fills: false + ignore_unconnected: false + +outputs: + - name: jlcpcb_gerbers + comment: Gerbers compatible with JLCPCB + type: gerber + dir: ergogen/output/gerbers/%f + options: &gerber_options + exclude_edge_layer: true + exclude_pads_from_silkscreen: true + plot_sheet_reference: false + plot_footprint_refs: true + plot_footprint_values: false + force_plot_invisible_refs_vals: false + tent_vias: true + use_protel_extensions: true + create_gerber_job_file: false + disable_aperture_macros: true + gerber_precision: 4.6 + use_gerber_x2_attributes: false + use_gerber_net_attributes: false + line_width: 0.1 + subtract_mask_from_silk: true + layers: + - F.Cu + - B.Cu + - F.SilkS + - B.SilkS + - F.Mask + - B.Mask + - Edge.Cuts + + - name: jlcpcb_drill + comment: Drill files compatible with JLCPCB + type: excellon + dir: ergogen/output/gerbers/%f + options: + mirror_y_axis: false + minimal_header: false + pth_and_npth_single_file: false + route_mode_for_oval_holes: false + map: gerber + use_aux_axis_as_origin: false + metric_units: true + zeros_format: 'DECIMAL_FORMAT' + + - name: jlcpcb + comment: ZIP file for JLCPCB gerbers + type: compress + dir: ergogen/output/gerbers + options: + files: + - from_output: jlcpcb_gerbers + dest: / + - from_output: jlcpcb_drill + dest: / + output: '%f.%x' + + - name: top_view + comment: "Top view of the PCB" + type: pcbdraw + dir: ergogen/output/images + options: + format: png + style: oshpark-afterdark + margin: 5 + + - name: bottom_view + comment: "Bottom view of the PCB" + type: pcbdraw + dir: ergogen/output/images + extends: top_view + options: + bottom: true