Skip to content

Commit

Permalink
Add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfelt committed Nov 11, 2023
1 parent 563d4cc commit 93d0130
Show file tree
Hide file tree
Showing 2 changed files with 172 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/pcb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Generate Gerber and PCB Files

on:
push:
paths:
- '**.sch'
- '**.kicad_pcb'
pull_request:
paths:
- '**.sch'
- '**.kicad_pcb'

# To allow for manual triggering from the Action console, add workflow_dispatch
workflow_dispatch:
inputs:
name:
description: 'Workflow run name'
required: false
default: 'Manual test run'

jobs:
d1_mini_esp32_wide:
name: D1 Mini Wide - ESP32
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: INTI-CMNB/KiBot@v2_k7
with:
# Required - kibot config file
config: kicad_files/jlcpcb_gerbers.kibot.yaml
# optional - prefix to output defined in config
dir: output
schema: kicad_files/D1 Mini Wide - ESP32/RatGDO-OpenSource-D1Mini-ESP32.kicad_sch
board: kicad_files/D1 Mini Wide - ESP32/RatGDO-OpenSource-D1Mini-ESP32.kicad_pcb
- name: upload results
uses: actions/upload-artifact@v3
with:
name: D1 Mini Wide - ESP32
path: output

d1_mini_esp32:
name: D1 Mini - ESP32
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: INTI-CMNB/KiBot@v2_k7
with:
# Required - kibot config file
config: kicad_files/jlcpcb_gerbers.kibot.yaml
# optional - prefix to output defined in config
dir: output
schema: kicad_files/D1 Mini - ESP32/RatGDO-OpenSource-D1Mini-ESP32.kicad_sch
board: kicad_files/D1 Mini - ESP32/RatGDO-OpenSource-D1Mini-ESP32.kicad_pcb
- name: upload results
uses: actions/upload-artifact@v3
with:
name: D1 Mini - ESP32
path: output

d1_mini_esp8266:
name: D1 Mini - ESP8266
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: INTI-CMNB/KiBot@v2_k7
with:
# Required - kibot config file
config: kicad_files/jlcpcb_gerbers.kibot.yaml
# optional - prefix to output defined in config
dir: output
schema: kicad_files/D1 Mini - ESP8266/RatGDO-OpenSource-D1Mini-ESP8266.kicad_sch
board: kicad_files/D1 Mini - ESP8266/RatGDO-OpenSource-D1Mini-ESP8266.kicad_pcb
- name: upload results
uses: actions/upload-artifact@v3
with:
name: D1 Mini - ESP8266
path: output
95 changes: 95 additions & 0 deletions kicad_files/jlcpcb_gerbers.kibot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
kibot:
version: 1

variants:
- name: rotated
comment: 'Just a place holder for the rotation filter'
type: kibom
variant: rotated
pre_transform: _rot_footprint

outputs:
- name: JLCPCB_gerbers
comment: Gerbers compatible with JLCPCB
type: gerber
dir: gerbers
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: false
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:
# Usually there are no inner layers required for a keyboard PCB,
# if you do have inner layers, you need to add additional lines here
- 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: gerbers
options:
pth_and_npth_single_file: false
pth_id: '-PTH'
npth_id: '-NPTH'
metric_units: false
output: "%f%i.%x"

- name: 'position'
comment: "Pick and place file, JLC style"
type: position
options:
variant: rotated
output: '%f_cpl_jlc.%x'
format: CSV
units: millimeters
separate_files_for_front_and_back: false
only_smd: false
columns:
- id: Ref
name: Designator
- Val
- Package
- id: PosX
name: "Mid X"
- id: PosY
name: "Mid Y"
- id: Rot
name: Rotation
- id: Side
name: Layer

- name: 'bom'
comment: "BoM for JLC"
type: bom
options:
output: '%f_%i_jlc.%x'
ref_separator: ','
columns:
- field: Value
name: Comment
- field: References
name: Designator
- Footprint
- field: 'LCSC#'
name: 'LCSC Part #'
csv:
hide_pcb_info: true
hide_stats_info: true
quote_all: true

0 comments on commit 93d0130

Please sign in to comment.