Skip to content

Commit

Permalink
New KiBot-less actions
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jclds139 committed Aug 23, 2024
1 parent c730311 commit 2f6f436
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 155 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -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
34 changes: 14 additions & 20 deletions .github/workflows/exports.yml → .github/workflows/jlc.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -10,45 +10,39 @@ 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:

# 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
134 changes: 0 additions & 134 deletions docs.kibot.yaml

This file was deleted.

0 comments on commit 2f6f436

Please sign in to comment.