From 0144fb5ca1315abf5b5ca970b5490f56218b2949 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Dec 2023 00:39:47 +0000 Subject: [PATCH 1/2] [gha] Bump actions/upload-artifact from 3 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbb0a27..3f7a3ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: targets: __NONE__ # Only run preflights - name: Retrieve results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ERC_Output path: generated @@ -114,7 +114,7 @@ jobs: targets: __NONE__ # Only run preflights - name: Retrieve results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: DRC_Output path: generated @@ -142,19 +142,19 @@ 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 path: bom_files_compressed - name: Upload schematic files as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: schematics path: schematics - name: Upload schematic files as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: gerber_files path: gerber_files_compressed From f7efbf796a2eb06028efaadce3d6447010d83561 Mon Sep 17 00:00:00 2001 From: Patrick Baus Date: Sun, 17 Dec 2023 11:52:24 +0100 Subject: [PATCH 2/2] Updated to actions/download-artifact@v4 --- .github/workflows/ci.yml | 16 ++- .github/workflows/ci.yml.bak | 215 ----------------------------------- 2 files changed, 11 insertions(+), 220 deletions(-) delete mode 100644 .github/workflows/ci.yml.bak diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f7a3ce..f71d55c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,19 +144,19 @@ jobs: - name: Upload bill of materials files as artifact uses: actions/upload-artifact@v4 with: - name: bom + name: bom-${{ matrix.variant }} path: bom_files_compressed - name: Upload schematic files as artifact uses: actions/upload-artifact@v4 with: - name: schematics + name: schematics-${{ matrix.variant }} path: schematics - name: Upload schematic files as artifact uses: actions/upload-artifact@v4 with: - name: gerber_files + name: gerber_files-${{ matrix.variant }} path: gerber_files_compressed release: @@ -169,9 +169,15 @@ jobs: variant: [ 'default' ] steps: - name: Download manufacturing files artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - path: ./manufacturing_files + path: artifacts + + - name: Merge artifacts + run: | + mkdir ./manufacturing_files + mv artifacts/*/* ./manufacturing_files + shell: bash - name: Display structure of downloaded files run: ls -R diff --git a/.github/workflows/ci.yml.bak b/.github/workflows/ci.yml.bak deleted file mode 100644 index cbe3e0a..0000000 --- a/.github/workflows/ci.yml.bak +++ /dev/null @@ -1,215 +0,0 @@ -name: "Build manufacturing files" - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: - - "**" - paths: - - '**.kicad_sch' - - '**.kicad_pcb' - - '.github/workflows/ci.yml' - - 'KiCad/config.kibot.yaml' - # Ignore the push event when creating tags - tags-ignore: - - 'v?[0-9]+.[0-9]+.[0-9]+' - release: - types: - - published - -env: - SCHEMATIC_FILE: KiCad/SFH203_photodetector.kicad_sch - PCB_FILE: KiCad/SFH203_photodetector.kicad_pcb - KIBOT_CONFIG: KiCad/config.kibot.yaml - -jobs: - tests: - name: Run tests - runs-on: ubuntu-latest - outputs: - revision: ${{ steps.extract_sch_revision.outputs.value }} - basename: ${{ steps.repo-basename.outputs.value }} - - steps: - - name: Download repository - uses: actions/checkout@v4 - - - name: Parse repository name - id: repo-basename - run: | - echo "value=$(basename ${{ github.repository }})" >> $GITHUB_OUTPUT - shell: bash - - - name: Extract schematic revision - id: extract_sch_revision - run: | - echo "value=$(perl -0777 -ne "print /\(title_block.+\(rev \"(.+?)\"\)/sg" ${{ env.SCHEMATIC_FILE }})" >>${GITHUB_OUTPUT} - shell: bash - - - name: Extract PCB revision - id: extract_pcb_revision - run: | - echo "value=$(perl -0777 -ne "print /\(title_block.+\(rev \"(.+?)\"\)/sg" ${{ env.PCB_FILE }})" >>${GITHUB_OUTPUT} - shell: bash - - - name: Test if the revision number was extracted - if: steps.extract_sch_revision.outputs.value == '' - run: | - echo "::error::Failed to extract revision number from schematic file: ${{ env.SCHEMATIC_FILE }}" - exit 1 - shell: bash - - - name: Test schematic revision == pcb revision - if: steps.extract_sch_revision.outputs.value != steps.extract_pcb_revision.outputs.value - run: | - echo "::error::Revision number of the schematic (${{ steps.extract_sch_revision.outputs.value }}) does not match PCB (${{ steps.extract_pcb_revision.outputs.value }}) revision." - exit 1 - shell: bash - - ERC: - name: Run ERC - runs-on: ubuntu-latest - needs: tests - - steps: - - name: Download repository - uses: actions/checkout@v4 - with: - submodules: true - - - name: Run ERC - uses: INTI-CMNB/KiBot@v2_k7 - 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 - with: - name: ERC_Output - path: generated - - DRC: - name: Run DRC - runs-on: ubuntu-latest - needs: ERC - - steps: - - name: Download repository - uses: actions/checkout@v4 - with: - submodules: true - - - name: Run DRC - uses: INTI-CMNB/KiBot@v2_k7 - 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 - with: - name: DRC_Output - path: generated - - fabrication_output: - name: 'Produce fabrication outputs' - runs-on: ubuntu-latest - needs: [ERC, DRC] - strategy: - matrix: - variant: [ 'default' ] - steps: - - name: Download repository - uses: actions/checkout@v4 - with: - submodules: true - - - uses: INTI-CMNB/KiBot@v2_k7 - with: - config: ${{ env.KIBOT_CONFIG }} - schema: ${{ env.SCHEMATIC_FILE }} - board: ${{ env.PCB_FILE }} - skip: run_erc,run_drc - variant: ${{ matrix.variant }} - verbose: 0 # use 3 for debugging - - - name: Upload bill of materials files as artifact - uses: actions/upload-artifact@v3 - with: - name: bom - path: bom_files_compressed - - - name: Upload schematic files as artifact - uses: actions/upload-artifact@v3 - with: - name: schematics - path: schematics - - - name: Upload schematic files as artifact - uses: actions/upload-artifact@v3 - with: - name: gerber_files - path: gerber_files_compressed - - release: - name: 'Upload manufacturing files to release' - runs-on: ubuntu-latest - needs: [tests, fabrication_output] - if: github.event.action == 'published' - strategy: - matrix: - variant: [ 'default' ] - steps: - - name: Download manufacturing files artifact - uses: actions/download-artifact@v3 - with: - path: ./manufacturing_files - - - name: Display structure of downloaded files - run: ls -R - working-directory: ./manufacturing_files - shell: bash - - - 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 - 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 }} - shell: bash - - - 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 - 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 }} - shell: bash - - - 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 - 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 }} - shell: bash - - - 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 - 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 }} - shell: bash