From 5a00f5af2cb9808c721db6aa3c4aa66fa3922501 Mon Sep 17 00:00:00 2001 From: gab-k Date: Fri, 3 Jan 2025 15:47:59 +0100 Subject: [PATCH] remove fab_outputs.yml moving fabrication output generation to prerelease.yml and release.yml --- .github/workflows/fab_outputs.yml | 36 ------------------ .github/workflows/prerelease.yml | 58 +++++++++++++++++++++++------ .github/workflows/release.yml | 61 ++++++++++++++++++++++++------- 3 files changed, 93 insertions(+), 62 deletions(-) delete mode 100644 .github/workflows/fab_outputs.yml diff --git a/.github/workflows/fab_outputs.yml b/.github/workflows/fab_outputs.yml deleted file mode 100644 index 9d9813c..0000000 --- a/.github/workflows/fab_outputs.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Generate Fabrication Outputs - -on: - push: - branches: - - dev - -jobs: - generate-fabrication-files: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Install KiCad - run: | - sudo add-apt-repository --yes ppa:kicad/kicad-8.0-releases - sudo apt update - sudo apt install --install-recommends kicad - - - name: Clone Fabrication Toolkit - run: | - git clone https://github.com/bennymeg/Fabrication-Toolkit.git - - - name: Run fab toolkit CLI - run: | - cd Fabrication-Toolkit - python3 -m plugins.cli -p ../KiCad/Rev_1_0/RP2040-Decoder.kicad_pcb --autoTranslate --autoFill - cd .. - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: fab_outputs - path: ./KiCad/Rev_1_0/production \ No newline at end of file diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index f4f277d..0e86619 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -1,5 +1,3 @@ -# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. -# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml name: Build Software and create release on tag on: @@ -12,10 +10,7 @@ env: BUILD_TYPE: Debug jobs: - build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + build_sw: runs-on: ubuntu-latest steps: @@ -58,13 +53,48 @@ jobs: with: name: build_files_Rev-1_0 path: ${{github.workspace}}/Software/build-Rev-1_0 + + generate-fabrication-files: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Install KiCad + run: | + sudo add-apt-repository --yes ppa:kicad/kicad-8.0-releases + sudo apt update + sudo apt install --install-recommends kicad + + - name: Clone Fabrication Toolkit + run: | + git clone https://github.com/bennymeg/Fabrication-Toolkit.git + + - name: Run fab toolkit CLI + run: | + cd Fabrication-Toolkit + python3 -m plugins.cli -p ../KiCad/Rev_1_0/RP2040-Decoder.kicad_pcb --autoTranslate --autoFill + cd .. + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: fab_outputs_rev_1_0 + path: ./KiCad/Rev_1_0/production prerelease: runs-on: ubuntu-latest - needs: build + needs: [build_sw, generate-fabrication-files] steps: - name: install zip package run: sudo apt-get install zip + + - name: Download fabrication outputs artifact + uses: actions/download-artifact@v4 + with: + name: fab_outputs_rev_1_0 + path: fab_outputs_rev_1_0 - name: Download build files artifact for Rev 0.3 uses: actions/download-artifact@v4 @@ -80,12 +110,15 @@ jobs: - name: ls run: ls - + + - name: Zip fabrication outputs + run: zip -r FABRICATION_OUTPUTS-REV-1_0.zip fab_outputs_rev_1_0 + - name: Zip Rev 0.3 build files - run: zip Hardware-Rev-0_3.zip ./build_files_Rev-0_3/RP2040-Decoder.bin ./build_files_Rev-0_3/RP2040-Decoder.dis ./build_files_Rev-0_3/RP2040-Decoder.elf ./build_files_Rev-0_3/RP2040-Decoder.elf.map ./build_files_Rev-0_3/RP2040-Decoder.hex ./build_files_Rev-0_3/RP2040-Decoder.uf2 + run: zip -r SW_BUILD-REV-0_3.zip build_files_Rev-0_3 - name: Zip Rev 1.0 build files - run: zip Hardware-Rev-1_0.zip ./build_files_Rev-1_0/RP2040-Decoder.bin ./build_files_Rev-1_0/RP2040-Decoder.dis ./build_files_Rev-1_0/RP2040-Decoder.elf ./build_files_Rev-1_0/RP2040-Decoder.elf.map ./build_files_Rev-1_0/RP2040-Decoder.hex ./build_files_Rev-1_0/RP2040-Decoder.uf2 + run: zip -r SW_BUILD-REV-1_0.zip build_files_Rev-1_0 - name: Release uses: softprops/action-gh-release@v2 @@ -93,5 +126,6 @@ jobs: with: prerelease: true files: | - Hardware-Rev-0_3.zip - Hardware-Rev-1_0.zip \ No newline at end of file + SW_BUILD-REV-0_3.zip + SW_BUILD-REV-1_0.zip + FABRICATION_OUTPUTS-REV-1_0.zip \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d487aa..aacb377 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,3 @@ -# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. -# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml name: Build Software and create release on tag on: @@ -13,10 +11,7 @@ env: BUILD_TYPE: Debug jobs: - build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + build_sw: runs-on: ubuntu-latest steps: @@ -59,13 +54,48 @@ jobs: with: name: build_files_Rev-1_0 path: ${{github.workspace}}/Software/build-Rev-1_0 + + generate-fabrication-files: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Install KiCad + run: | + sudo add-apt-repository --yes ppa:kicad/kicad-8.0-releases + sudo apt update + sudo apt install --install-recommends kicad + + - name: Clone Fabrication Toolkit + run: | + git clone https://github.com/bennymeg/Fabrication-Toolkit.git + + - name: Run fab toolkit CLI + run: | + cd Fabrication-Toolkit + python3 -m plugins.cli -p ../KiCad/Rev_1_0/RP2040-Decoder.kicad_pcb --autoTranslate --autoFill + cd .. + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: fab_outputs_rev_1_0 + path: ./KiCad/Rev_1_0/production release: runs-on: ubuntu-latest - needs: build + needs: [build_sw, generate-fabrication-files] steps: - name: install zip package run: sudo apt-get install zip + + - name: Download fabrication outputs artifact + uses: actions/download-artifact@v4 + with: + name: fab_outputs_rev_1_0 + path: fab_outputs_rev_1_0 - name: Download build files artifact for Rev 0.3 uses: actions/download-artifact@v4 @@ -81,18 +111,21 @@ jobs: - name: ls run: ls - + + - name: Zip fabrication outputs + run: zip -r FABRICATION_OUTPUTS-REV-1_0.zip fab_outputs_rev_1_0 + - name: Zip Rev 0.3 build files - run: zip Hardware-Rev-0_3.zip ./build_files_Rev-0_3/RP2040-Decoder.bin ./build_files_Rev-0_3/RP2040-Decoder.dis ./build_files_Rev-0_3/RP2040-Decoder.elf ./build_files_Rev-0_3/RP2040-Decoder.elf.map ./build_files_Rev-0_3/RP2040-Decoder.hex ./build_files_Rev-0_3/RP2040-Decoder.uf2 + run: zip -r SW_BUILD-REV-0_3.zip build_files_Rev-0_3 - name: Zip Rev 1.0 build files - run: zip Hardware-Rev-1_0.zip ./build_files_Rev-1_0/RP2040-Decoder.bin ./build_files_Rev-1_0/RP2040-Decoder.dis ./build_files_Rev-1_0/RP2040-Decoder.elf ./build_files_Rev-1_0/RP2040-Decoder.elf.map ./build_files_Rev-1_0/RP2040-Decoder.hex ./build_files_Rev-1_0/RP2040-Decoder.uf2 - + run: zip -r SW_BUILD-REV-1_0.zip build_files_Rev-1_0 + - name: Release uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/') with: - prerelease: false files: | - Hardware-Rev-0_3.zip - Hardware-Rev-1_0.zip \ No newline at end of file + SW_BUILD-REV-0_3.zip + SW_BUILD-REV-1_0.zip + FABRICATION_OUTPUTS-REV-1_0.zip \ No newline at end of file