-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
111 changed files
with
109 additions
and
93,358 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
name: "electrical_boards" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- '.github/workflows/electrical_boards.yml' | ||
- '.github/workflows/convert_bottom_position.py' | ||
- 'Electrical/Design/**' | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
generate-artifacts: | ||
name: kicad export | ||
runs-on: ubuntu-latest | ||
container: "setsoft/kicad_auto:ki7" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
board: | ||
- 'PCBA-KNOT' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run PCB stuff | ||
run: | | ||
make -C Electrical/Design/${{ matrix.board }} | ||
- name: Print errors | ||
if: ${{ always() }} | ||
run: | | ||
cat Electrical/Design/${{ matrix.board }}/mfg-bot/${{ matrix.board }}-drc.txt | ||
cat Electrical/Design/${{ matrix.board }}/kibot_error.log | ||
- name: Set Date | ||
run: echo "action_date=$(date +'%Y-%m-%d-%H%M')" >> $GITHUB_ENV | ||
|
||
- name: Convert position file | ||
run: | | ||
python3 .github/workflows/convert_bottom_position.py ../../Electrical/Design/${{ matrix.board }}/mfg-bot/mfg/${{ matrix.board }}-both_pos.csv ../../Electrical/Design/${{ matrix.board }}/mfg-bot/mfg/${{ matrix.board }}-both_pos_fixed.csv | ||
rm Electrical/Design/${{ matrix.board }}/mfg-bot/mfg/${{ matrix.board }}-both_pos.csv | ||
- name: Zipping gerber | ||
uses: vimtor/action-zip@v1 | ||
with: | ||
files: Electrical/Design/${{ matrix.board }}/mfg-bot/JLCPCB | ||
dest: Electrical/Design/${{ matrix.board }}/mfg-bot/mfg/${{ matrix.board }}-gerber.zip | ||
|
||
- name: Rename pdf files and removing non-zipped gerber files | ||
run: | | ||
mv Electrical/Design/${{ matrix.board }}/mfg-bot/${{ matrix.board }}-erc.txt Electrical/Design/${{ matrix.board }}/mfg-bot/${{ matrix.board }}_erc.txt | ||
mv Electrical/Design/${{ matrix.board }}/mfg-bot/${{ matrix.board }}-drc.txt Electrical/Design/${{ matrix.board }}/mfg-bot/${{ matrix.board }}_drc.txt | ||
mv Electrical/Design/${{ matrix.board }}/mfg-bot/Schematic.pdf Electrical/Design/${{ matrix.board }}/mfg-bot/${{ matrix.board }}_Schematic.pdf | ||
mv Electrical/Design/${{ matrix.board }}/mfg-bot/PCB_Top.pdf Electrical/Design/${{ matrix.board }}/mfg-bot/${{ matrix.board }}_PCB_Top.pdf | ||
mv Electrical/Design/${{ matrix.board }}/mfg-bot/PCB_Bottom.pdf Electrical/Design/${{ matrix.board }}/mfg-bot/${{ matrix.board }}_PCB_Bottom.pdf | ||
mv Electrical/Design/${{ matrix.board }}/mfg-bot/kibot_errors.filter Electrical/Design/${{ matrix.board }}/mfg-bot/${{ matrix.board }}_kibot_errors.filter | ||
mv Electrical/Design/${{ matrix.board }}/kibot_error.log Electrical/Design/${{ matrix.board }}/mfg-bot/${{ matrix.board }}_kibot_error.log | ||
rm -r Electrical/Design/${{ matrix.board }}/mfg-bot/JLCPCB | ||
- name: Upload results | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: "result_${{ matrix.board }}_${{ env.action_date }}" | ||
path: | | ||
Electrical/Design/${{ matrix.board }}/mfg-bot/ | ||
if-no-files-found: warn | ||
|
||
deploy-results: | ||
runs-on: ubuntu-latest | ||
needs: generate-artifacts | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: preview | ||
|
||
- name: Download reports' artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: download | ||
|
||
- name: Collecting files | ||
run: | | ||
# Create the temp folder if it doesn't exist | ||
mkdir -p Preview/Electrical | ||
# Loop through each subdirectory in the download folder | ||
for subdirectory in download/*; do | ||
# Check if it is a directory | ||
if [ -d "$subdirectory" ]; then | ||
# Copy the contents of the subdirectory to the temp folder | ||
cp -r "$subdirectory"/* "Preview/Electrical/" | ||
fi | ||
done | ||
- name: Commit the files | ||
run: | | ||
git config --global user.name ${{ github.actor }} | ||
git config --global user.email ${{ github.actor }}@users.noreply.github.com | ||
git add Preview/* | ||
git commit -m "BOT ${{ github.workflow }} ${{ github.sha }}" | ||
git push | ||
File renamed without changes
File renamed without changes
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
electrical/MIDI_Host/Makefile → Electrical/Design/PCBA-KNOT/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.