mirror of
https://github.com/jhbruhn/butns.git
synced 2025-07-03 01:38:50 +00:00
104 lines
No EOL
3 KiB
YAML
104 lines
No EOL
3 KiB
YAML
name: Build 3D Models and Firmware
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
build-stls:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- name: Generate Case
|
|
uses: jhbruhn/openscad-build-action@main
|
|
with:
|
|
input-file: 'hardware/case/case.scad'
|
|
output-file: 'case.stl'
|
|
- name: Generate Buttons
|
|
uses: jhbruhn/openscad-build-action@main
|
|
with:
|
|
input-file: 'hardware/case/buttons.scad'
|
|
output-file: 'buttons.stl'
|
|
customizer-parameter-file: 'hardware/case/buttons.json'
|
|
customizer-parameter-set: 'Buttons'
|
|
- name: Generate Inlay
|
|
uses: jhbruhn/openscad-build-action@main
|
|
with:
|
|
input-file: 'hardware/case/buttons.scad'
|
|
output-file: 'buttons-tpu-inlay.stl'
|
|
customizer-parameter-file: 'hardware/case/buttons.json'
|
|
customizer-parameter-set: 'Inlay'
|
|
- name: Generate Light Blockers
|
|
uses: jhbruhn/openscad-build-action@main
|
|
with:
|
|
input-file: 'hardware/case/buttons.scad'
|
|
output-file: 'buttons-black-blockers.stl'
|
|
customizer-parameter-file: 'hardware/case/buttons.json'
|
|
customizer-parameter-set: 'Blockers'
|
|
- name: Archive
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: case
|
|
path: case.stl
|
|
- name: Archive
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: buttons
|
|
path: |
|
|
buttons.stl
|
|
buttons-tpu-inlay.stl
|
|
buttons-black-blockers.stl
|
|
compile-firmware:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cache/pip
|
|
~/.platformio/.cache
|
|
key: ${{ runner.os }}-pio
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
- name: Install PlatformIO Core
|
|
run: pip install --upgrade platformio
|
|
|
|
- name: Build PlatformIO Project
|
|
run: cd firmware && pio run
|
|
- name: Archive
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: firmware
|
|
path: firmware/.pio/build/pico/firmware.uf2
|
|
|
|
build-pcb:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: INTI-CMNB/KiBot@v2_k8
|
|
with:
|
|
# Required - kibot config file
|
|
config: hardware/board/jlcpcb.kibot.yaml
|
|
# optional - prefix to output defined in config
|
|
dir: hardware/board/output
|
|
# optional - schematic file
|
|
schema: 'hardware/board/butns.kicad_sch'
|
|
# optional - PCB design file
|
|
board: 'hardware/board/butns.kicad_pcb'
|
|
- name: upload results
|
|
if: ${{ always() }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: board
|
|
path: |
|
|
hardware/board/output/*.csv
|
|
hardware/board/output/JLCPCB/*.zip |