Skip to content

Commit

Permalink
remove fab_outputs.yml moving fabrication output generation to prerel…
Browse files Browse the repository at this point in the history
…ease.yml and release.yml
  • Loading branch information
gab-k committed Jan 3, 2025
1 parent a2f30d0 commit 5a00f5a
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 62 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/fab_outputs.yml

This file was deleted.

58 changes: 46 additions & 12 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -80,18 +110,22 @@ 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: true
files: |
Hardware-Rev-0_3.zip
Hardware-Rev-1_0.zip
SW_BUILD-REV-0_3.zip
SW_BUILD-REV-1_0.zip
FABRICATION_OUTPUTS-REV-1_0.zip
61 changes: 47 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
SW_BUILD-REV-0_3.zip
SW_BUILD-REV-1_0.zip
FABRICATION_OUTPUTS-REV-1_0.zip

0 comments on commit 5a00f5a

Please sign in to comment.