Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spark Audit #186

Draft
wants to merge 122 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
1e8bae5
Adjusted yml build
Unreal-Dan Nov 3, 2023
14ee0f3
fixed build name
Unreal-Dan Nov 3, 2023
3748784
Merge branch 'master' into chromadeck
Unreal-Dan Nov 3, 2023
3a06828
Minor updates for the Chromadeck config
Unreal-Dan Nov 3, 2023
cf8e27b
Fixes for buttons
Unreal-Dan Nov 3, 2023
45ae822
fixed tests
Unreal-Dan Nov 3, 2023
fd69e27
Merge branch 'master' into chromadeck
Unreal-Dan Nov 3, 2023
50bd3e4
starting work for chromadeck
Unreal-Dan Nov 11, 2023
af34fd5
mainmenu files
Unreal-Dan Nov 11, 2023
3835712
idk what im doing
Unreal-Dan Nov 12, 2023
5326774
idk what im doing 2
Unreal-Dan Nov 13, 2023
c6530a1
fixed leds
Unreal-Dan Nov 14, 2023
6043fbf
starting adjustments for spark
Unreal-Dan Nov 14, 2023
a9fd5ba
adjusted workflow
Unreal-Dan Nov 14, 2023
76eb434
Updated tests
Unreal-Dan Nov 14, 2023
062f2bb
More fixes for spark
Unreal-Dan Nov 14, 2023
67403e6
fixed tests
Unreal-Dan Nov 14, 2023
c6b04c1
Spark Handle definition
LivingSynthesis Nov 15, 2023
2d2fc94
next steps (#136)
Unreal-Dan Nov 16, 2023
4e2b16f
Merge branch 'master' into spark
Unreal-Dan Nov 17, 2023
ed99990
Merge branch 'master' into spark
Unreal-Dan Nov 17, 2023
456ac09
Merge branch 'master' into spark
Unreal-Dan Nov 24, 2023
d19a6b0
Merge branch 'master' into spark
Unreal-Dan Nov 30, 2023
11b17b7
Merge branch 'master' into spark
Unreal-Dan Nov 30, 2023
c664944
Merge branch 'master' into spark
Unreal-Dan Dec 6, 2023
0ef5823
Daniel/spark/multi pat arg audit (#150)
Unreal-Dan Dec 8, 2023
3027601
Merge branch 'master' into spark
Unreal-Dan Dec 8, 2023
ec1c214
recorded tests
Unreal-Dan Dec 8, 2023
59ee72a
Merge branch 'master' into spark
Unreal-Dan Dec 8, 2023
3b434ec
Merge branch 'master' into spark
Unreal-Dan Dec 8, 2023
098ed6b
Merge branch 'master' into spark
Unreal-Dan Dec 9, 2023
24d16fc
Merge branch 'master' into spark
Unreal-Dan Dec 10, 2023
7ccd0f5
Merge branch 'master' into spark
Unreal-Dan Dec 10, 2023
5aa0ce7
Merge branch 'master' into spark
Unreal-Dan Dec 10, 2023
b845654
Merge branch 'master' into spark
Unreal-Dan Dec 12, 2023
0d766a7
Merge branch 'master' into spark
Unreal-Dan Dec 12, 2023
30ebf23
Daniel/spark/next work (#137)
Unreal-Dan Dec 12, 2023
51c0872
Merge branch 'master' into spark
Unreal-Dan Dec 12, 2023
9eb8ae4
Daniel/spark/webassembly bindings (#163)
Unreal-Dan Dec 14, 2023
42df464
Merge branch 'master' into spark
Unreal-Dan Dec 14, 2023
05d34c8
Merge branch 'master' into spark
Unreal-Dan Dec 14, 2023
82022a0
Merge branch 'master' into spark
Unreal-Dan Dec 14, 2023
0370c41
Merge branch 'master' into spark
Unreal-Dan Dec 21, 2023
3fb70c3
Merge branch 'master' into spark
Unreal-Dan Dec 21, 2023
4c92ded
Merge branch 'master' into spark
Unreal-Dan Dec 21, 2023
9f186c0
Merge branch 'master' into spark
Unreal-Dan Dec 21, 2023
1b5cc92
Merge branch 'master' into spark
Unreal-Dan Dec 22, 2023
3868cb6
Merge branch 'master' into spark
Unreal-Dan Dec 23, 2023
2205d46
Merge branch 'master' into spark
Unreal-Dan Dec 23, 2023
4d6c64c
fixes for serial for chromadeck
Unreal-Dan Dec 25, 2023
4f98d8b
Merge branch 'master' into spark
Unreal-Dan Dec 29, 2023
9433064
Merge branch 'master' into spark
Unreal-Dan Dec 29, 2023
6feca74
Merge branch 'master' into spark
Unreal-Dan Dec 29, 2023
b203648
Merge branch 'master' into spark
Unreal-Dan Dec 29, 2023
dbe7cc1
Merge branch 'master' into spark
Unreal-Dan Dec 30, 2023
e2b2db6
fixed workflow
Unreal-Dan Jan 1, 2024
3787961
added Makefile
Unreal-Dan Jan 1, 2024
ee97c74
minor fixes
Unreal-Dan Jan 1, 2024
00b73b4
Daniel/spark/core generalization (#197)
Unreal-Dan Jan 1, 2024
c48226d
Merge branch 'master' into spark
Unreal-Dan Jan 1, 2024
350481f
Merge branch 'master' into spark
Unreal-Dan Jan 1, 2024
7ba3892
Merge branch 'master' into spark
Unreal-Dan Jan 1, 2024
488f5ef
Merge branch 'master' into spark
Unreal-Dan Jan 1, 2024
f8ec50f
Daniel/spark/blend and randomizer fix (#210)
Unreal-Dan Jan 13, 2024
9863684
Merge branch 'master' into spark
Unreal-Dan Jan 15, 2024
24a12b8
Merge branch 'master' into spark
Unreal-Dan Jan 15, 2024
37c1470
Merge branch 'master' into spark
Unreal-Dan Jan 25, 2024
4535800
Merge branch 'master' into spark
Unreal-Dan Apr 26, 2024
620846e
recorded tests
Unreal-Dan Apr 26, 2024
6e142a0
Merge branch 'master' into spark
Unreal-Dan Apr 26, 2024
daae69b
Daniel/spark/serialize harden (#229)
Unreal-Dan Apr 26, 2024
652b8d8
Merge branch 'master' into spark
Unreal-Dan Apr 27, 2024
1d784f2
Merge branch 'master' into spark
Unreal-Dan Apr 30, 2024
84d0496
Merge branch 'master' into spark
Unreal-Dan Apr 30, 2024
778f5bf
Merge branch 'master' into spark
Unreal-Dan May 1, 2024
c18844a
Merge branch 'master' into spark
Unreal-Dan May 3, 2024
17f7fd6
fixes
Unreal-Dan May 3, 2024
c213561
Merge branch 'master' into spark
Unreal-Dan May 3, 2024
ff8f687
Merge branch 'master' into spark
Unreal-Dan May 3, 2024
5a882df
fixed build and makefile
Unreal-Dan May 3, 2024
49a0116
Merge branch 'master' into spark
Unreal-Dan May 3, 2024
8bbaffd
fixed makefile
Unreal-Dan May 3, 2024
0ee8729
Merge branch 'master' into spark
Unreal-Dan Jul 25, 2024
3e9349f
Merge branch 'master' into spark
Unreal-Dan Aug 7, 2024
74acc76
Updated doxyfile
Unreal-Dan Aug 7, 2024
9299a5a
Merge branch 'master' into spark
Unreal-Dan Aug 7, 2024
68e2322
Merge branch 'master' into spark
Unreal-Dan Aug 21, 2024
6373306
Merge branch 'master' into spark
Unreal-Dan Aug 21, 2024
c2b4f3f
Merge branch 'master' into spark
Unreal-Dan Aug 22, 2024
7f88747
Merge branch 'master' into spark
Unreal-Dan Sep 5, 2024
283919d
Merge branch 'master' into spark
Unreal-Dan Sep 5, 2024
ea03227
Merge branch 'master' into spark
Unreal-Dan Sep 6, 2024
7acfa02
Merge branch 'master' into spark
Unreal-Dan Sep 6, 2024
5491281
Merge branch 'master' into spark
Unreal-Dan Sep 6, 2024
eee9026
fixed spark build
Unreal-Dan Sep 13, 2024
c14f8eb
fixed spark led pin
Unreal-Dan Sep 13, 2024
383631e
Copied serial from chromadeck
Unreal-Dan Sep 13, 2024
ab07332
Merge branch 'master' into spark
Unreal-Dan Sep 14, 2024
e665a42
removed reference to MainMenu
Unreal-Dan Sep 20, 2024
bb2b936
Merge branch 'master' into spark
Unreal-Dan Nov 9, 2024
400babb
fixed led count in vortexlib
Unreal-Dan Nov 9, 2024
1861b4f
Merge branch 'master' into spark
Unreal-Dan Nov 10, 2024
d2c6d7b
Merge branch 'master' into spark
Unreal-Dan Nov 18, 2024
570ba0b
Merge branch 'master' into spark
Unreal-Dan Nov 19, 2024
02e6e67
Makefile change for version number fix for spark
Unreal-Dan Nov 19, 2024
1ccda4b
Merge branch 'master' into spark
Unreal-Dan Nov 22, 2024
626902c
fix makefile for vortexcli
Unreal-Dan Nov 22, 2024
1c98819
Merge branch 'master' into spark
Unreal-Dan Nov 22, 2024
e5c64bf
Merge branch 'master' into spark
Unreal-Dan Nov 22, 2024
a677249
Merge branch 'master' into spark
Unreal-Dan Nov 23, 2024
60e0f39
fixed pairs for spark
Unreal-Dan Nov 23, 2024
c672982
fixed pair functions for spark
Unreal-Dan Nov 23, 2024
82bd81c
restore pair code
Unreal-Dan Nov 26, 2024
cc681bb
Merge branch 'master' into spark
Unreal-Dan Nov 27, 2024
6fedec4
Merge branch 'master' into spark
Unreal-Dan Nov 27, 2024
bef0ab1
Merge branch 'master' into spark
Unreal-Dan Nov 27, 2024
3f50ab6
Merge branch 'master' into spark
Unreal-Dan Nov 27, 2024
c6062f7
Merge branch 'master' into spark
Unreal-Dan Nov 27, 2024
94c2759
Daniel/spark/wireless port from chromadeck (#267)
Unreal-Dan Dec 10, 2024
62a6d3c
pinned spark fastled at 3.7.6
Unreal-Dan Dec 10, 2024
192370b
fixed the initial receive mode
Unreal-Dan Dec 10, 2024
d0b0a7e
small fixes for timing and stuff
Unreal-Dan Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 0 additions & 121 deletions .github/workflows/core_build.yml

This file was deleted.

181 changes: 181 additions & 0 deletions .github/workflows/spark_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
name: Spark Build

on:
push:
branches: [ "spark" ]
pull_request:
branches: [ "spark" ]
workflow_dispatch: # manual trigger

jobs:
setup:
runs-on: ubuntu-latest
outputs:
vortex_version_major: ${{ steps.set_version.outputs.vortex_version_major }}
vortex_version_minor: ${{ steps.set_version.outputs.vortex_version_minor }}
vortex_build_number: ${{ steps.set_version.outputs.vortex_build_number }}
vortex_version_number: ${{ steps.set_version.outputs.vortex_version_number }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetches all history for all branches and tags
- name: Determine Version and Build Number
id: set_version
run: |
BRANCH_SUFFIX="s"
# Fetch all tags
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
# Get the latest tag that matches the branch suffix
LATEST_TAG=$(git tag --list "*${BRANCH_SUFFIX}" | sort -V | tail -n1)
if [ -z "$LATEST_TAG" ]; then
echo "No matching tags found. Setting default version."
VERSION_MAJOR="0"
VERSION_MINOR="1"
BUILD_NUMBER="0"
else
echo "Found latest tag: $LATEST_TAG"
VERSION_NUMBER=$(echo $LATEST_TAG | sed "s/${BRANCH_SUFFIX}//g")
VERSION_MAJOR=$(echo $VERSION_NUMBER | cut -d. -f1)
VERSION_MINOR=$(echo $VERSION_NUMBER | cut -d. -f2)
BUILD_NUMBER=$(git rev-list --count $LATEST_TAG..HEAD)
fi
FULL_VERSION="$VERSION_MAJOR.$VERSION_MINOR.$BUILD_NUMBER"
echo "vortex_version_major=$VERSION_MAJOR" >> $GITHUB_OUTPUT
echo "vortex_version_minor=$VERSION_MINOR" >> $GITHUB_OUTPUT
echo "vortex_build_number=$BUILD_NUMBER" >> $GITHUB_OUTPUT
echo "vortex_version_number=$FULL_VERSION" >> $GITHUB_OUTPUT
echo "Version Number: $FULL_VERSION"

test:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v4
- name: Update Package Lists
run: sudo apt-get update
- name: Install Dependencies
run: sudo apt-get install valgrind g++ make --fix-missing
- name: Build
run: |
export VORTEX_VERSION_MAJOR=${{ needs.setup.outputs.vortex_version_major }}
export VORTEX_VERSION_MINOR=${{ needs.setup.outputs.vortex_version_minor }}
export VORTEX_BUILD_NUMBER=${{ needs.setup.outputs.vortex_build_number }}
export VORTEX_VERSION_NUMBER=${{ needs.setup.outputs.vortex_version_number }}
make -j
working-directory: VortexEngine
- name: Set execute permissions for test script
run: chmod +x ./runtests.sh
working-directory: VortexEngine/tests
- name: Run general tests
run: ./runtests.sh --general
working-directory: VortexEngine/tests

embedded:
needs: [setup, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Dependencies
run: make install
- name: Build Binary
run: |
export VORTEX_VERSION_MAJOR=${{ needs.setup.outputs.vortex_version_major }}
export VORTEX_VERSION_MINOR=${{ needs.setup.outputs.vortex_version_minor }}
export VORTEX_BUILD_NUMBER=${{ needs.setup.outputs.vortex_build_number }}
export VORTEX_VERSION_NUMBER=${{ needs.setup.outputs.vortex_version_number }}
make build
- name: Zip firmware files
run: |
zip SparkFirmware.zip \
build/VortexEngine.ino.bootloader.bin \
build/VortexEngine.ino.partitions.bin \
~/.arduino15/packages/esp32/hardware/esp32/3.0.4/tools/partitions/boot_app0.bin \
build/VortexEngine.ino.bin
- name: Archive firmware zip
uses: actions/upload-artifact@v4
with:
name: spark-firmware-zip
path: SparkFirmware.zip

wasm:
needs: [setup, test, embedded]
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v4
- name: Update Package Lists
run: sudo apt-get update
- name: Install Emscripten
run: |
sudo apt install -y cmake python3
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
working-directory: VortexEngine/VortexLib
- name: Build Webassembly
run: |
source ./emsdk/emsdk_env.sh
export VORTEX_VERSION_MAJOR=${{ needs.setup.outputs.vortex_version_major }}
export VORTEX_VERSION_MINOR=${{ needs.setup.outputs.vortex_version_minor }}
export VORTEX_BUILD_NUMBER=${{ needs.setup.outputs.vortex_build_number }}
export VORTEX_VERSION_NUMBER=${{ needs.setup.outputs.vortex_version_number }}
make -j wasm
working-directory: VortexEngine/VortexLib

docs:
#todo: fix the depends to be setup, test, embedded, wasm
needs: [setup, test]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/spark'
steps:
- name: Checkout current repository
uses: actions/checkout@v4
- name: Update Package Lists
run: sudo apt-get update
- name: Install Dependencies
run: sudo apt-get install doxygen graphviz texlive --fix-missing
- name: Checkout doxygen-awesome
run: git clone https://github.com/jothepro/doxygen-awesome-css.git doxygen-awesome-css
- name: Generate Documentation
run: |
mkdir -p docs/spark
doxygen Doxyfile
echo "Listing contents of docs/spark:"
ls -R docs/spark || echo "No files found in docs/spark"
- name: Upload Doxygen Documentation as Artifact
uses: actions/upload-artifact@v3
with:
name: doxygen-docs-spark
path: docs/spark

deploy:
needs: [setup, test, embedded, wasm, docs]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/spark'
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: spark-firmware-zip
path: build
- name: Rename and Deploy Firmware
run: |
DEVICE_TYPE="spark"
VERSIONED_FILENAME="VortexEngine-${DEVICE_TYPE}-${{ needs.setup.outputs.vortex_version_number }}.zip"
mv build/SparkFirmware.zip build/$VERSIONED_FILENAME
echo "Version is ${{ needs.setup.outputs.vortex_version_number }}"
echo "Filename is $VERSIONED_FILENAME"
curl -X POST \
-F "file=@build/$VERSIONED_FILENAME" \
-F "device=$DEVICE_TYPE" \
-F "version=${{ needs.setup.outputs.vortex_version_number }}" \
-F "category=firmware" \
-F "clientApiKey=${{ secrets.VORTEX_COMMUNITY_API_KEY }}" \
https://vortex.community/firmware/upload

2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = docs/core
OUTPUT_DIRECTORY = docs/spark

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand Down
66 changes: 66 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
.PHONY: all install build upload clean compute_version

ARDUINO_CLI = ./bin/arduino-cli --verbose
BOARD = esp32:esp32:XIAO_ESP32C3
PORT = COMx # Replace 'x' with the appropriate COM port number
PROJECT_NAME = VortexEngine/VortexEngine.ino
BUILD_PATH = build
CONFIG_FILE = $(HOME)/.arduino15/arduino-cli.yaml

# The branch/tag suffix for this device
BRANCH_SUFFIX=s

DEFINES=\
-D VORTEX_VERSION_MAJOR=$(VORTEX_VERSION_MAJOR) \
-D VORTEX_VERSION_MINOR=$(VORTEX_VERSION_MINOR) \
-D VORTEX_BUILD_NUMBER=$(VORTEX_BUILD_NUMBER) \
-D VORTEX_VERSION_NUMBER=$(VORTEX_VERSION_NUMBER) \
-MMD -c #due to a bug need the -MMD and -c otherwise esp won't build

# Default target
all: build

update-index:
$(ARDUINO_CLI) core update-index

install:
sudo apt-get update
sudo apt-get install -y build-essential
pip install pyserial
mkdir -p $(HOME)/.arduino15
if ! command -v $(ARDUINO_CLI) &> /dev/null ; then \
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sudo sh ; \
fi
echo 'board_manager: \n additional_urls: \n - https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json' | sudo tee $(CONFIG_FILE)
$(ARDUINO_CLI) lib update-index
$(ARDUINO_CLI) core update-index --config-file $(CONFIG_FILE)
$(ARDUINO_CLI) core install esp32:esp32 --config-file $(CONFIG_FILE)
$(ARDUINO_CLI) lib install [email protected]

build: compute_version
$(ARDUINO_CLI) compile --fqbn $(BOARD) $(PROJECT_NAME) \
--config-file $(CONFIG_FILE) \
--build-path $(BUILD_PATH) \
--build-property compiler.cpp.extra_flags="$(DEFINES)" \
--build-property compiler.c.extra_flags="$(DEFINES)"
@echo "== Success building Spark v$(VORTEX_VERSION_NUMBER) =="

upload:
$(ARDUINO_CLI) upload -p $(PORT) --fqbn $(BOARD) $(PROJECT_NAME) --config-file $(CONFIG_FILE)

core-list:
$(ARDUINO_CLI) core list

clean:
rm -rf $(BUILD_PATH)

# calculate the version number of the build
compute_version:
$(eval LATEST_TAG ?= $(shell git fetch --depth=1 origin +refs/tags/*:refs/tags/* &> /dev/null && git tag --list "*$(BRANCH_SUFFIX)" | sort -V | tail -n1))
$(eval VORTEX_VERSION_MAJOR ?= $(shell echo $(LATEST_TAG) | cut -d. -f1))
$(eval VORTEX_VERSION_MINOR ?= $(shell echo $(LATEST_TAG) | sed 's/$(BRANCH_SUFFIX)$$//' | cut -d. -f2))
$(eval VORTEX_BUILD_NUMBER ?= $(shell git rev-list --count $(LATEST_TAG)..HEAD))
$(eval VORTEX_VERSION_MAJOR := $(if $(VORTEX_VERSION_MAJOR),$(VORTEX_VERSION_MAJOR),0))
$(eval VORTEX_VERSION_MINOR := $(if $(VORTEX_VERSION_MINOR),$(VORTEX_VERSION_MINOR),1))
$(eval VORTEX_BUILD_NUMBER := $(if $(VORTEX_BUILD_NUMBER),$(VORTEX_BUILD_NUMBER),0))
$(eval VORTEX_VERSION_NUMBER := $(VORTEX_VERSION_MAJOR).$(VORTEX_VERSION_MINOR).$(VORTEX_BUILD_NUMBER))
Loading
Loading