Skip to content

Commit

Permalink
Updated CI workflow
Browse files Browse the repository at this point in the history
Added test for the correct git tag
Updated footprint lib
  • Loading branch information
PatrickBaus committed Jan 9, 2024
1 parent a130d45 commit 38845f3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,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 @@ -91,7 +98,7 @@ jobs:
skip: run_drc
targets: __NONE__ # Only run preflights

- name: Retrieve results
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: ERC_Output
Expand All @@ -117,7 +124,7 @@ jobs:
skip: run_erc
targets: __NONE__ # Only run preflights

- name: Retrieve results
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: DRC_Output
Expand Down Expand Up @@ -148,19 +155,19 @@ jobs:
- name: Upload bill of materials files as artifact
uses: actions/upload-artifact@v4
with:
name: bom-${{ matrix.variant }}
name: manufacturing_files-bom-${{ matrix.variant }}
path: bom_files_compressed

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

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

release:
Expand All @@ -175,13 +182,9 @@ jobs:
- name: Download manufacturing files artifact
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Merge artifacts
run: |
mkdir ./manufacturing_files
mv artifacts/*/* ./manufacturing_files
shell: bash
path: manufacturing_files
pattern: manufacturing_files-*
merge-multiple: true

- name: Display structure of downloaded files
run: ls -R
Expand All @@ -191,7 +194,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 @@ -200,7 +203,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 @@ -209,7 +212,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 @@ -218,7 +221,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
11 changes: 4 additions & 7 deletions config.kibot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ preflight:
- filter: 'Added custom 3D models to DIN 41612 and 4mm Jack'
error: lib_footprint_mismatch
regex: 'Footprint J\d+'
- filter: 'Waiting for https://gitlab.com/kicad/libraries/kicad-packages3D/-/issues/762'
error: lib_footprint_mismatch
regex: 'SOIC-14W_7.5x9mm_P1.27mm'
- filter: 'The DIN 41612 connectors of different variants overlap'
error: courtyards_overlap
regex: 'Footprint J\d+'
Expand Down Expand Up @@ -88,11 +85,11 @@ outputs:
- 'B.Silkscreen'
- 'F.Mask'
- 'B.Mask'
- 'User.Comments'
- 'User.Drawings'
- 'Edge.Cuts'
- 'F.Fab'
- 'B.Fab'
- 'User.Comments'
- 'User.Drawings'

- name: 'excellon_drill'
comment: 'Create the Excellon drill files to go with the Gerber files'
Expand Down Expand Up @@ -149,7 +146,7 @@ outputs:
dir: schematics
options:
title: "+ (%V variant)"
output: '%I%v.%x'
output: '%f_%I_%sr%v.%x'
output_id: 'schematics' # Used for the %I expansion int the output file name

- name: 'compress_bom'
Expand All @@ -171,7 +168,7 @@ outputs:
files:
- from_output: gerbers
- from_output: excellon_drill
output: '%I.%x'
output: '%I%v.%x'
output_id: 'gerbers' # Used for the %I expansion int the output file name

- name: 'compress_position'
Expand Down
2 changes: 1 addition & 1 deletion footprints.pretty

0 comments on commit 38845f3

Please sign in to comment.