From 2f6f4361ccd54c273583195bb1bda7d122bf9ebf Mon Sep 17 00:00:00 2001 From: Jesse R Codling Date: Fri, 23 Aug 2024 12:35:20 -0400 Subject: [PATCH] New KiBot-less actions KiBot was both slowing things down and complicated things now that combinations of KiKit and the native KiCad CLI are both sufficient and easier. Also splits the JLCPCB fab generation to only happen on pushes to master Include merge_group for status checks Never needing "full" container image All use KiCad 8 2 workflows, 0 KiBots Force KiCad container as root? Try copying the config folder to root? Copy with mkdir first... Use KiKit container for all? Separate DRC, Schematic, and Layouts uploads README badge update --- .github/workflows/docs.yml | 69 +++++++++++ .github/workflows/{exports.yml => jlc.yml} | 34 +++--- README.md | 2 +- docs.kibot.yaml | 134 --------------------- 4 files changed, 84 insertions(+), 155 deletions(-) create mode 100644 .github/workflows/docs.yml rename .github/workflows/{exports.yml => jlc.yml} (59%) delete mode 100644 docs.kibot.yaml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..8870937 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,69 @@ +# This is a basic workflow to help you get started with Actions + +name: Design Rules Check + +# Controls when the action will run. +on: + # Run when any design files are changed + push: + paths: + - '**.kicad_sch' + - '**.kicad_pcb' + - '**.kicad_pro' + - '.github/**.yml' + pull_request: + paths: + - '**.kicad_sch' + - '**.kicad_pcb' + - '**.kicad_pro' + - '.github/**.yml' + merge_group: + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: +#jobs: + drc: + runs-on: ubuntu-latest + container: docker.io/yaqwsx/kikit:nightly-v8 + steps: + - uses: actions/checkout@v4 + + - run: kikit drc run GeoMCU.kicad_pcb + name: Run DRC with KiKit + docs: + runs-on: ubuntu-latest + container: docker.io/yaqwsx/kikit:nightly-v8 + steps: + - uses: actions/checkout@v4 + + - run: mkdir -p docs/ + + - name: Export Schematic PDF + run: kicad-cli sch export pdf GeoMCU.kicad_sch -o docs/GeoMCU-schematic.pdf + + - name: Export Layout PDFs + run: | + mkdir -p docs/ + kicad-cli pcb export pdf --include-border-title GeoMCU.kicad_pcb -o docs/GeoMCU-F_Cu.pdf --layers="F.Cu,User.Drawings,User.Comments,Edge.Cuts" + kicad-cli pcb export pdf --include-border-title GeoMCU.kicad_pcb -o docs/GeoMCU-In1_Cu.pdf --layers="In1.Cu,User.Drawings,User.Comments,Edge.Cuts" + kicad-cli pcb export pdf --include-border-title GeoMCU.kicad_pcb -o docs/GeoMCU-In2_Cu.pdf --layers="In2.Cu,User.Drawings,User.Comments,Edge.Cuts" + kicad-cli pcb export pdf --include-border-title GeoMCU.kicad_pcb -o docs/GeoMCU-B_Cu.pdf --layers="B.Cu,User.Drawings,User.Comments,Edge.Cuts" --mirror + + + - name: Google Chat Notification + uses: SimonScholz/google-chat-action@main + if: always() + with: + title: PDF Exports + webhookUrl: ${{ secrets.PIGHARDWARE_GCHAT_WEBHOOK_URL }} + jobStatus: ${{ job.status }} + + - name: Artifacts Upload + uses: actions/upload-artifact@v4 + if: always() + with: + name: Viewable Docs + path: docs diff --git a/.github/workflows/exports.yml b/.github/workflows/jlc.yml similarity index 59% rename from .github/workflows/exports.yml rename to .github/workflows/jlc.yml index c3b0332..20afbf0 100644 --- a/.github/workflows/exports.yml +++ b/.github/workflows/jlc.yml @@ -1,6 +1,6 @@ # This is a basic workflow to help you get started with Actions -name: KiCad Exports +name: JLCPCB Exports # Controls when the action will run. on: @@ -10,11 +10,11 @@ on: - '**.kicad_sch' - '**.kicad_pcb' - '**.kicad_pro' - pull_request: - paths: - - '**.kicad_sch' - - '**.kicad_pcb' - - '**.kicad_pro' + - '.github/workflows/jlc.yml' + branches: + - "main" + tags: + - "v*" # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -22,33 +22,27 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: #jobs: - exports: + jlc_fab: runs-on: ubuntu-latest - container: ghcr.io/inti-cmnb/kicad7_auto_full:latest + container: docker.io/yaqwsx/kikit:nightly-v8 steps: - uses: actions/checkout@v4 - - name: KiBot Docs Export - uses: INTI-CMNB/KiBot@v2_k7 - with: - # Required - kibot config file - config: docs.kibot.yaml - # optional - prefix to output defined in config - dir: docs - # optional - verbose output info - verbose: 1 + - run: | + kikit fab jlcpcb GeoMCU.kicad_pcb --assembly --field LCSC --schematic GeoMCU.kicad_sch docs/ + rm docs/gerbers.zip - name: Google Chat Notification uses: SimonScholz/google-chat-action@main if: always() with: - title: Fab Exports + title: JLCPCB Fab Exports webhookUrl: ${{ secrets.PIGHARDWARE_GCHAT_WEBHOOK_URL }} jobStatus: ${{ job.status }} - name: Artifacts Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: - name: docs + name: fab_JLCPCB path: docs diff --git a/README.md b/README.md index 39ecb42..1145f61 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Docs Export](https://github.com/NohPei/GeoMCU/actions/workflows/exports.yml/badge.svg) +![Design Rules Check](https://github.com/NohPei/GeoMCU/actions/workflows/docs.yml/badge.svg) # GeoMCU Board Interface board for Structure-as-Sensor Geophones with embedded Microcontroller. diff --git a/docs.kibot.yaml b/docs.kibot.yaml deleted file mode 100644 index 70d2650..0000000 --- a/docs.kibot.yaml +++ /dev/null @@ -1,134 +0,0 @@ -kibot: - version: 1 - - -preflight: - check_zone_fills: true - run_erc: true - erc_warnings: true - run_drc: true - ignore_unconnected: false - -global: - output: "%p-rev%r_%DT%T-%i.%x" - -# excludes fiducials, test points, logos, and power -filters: - - name: 'exclude_any' - type: 'generic' - comment: 'Exclude logos, fiducials and power' - exclude_any: - - column: Reference - regex: '^(G|#|F).*' - -outputs: - - name: 'print_sch' - comment: "Print schematic (PDF)" - type: pdf_sch_print - dir: . - - - name: 'print_front' - comment: "Print F.Cu+Dwgs.User" - type: pdf_pcb_print - dir: . - layers: - - 'F.Cu' - - 'user' - - - name: 'print_bottom' - comment: "Print B.Cu+Dwgs.User" - type: pdf_pcb_print - dir: . - layers: - - 'B.Cu' - - 'user' - - - name: 'print_in1' - comment: "Print In1.Cu+Dwgs.User" - type: pdf_pcb_print - dir: . - layers: - - 'In1.Cu' - - 'user' - - - name: 'print_in2' - comment: "Print In2.Cu+Dwgs.User" - type: pdf_pcb_print - dir: . - layers: - - 'In2.Cu' - - 'user' - - - - name: 'bom_csv' - comment: "Bill of Materials in CSV format" - type: bom - dir: . - options: - columns: - - Row - - Reference - - Value - - field: 'LCSC' - name: LCSC Part No. - - Footprint - - field: 'Qty' - name: 'Quantity per PCB' - format: CSV - group_connectors: true - group_fields: - - 'Value' - - 'Footprint' - - - name: 'position' - comment: "Generic pick and place file" - type: position - dir: fab/ - options: - format: CSV # CSV or ASCII format - units: millimeters # millimeters or inches - - - - name: 'gerbers_generic' - comment: "Generic Gerbers for the board house" - type: gerber - dir: fab/gerbers - options: - # generic layer options - exclude_edge_layer: true - exclude_pads_from_silkscreen: false - use_aux_axis_as_origin: false - plot_sheet_reference: false - plot_footprint_refs: true - plot_footprint_values: true - force_plot_invisible_refs_vals: false - tent_vias: true - - # gerber options - line_width: 0.1 - subtract_mask_from_silk: false - use_protel_extensions: false - gerber_precision: 4.6 - create_gerber_job_file: true - use_gerber_x2_attributes: true - use_gerber_net_attributes: true - - layers: 'all' - - - name: excellon_drill - comment: "Excellon drill files" - type: excellon - dir: fab/gerbers/ - options: - metric_units: false - pth_and_npth_single_file: false - use_aux_axis_as_origin: false - minimal_header: false - mirror_y_axis: false - - - name: gerber_drills - comment: "Gerber drill files" - type: gerb_drill - dir: fab/gerbers/ - options: - use_aux_axis_as_origin: false