Skip to content

Commit

Permalink
Add panelized JLCPCB build, make actions faster by skipping rendering…
Browse files Browse the repository at this point in the history
… with a variable
  • Loading branch information
tmshader committed Dec 6, 2024
1 parent 5a89469 commit d1cca2f
Show file tree
Hide file tree
Showing 9 changed files with 12,789 additions and 5,848 deletions.
111 changes: 110 additions & 1 deletion .github/workflows/kibot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ permissions:
contents: read
pages: write
id-token: write
actions: read

concurrency:
group: "pages"
Expand Down Expand Up @@ -79,29 +80,107 @@ jobs:
name: artsey_ergo
path: output

panelize:
runs-on: ubuntu-latest
container: ghcr.io/inti-cmnb/kicad8_auto_full:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: hardware/electrical
sparse-checkout-cone-mode: false

- name: Move files up
run: |
mv ./hardware/electrical/* .
rm -r hardware/
- name: Run Kibot
uses: INTI-CMNB/KiBot@v2_k8
with:
config: "kibot/panelize.kibot.yaml"
dir: output
schema: "artsey_ergo.kicad_sch"
board: "artsey_ergo.kicad_pcb"

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: panelize
path: output/panelize

jlcpcb:
runs-on: ubuntu-latest
container: ghcr.io/inti-cmnb/kicad8_auto_full:latest
needs: panelize
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: hardware/electrical
sparse-checkout-cone-mode: false

- name: Move files up
run: |
mv ./hardware/electrical/* .
rm -r hardware/
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: panelize
path: panelize

- name: Run Kibot
uses: INTI-CMNB/KiBot@v2_k8
with:
config: "kibot/jlcpcb.kibot.yaml"
dir: output
schema: "artsey_ergo.kicad_sch"
board: "panelize/artsey_ergo-panel.kicad_pcb"

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: jlcpcb
path: output

render_angled:
runs-on: ubuntu-latest
container: ghcr.io/inti-cmnb/kicad8_auto_full:latest
steps:
- name: Checkout
if: ${{ vars.RENDER_ACTION_ID == '0' }}
uses: actions/checkout@v4
with:
sparse-checkout: hardware/electrical
sparse-checkout-cone-mode: false

- name: Move files up
if: ${{ vars.RENDER_ACTION_ID == '0' }}
run: |
mv ./hardware/electrical/* .
rm -r hardware/
- name: Run Kibot
if: ${{ vars.RENDER_ACTION_ID == '0' }}
uses: INTI-CMNB/KiBot@v2_k8
with:
config: "kibot/render_angled.kibot.yaml"
dir: output
schema: "artsey_ergo.kicad_sch"
board: "artsey_ergo.kicad_pcb"

- name: Download Artifacts
if: ${{ vars.RENDER_ACTION_ID != '0' }}
uses: actions/download-artifact@v4
with:
name: render_angled
path: output
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ vars.RENDER_ACTION_ID }}
repository: tmshader/artsey-ergo

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -142,24 +221,37 @@ jobs:
container: ghcr.io/inti-cmnb/kicad8_auto_full:latest
steps:
- name: Checkout
if: ${{ vars.RENDER_ACTION_ID == '0' }}
uses: actions/checkout@v4
with:
sparse-checkout: hardware/electrical
sparse-checkout-cone-mode: false

- name: Move files up
if: ${{ vars.RENDER_ACTION_ID == '0' }}
run: |
mv ./hardware/electrical/* .
rm -r hardware/
- name: Run Kibot
if: ${{ vars.RENDER_ACTION_ID == '0' }}
uses: INTI-CMNB/KiBot@v2_k8
with:
config: "kibot/render_top.kibot.yaml"
dir: output
schema: "artsey_ergo.kicad_sch"
board: "artsey_ergo.kicad_pcb"

- name: Download Artifacts
if: ${{ vars.RENDER_ACTION_ID != '0' }}
uses: actions/download-artifact@v4
with:
name: render_top
path: output
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ vars.RENDER_ACTION_ID }}
repository: tmshader/artsey-ergo

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -171,24 +263,37 @@ jobs:
container: ghcr.io/inti-cmnb/kicad8_auto_full:latest
steps:
- name: Checkout
if: ${{ vars.RENDER_ACTION_ID == '0' }}
uses: actions/checkout@v4
with:
sparse-checkout: hardware/electrical
sparse-checkout-cone-mode: false

- name: Move files up
if: ${{ vars.RENDER_ACTION_ID == '0' }}
run: |
mv ./hardware/electrical/* .
rm -r hardware/
- name: Run Kibot
if: ${{ vars.RENDER_ACTION_ID == '0' }}
uses: INTI-CMNB/KiBot@v2_k8
with:
config: "kibot/render_bottom.kibot.yaml"
dir: output
schema: "artsey_ergo.kicad_sch"
board: "artsey_ergo.kicad_pcb"

- name: Download Artifacts
if: ${{ vars.RENDER_ACTION_ID != '0' }}
uses: actions/download-artifact@v4
with:
name: render_bottom
path: output
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ vars.RENDER_ACTION_ID }}
repository: tmshader/artsey-ergo

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -228,6 +333,8 @@ jobs:
runs-on: ubuntu-latest
needs: [
preflight,
panelize,
jlcpcb,
render_angled,
report,
render_top,
Expand Down Expand Up @@ -277,7 +384,9 @@ jobs:
mv output/report/JLCPCB/artsey_ergo-JLCPCB.zip export/artsey_ergo-JLCPCB.zip
mv output/report/JLCPCB/BOM/artsey_ergo_bom_jlc.csv export/artsey_ergo_bom_jlc.csv
mv output/report/JLCPCB/PickAndPlace/artsey_ergo_cpl_jlc.csv export/artsey_ergo_cpl_jlc.csv
cp export/artsey_ergo-JLCPCB.zip export/artsey_ergo-Eurocircuits.zip
mv output/jlcpcb/JLCPCB/artsey_ergo-panel-JLCPCB.zip export/artsey_ergo-panel-JLCPCB.zip
mv output/jlcpcb/JLCPCB/BOM/artsey_ergo_bom_jlc.csv export/artsey_ergo-panel_bom_jlc.csv
mv output/jlcpcb/JLCPCB/PickAndPlace/artsey_ergo-panel_cpl_jlc.csv export/artsey_ergo-panel_cpl_jlc.csv
rm -rf output
ls -l
ls -l export
Expand Down
Loading

0 comments on commit d1cca2f

Please sign in to comment.