Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to KiCad 8 #4

Merged
merged 13 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 37 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ on:
paths:
- '**.kicad_sch'
- '**.kicad_pcb'
- 'KiCad/footprints.pretty/*'
- 'KiCad/libraries/*'
- '.github/workflows/ci.yml'
- 'KiCad/config.kibot.yaml'
- 'KiCad/bom.ini'
# Ignore the push event when creating tags
tags-ignore:
- 'v?[0-9]+.[0-9]+.[0-9]+'
Expand Down Expand Up @@ -67,6 +70,13 @@ jobs:
exit 1
shell: bash

- name: Test for correct git tag
if: github.ref_type == 'tag' && github.ref_name != steps.extract_sch_revision.outputs.value
run: |
echo "::error::Revision number of the schematic/PCB (${{ steps.extract_sch_revision.outputs.value }}) does not match the Github tag (${{ github.ref_name }})."
exit 1
shell: bash

ERC:
name: Run ERC
runs-on: ubuntu-latest
Expand All @@ -79,19 +89,20 @@ jobs:
submodules: true

- name: Run ERC
uses: INTI-CMNB/KiBot@v2_k7
uses: INTI-CMNB/KiBot@v2_dk8
with:
config: ${{ env.KIBOT_CONFIG }}
schema: ${{ env.SCHEMATIC_FILE }}
dir: generated
skip: run_drc
targets: __NONE__ # Only run preflights

- name: Retrieve results
uses: actions/upload-artifact@v3
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: ERC_Output
path: generated
retention-days: 7

DRC:
name: Run DRC
Expand All @@ -105,19 +116,20 @@ jobs:
submodules: true

- name: Run DRC
uses: INTI-CMNB/KiBot@v2_k7
uses: INTI-CMNB/KiBot@v2_dk8
with:
config: ${{ env.KIBOT_CONFIG }}
board: ${{ env.PCB_FILE }}
dir: generated
skip: run_erc
targets: __NONE__ # Only run preflights

- name: Retrieve results
uses: actions/upload-artifact@v3
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: DRC_Output
path: generated
retention-days: 7

fabrication_output:
name: 'Produce fabrication outputs'
Expand All @@ -132,7 +144,7 @@ jobs:
with:
submodules: true

- uses: INTI-CMNB/KiBot@v2_k7
- uses: INTI-CMNB/KiBot@v2_dk8
with:
config: ${{ env.KIBOT_CONFIG }}
schema: ${{ env.SCHEMATIC_FILE }}
Expand All @@ -142,22 +154,25 @@ jobs:
verbose: 0 # use 3 for debugging

- name: Upload bill of materials files as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bom
name: manufacturing_files-bom-${{ matrix.variant }}
path: bom_files_compressed
retention-days: 7

- name: Upload schematic files as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: schematics
name: manufacturing_files-schematics-${{ matrix.variant }}
path: schematics
retention-days: 7

- name: Upload schematic files as artifact
uses: actions/upload-artifact@v3
- name: Upload Gerber files as artifact
uses: actions/upload-artifact@v4
with:
name: gerber_files
name: manufacturing_files-gerber-${{ matrix.variant }}
path: gerber_files_compressed
retention-days: 7

release:
name: 'Upload manufacturing files to release'
Expand All @@ -169,9 +184,11 @@ jobs:
variant: [ 'default' , 'curr_mod' ]
steps:
- name: Download manufacturing files artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: ./manufacturing_files
path: manufacturing_files
pattern: manufacturing_files-*
merge-multiple: true

- name: Display structure of downloaded files
run: ls -R
Expand All @@ -181,7 +198,7 @@ jobs:
- name: Append BOM (bill of materials) as asset
if: github.event.action == 'published'
run: |
mv "./manufacturing_files/bom/bom_(${{ matrix.variant }}).zip" ${{ needs.tests.outputs.basename }}_bom_${{ needs.tests.outputs.revision }}_${{ matrix.variant }}.zip
mv "./manufacturing_files/bom_(${{ matrix.variant }}).zip" ${{ needs.tests.outputs.basename }}_bom_${{ needs.tests.outputs.revision }}_${{ matrix.variant }}.zip
gh release upload ${{ github.ref_name }} ${{ needs.tests.outputs.basename }}_bom_${{ needs.tests.outputs.revision }}_${{ matrix.variant }}.zip#"Bill of materials for the ${{ matrix.variant }} variant (zip)" --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -190,7 +207,7 @@ jobs:
- name: Append schematics as asset
if: github.event.action == 'published'
run: |
mv "./manufacturing_files/schematics/schematics_(${{ matrix.variant }}).pdf" ${{ needs.tests.outputs.basename }}_schematics_${{ needs.tests.outputs.revision }}_${{ matrix.variant }}.pdf
mv "./manufacturing_files/$(basename ${{ env.SCHEMATIC_FILE }} .kicad_sch)_schematics_${{ needs.tests.outputs.revision }}_(${{ matrix.variant }}).pdf" ${{ needs.tests.outputs.basename }}_schematics_${{ needs.tests.outputs.revision }}_${{ matrix.variant }}.pdf
gh release upload ${{ github.ref_name }} ${{ needs.tests.outputs.basename }}_schematics_${{ needs.tests.outputs.revision }}_${{ matrix.variant }}.pdf#"Schematics for the ${{ matrix.variant }} variant (pdf)" --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -199,7 +216,7 @@ jobs:
- name: Append position files as asset
if: github.event.action == 'published'
run: |
mv "./manufacturing_files/gerber_files/pos_(${{ matrix.variant }}).zip" ${{ needs.tests.outputs.basename }}_position_${{ needs.tests.outputs.revision }}_${{ matrix.variant }}.zip
mv "./manufacturing_files/pos_(${{ matrix.variant }}).zip" ${{ needs.tests.outputs.basename }}_position_${{ needs.tests.outputs.revision }}_${{ matrix.variant }}.zip
gh release upload ${{ github.ref_name }} ${{ needs.tests.outputs.basename }}_position_${{ needs.tests.outputs.revision }}_${{ matrix.variant }}.zip#"Pick & Place position files for the ${{ matrix.variant }} variant (zip)" --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -208,7 +225,7 @@ jobs:
- name: Append Gerber files as asset
if: github.event.action == 'published' && matrix.variant == 'default'
run: |
mv "./manufacturing_files/gerber_files/gerbers.zip" ${{ needs.tests.outputs.basename }}_gerber_${{ needs.tests.outputs.revision }}_all.zip
mv "./manufacturing_files/gerbers_(${{ matrix.variant }}).zip" ${{ needs.tests.outputs.basename }}_gerber_${{ needs.tests.outputs.revision }}_all.zip
gh release upload ${{ github.ref_name }} ${{ needs.tests.outputs.basename }}_gerber_${{ needs.tests.outputs.revision }}_all.zip#"Gerber files for all variants (zip)" --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading