name: "KiCad Testing for RP2040 Mini PMod" on: schedule: - cron: "0 8 * * 1" pull_request: paths: - 'Hardware/RP2040_Mini_PMod/RP2040_Mini_PMod.kicad_sch' - 'Hardware/RP2040_Mini_PMod/RP2040_Mini_PMod.kicad_pcb' - 'Hardware/kibot.yml' - '.github/workflows/RP2040_Mini_PMod_kicad.yml' # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: Fabrication: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 # Do a string replacement in the PCB file to set the git HASH - name: Set outputs id: vars run: | if [${{ github.event.pull_request.head.sha }} == ""]; then echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" else echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.event.pull_request.head.sha }})" fi - name: Set PCB version uses: jacobtomlinson/gha-find-replace@master with: include: "Hardware/RP2040_Mini_PMod/RP2040_Mini_PMod.kicad_pcb" find: "%%GITHASH%%" replace: ${{ steps.vars.outputs.sha_short }} - uses: INTI-CMNB/KiBot@v2_k7 with: # Required - kibot config file config: Hardware/kibot.yml # optional - prefix to output defined in config dir: Hardware/Fabrication # optional - schematic file schema: 'Hardware/RP2040_Mini_PMod/RP2040_Mini_PMod.kicad_sch' # optional - PCB design file board: 'Hardware/RP2040_Mini_PMod/RP2040_Mini_PMod.kicad_pcb' - name: Retrieve results if: ${{ always() }} uses: actions/upload-artifact@v2 with: name: Fabrication_Files path: | Hardware/Fabrication/ if-no-files-found: warn Panel-PCB: runs-on: ubuntu-latest needs: Fabrication steps: - uses: actions/checkout@v2 # Do a string replacement in the PCB file to set the git HASH - name: Set outputs id: vars run: | if [${{ github.event.pull_request.head.sha }} == ""]; then echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" else echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.event.pull_request.head.sha }})" fi - name: Set PCB version uses: jacobtomlinson/gha-find-replace@master with: include: "Hardware/RP2040_Mini_PMod/RP2040_Mini_PMod.kicad_pcb" find: "%%GITHASH%%" replace: ${{ steps.vars.outputs.sha_short }} - name: Setup kicad and kikit run: | sudo add-apt-repository --yes ppa:kicad/kicad-7.0-releases sudo apt-get update sudo apt-get install --yes --no-install-recommends kicad pip3 install kikit - name: Make a panel run: | kikit panelize \ --layout 'grid; rows: 3; cols: 2; space: 2mm' \ --tabs 'fixed; width: 5mm; vcount: 2; hcount: 0' \ --cuts 'mousebites; drill: 0.5mm; spacing: 1mm; offset: -0.2mm; prolong: 0.7mm' \ --framing 'railstb; width: 5mm; space: 3mm;' \ --post 'millradius: 1mm' \ --text 'simple; text: JLCJLCJLCJLC; anchor: mt; voffset: 2.5mm; hjustify: center; vjustify: center;' \ --text2 'simple; text: Created {date} Git Version ${{ steps.vars.outputs.sha_short }}; anchor: mb; voffset: -2.5mm; hjustify: center; vjustify: center;' \ Hardware/RP2040_Mini_PMod/RP2040_Mini_PMod.kicad_pcb Hardware/RP2040_Mini_PMod/panel.kicad_pcb - uses: INTI-CMNB/KiBot@v2_k7 with: # Required - kibot config file config: Hardware/kibot.yml # optional - prefix to output defined in config dir: Hardware/Fabrication # optional - schematic file schema: 'Hardware/RP2040_Mini_PMod/RP2040_Mini_PMod.kicad_sch' # optional - PCB design file board: 'Hardware/RP2040_Mini_PMod/panel.kicad_pcb' # stages not to run skip: all targets: JLCPCB interactive_bom board_top - name: Retrieve results if: ${{ always() }} uses: actions/upload-artifact@v2 with: name: Fabrication_Files path: | Hardware/Fabrication/ if-no-files-found: warn