new & fancy

This commit is contained in:
rusefillc 2022-05-18 19:58:12 -04:00
parent 9db326ea47
commit 8331a5f372
5 changed files with 66 additions and 1 deletions

24
.github/workflows/create-board.yaml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Check All
on: [push, pull_request]
jobs:
build-firmware:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: 1. Build Docker
run: |
bash step1_build_hellen-one_docker.sh
- name: 2. Copy
run: |
bash step2_copy_with_docker.sh
# - name: 3. Create Board
# run: |
# bash step3_create_board_with_docker.sh

@ -1 +1 @@
Subproject commit 593ccc29c75d0a9eb4907c00b0fbe9ccacfb3e16
Subproject commit 70f074853c7cf6de2625d1aa3bea460ecb2c16e9

View File

@ -0,0 +1,10 @@
#!/bin/bash
if [ ! -f hellen-one/git_scripts ]; then
echo "No submodules?"
git submodule update --init --recursive
fi
cd hellen-one
docker build -t hellen-one .

20
step2_copy_with_docker.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
if [ ! -f hellen-one/git_scripts ]; then
echo "No submodules?"
git submodule update --init --recursive
fi
# This command is me trying to be fancy
# '--entrypoint python3' skips the normal container CMD and starts python3 instead
# using the parameters specified after 'hellen-one'
#
# -v "$(pwd)":/${PWD##*/} simply mounts the current working directory
# at /<the name of the current directory>
#
# '/${PWD##*/}' is doing the $pwd basename thing again
docker run --rm -t --user $(id -u):$(id -g) --entrypoint python3 -v "$(pwd)":/${PWD##*/} hellen-one ./bin/copy_from_Kicad.py "frames:alphax_" "/${PWD##*/}" "../../gerber" "4ch" "b"
echo "Done!"

View File

@ -0,0 +1,11 @@
#!/bin/bash
if [ ! -f hellen-one/git_scripts ]; then
echo "No submodules?"
git submodule update --init --recursive
fi
# See step2_copy_with_docker.sh for explanation of the following command
docker run --rm -t --user $(id -u):$(id -g) --entrypoint bash -v "$(pwd)":/${PWD##*/} hellen-one ./bin/create_board_with_prefix.sh "alphax_" "/${PWD##*/}" "4ch" "b" "bom_replace_alphax-4ch-b.csv " "0,4"