Skip to content

Commit

Permalink
Build all 4 variants and archive them
Browse files Browse the repository at this point in the history
  • Loading branch information
xconverge committed Dec 18, 2024
1 parent 97e71ba commit fc5150d
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 7 deletions.
38 changes: 34 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,43 @@ jobs:
- name: Build Libraries
working-directory: Software/GuitarPedal/
run: ./ci/build_libs.sh
- name: Build GuitarPedal firmware
- name: Build GuitarPedal firmware 125B
working-directory: Software/GuitarPedal/
run: ./ci/build_app.sh
- name: Archive 125b .bin
run: ./ci/build_app.sh VARIANT=125B
- name: Archive 125B .bin
uses: actions/upload-artifact@v4
with:
name: 125b Firmware
name: 125B Firmware
path: |
Software/GuitarPedal/build/guitarpedal.bin
if-no-files-found: error
- name: Build GuitarPedal firmware Terrarium
working-directory: Software/GuitarPedal/
run: ./ci/build_app.sh VARIANT=TERRARIUM
- name: Archive Terrarium .bin
uses: actions/upload-artifact@v4
with:
name: Terrarium Firmware
path: |
Software/GuitarPedal/build/guitarpedal.bin
if-no-files-found: error
- name: Build GuitarPedal firmware 1590B
working-directory: Software/GuitarPedal/
run: ./ci/build_app.sh VARIANT=1590B
- name: Archive 1590B .bin
uses: actions/upload-artifact@v4
with:
name: 1590B Firmware
path: |
Software/GuitarPedal/build/guitarpedal.bin
if-no-files-found: error
- name: Build GuitarPedal firmware 1590B-SMT
working-directory: Software/GuitarPedal/
run: ./ci/build_app.sh VARIANT=1590B_SMT
- name: Archive 1590B-SMT .bin
uses: actions/upload-artifact@v4
with:
name: 1590B-SMT Firmware
path: |
Software/GuitarPedal/build/guitarpedal.bin
if-no-files-found: error
11 changes: 11 additions & 0 deletions Software/GuitarPedal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,14 @@ SYSTEM_FILES_DIR = $(LIBDAISY_DIR)/core
include $(SYSTEM_FILES_DIR)/Makefile

C_INCLUDES += -I./q/q/q_lib/include -I./q/infra/include

# Parse variants from argument to make, if none is supplied, will build for 125B
# options:
# make -j8 VARIANT=125B
# make -j8 VARIANT=1590B
# make -j8 VARIANT=1590B_SMD
# make -j8 VARIANT=TERRARIUM
ifdef VARIANT
CFLAGS += -DVARIANT_$(VARIANT)
$(info VARIANT=$(VARIANT))
endif
5 changes: 3 additions & 2 deletions Software/GuitarPedal/ci/build_app.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
echo "building GuitarPedal firmware . . ."
echo "building GuitarPedal firmware..."
echo "arg: $1"
make clean
make -j 4
make -j 4 $1
if [ $? -ne 0 ]; then
echo "Failed to compile GuitarPedal firmware"
exit 1
Expand Down
5 changes: 4 additions & 1 deletion Software/GuitarPedal/guitar_pedal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ using namespace daisy;
using namespace daisysp;
using namespace bkshepherd;

#define VARIANT_125B
// Uncomment the version you are trying to use, by default (and if nothing is
// uncommented), the 125B with 2 footswitch variant will be used

// #define VARIANT_125B
// #define VARIANT_1590B
// #define VARIANT_1590B_SMD
// #define VARIANT_TERRARIUM
Expand Down

0 comments on commit fc5150d

Please sign in to comment.