diff options
| author | Zach DeCook <zachdecook@librem.one> | 2023-05-29 21:05:01 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2023-05-29 21:05:01 -0400 |
| commit | f6372f51812a38f7e24b33345532dc9663e34ac0 (patch) | |
| tree | e64a7555e3184b97db5d2ce0adb42a1c8c9cb136 | |
| parent | c454239d7d58c1a5d06b1407f54c97bf34955e1e (diff) | |
| download | HexBoard-f6372f51812a38f7e24b33345532dc9663e34ac0.tar.gz | |
CI/CD: Add .build.yml to build firmware in sourcehut
| -rw-r--r-- | .build.yml | 31 | ||||
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | model1.patch | 13 |
3 files changed, 46 insertions, 2 deletions
diff --git a/.build.yml b/.build.yml new file mode 100644 index 0000000..1f1c26d --- /dev/null +++ b/.build.yml @@ -0,0 +1,31 @@ +image: archlinux +packages: + - arduino-cli + - python3 + - make + - git +sources: + - https://git.sr.ht/~earboxer/HexBoard + - https://github.com/buxtronix/arduino +tasks: + - libraries: | + mv arduino buxduino + arduino-cli --additional-urls=https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json core update-index + # Install the core for rp2040 + arduino-cli --additional-urls=https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json core install rp2040:rp2040 + arduino-cli lib install "MIDI library" "Adafruit NeoPixel" "U8g2" "Adafruit GFX Library" "GEM" + sed -i 's@#include "config/enable-glcd.h"@//\0@g' ~/Arduino/libraries/GEM/src/config.h # remove dependency from GEM + cd buxduino + git apply ../HexBoard/Rotary.patch + cd .. + mv buxduino/libraries/Rotary ~/Arduino/libraries/ + - build: | + cd HexBoard + make + mv build/build.ino.uf2 build/model2.ino.uf2 + git apply model1.patch + make + mv build/build.ino.uf2 build/model1.ino.uf2 +artifacts: + - HexBoard/build/model1.ino.uf2 + - HexBoard/build/model2.ino.uf2 diff --git a/README.md b/README.md index 4cb7b6a..e58dd34 100644 --- a/README.md +++ b/README.md @@ -40,13 +40,13 @@ arduino-cli lib install "Adafruit NeoPixel" arduino-cli lib install "U8g2" # dependency for GEM arduino-cli lib install "Adafruit GFX Library" # dependency for GEM arduino-cli lib install "GEM" -sed -i 's@#include "config/enable-glcd.h"@//\0@g' ../libraries/GEM/src/config.h # remove dependency from GEM +sed -i 's@#include "config/enable-glcd.h"@//\0@g' ~/Arduino/libraries/GEM/src/config.h # remove dependency from GEM # Correct Rotary Library git clone https://github.com/buxtronix/arduino buxduino cd buxduino git apply ../Rotary.patch cd .. -mv buxduino/libraries/Rotary ../libraries/ +mv buxduino/libraries/Rotary ~/Arduino/libraries/ rm -rf buxduino # Run Make to build the firmware make diff --git a/model1.patch b/model1.patch new file mode 100644 index 0000000..1a683b7 --- /dev/null +++ b/model1.patch @@ -0,0 +1,13 @@ +diff --git a/HexBoard_V1.1.ino b/HexBoard_V1.1.ino +index e63c00c..d257751 100644 +--- a/HexBoard_V1.1.ino ++++ b/HexBoard_V1.1.ino +@@ -25,7 +25,7 @@ + // Change before compile depending on target hardware + // 1 = HexBoard 1.0 (dev unit) + // 2 = HexBoard 1.1 (first retail unit) +-#define ModelNumber 2 ++#define ModelNumber 1 + + // USB MIDI object // + Adafruit_USBD_MIDI usb_midi; |
