ci/cd
This commit is contained in:
parent
1007b963fa
commit
4d1363d367
|
@ -0,0 +1,36 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
log () {
|
||||||
|
echo "=== $*"
|
||||||
|
}
|
||||||
|
|
||||||
|
## This is bananas.
|
||||||
|
mkdir -p build/ out/
|
||||||
|
cp -rL /usr/share/arduino /usr/share/arduino-builder build/
|
||||||
|
|
||||||
|
while read vid pid variant; do
|
||||||
|
log
|
||||||
|
log Building $vid $pid $product
|
||||||
|
log
|
||||||
|
|
||||||
|
sed -i "
|
||||||
|
/leonardo.build.vid/ s/=.*/=$vid/
|
||||||
|
/leonardo.build.pid/ s/=.*/=$pid/
|
||||||
|
/leonardo.build.usb_product/ s/=.*/=\"Mockband $variant\"/
|
||||||
|
" build/arduino/hardware/arduino/avr/boards.txt
|
||||||
|
grep 'leonardo.build' build/arduino/hardware/arduino/avr/boards.txt
|
||||||
|
|
||||||
|
arduino-builder \
|
||||||
|
-fqbn arduino:avr:leonardo \
|
||||||
|
-build-path $(pwd)/build/ \
|
||||||
|
-hardware build/arduino/hardware \
|
||||||
|
-tools build/arduino/tools \
|
||||||
|
-compile MockBand.ino
|
||||||
|
|
||||||
|
mv build/MockBand.ino.hex out/MockBand.$variant.hex
|
||||||
|
done << EOD
|
||||||
|
0x1bad 0x0004 guitar
|
||||||
|
0x1bad 0x3110 drums
|
||||||
|
EOD
|
||||||
|
|
||||||
|
ls -l out/
|
|
@ -0,0 +1,9 @@
|
||||||
|
name: Mockband
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on:
|
||||||
|
- arduino
|
||||||
|
steps:
|
||||||
|
- run: git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .
|
||||||
|
- run: .gitea/build.sh
|
Loading…
Reference in New Issue