Skip to content

Commit 8e0563c

Browse files
authored
Merge pull request #8 from witnessmenow/dev
This should be commneted out by default
2 parents 2fe1ebf + f60d888 commit 8e0563c

File tree

17 files changed

+815
-632
lines changed

17 files changed

+815
-632
lines changed

.github/workflows/build-deploy-webflash.yml

Lines changed: 77 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
push:
77
branches: ["main"]
88
paths-ignore:
9-
- '**.md'
9+
- "**.md"
1010

1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:
@@ -28,110 +28,91 @@ jobs:
2828
build:
2929
runs-on: ubuntu-latest
3030
steps:
31-
- name: Checkout
32-
uses: actions/checkout@v3
33-
34-
# Install the Arduino CLI
35-
- name: Install Arduino CLI
36-
uses: arduino/setup-arduino-cli@v1
37-
38-
# Install TFT_eSPI
39-
- name: Install TFT_eSPI library to prepare for modifications
40-
run: |
41-
arduino-cli lib install TFT_eSPI
42-
43-
# Copy binaries to GitHubPages folder for publishing
44-
- name: Copy User_Setup.h for TFT_eSPI
31+
- uses: actions/checkout@v4
32+
- uses: actions/cache@v3
33+
- name: Cache pip
34+
uses: actions/cache@v3
35+
with:
36+
path: ~/.cache/pip
37+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
38+
restore-keys: |
39+
${{ runner.os }}-pip-
40+
- name: Cache PlatformIO
41+
uses: actions/cache@v3
42+
with:
43+
path: ~/.platformio
44+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
45+
- name: Set up Python
46+
uses: actions/setup-python@v4
47+
with:
48+
python-version: "3.10"
49+
- name: Install PlatformIO
4550
run: |
46-
\cp -fR DisplayConfig/User_Setup.h ~/Arduino/libraries/TFT_eSPI/
47-
48-
# Build CYD Arduino Code
49-
- uses: arduino/compile-sketches@v1
50-
name: Compile CYD code
51-
with:
52-
fqbn: "esp32:esp32:esp32"
53-
platforms: |
54-
- name: esp32:esp32
55-
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
56-
# No need to specify ESP-libraries as these are installed with the platform (on the line above).
57-
# Downloading SpeedyStepper from source to get correct casing on import of Arduino.h (spelled arduino.h in the version from Arduino Library Manager)
58-
libraries: |
59-
- name: ImageFetcher
60-
source-url: https://github.com/witnessmenow/file-fetcher-arduino.git
61-
- name: WiFiManager
62-
- name: ESP_DoubleResetDetector
63-
- name: ArduinoJson
64-
- name: ezTime
65-
- name: UniversalTelegramBot
66-
- name: PNGdec
67-
sketch-paths: |
68-
- F1-Notifications
69-
enable-warnings-report: true
70-
verbose: false
71-
cli-compile-flags: |
72-
- --export-binaries
73-
74-
# Copy binaries to GitHubPages folder for publishing
75-
- name: Copy compiled binaries to CYD
51+
python -m pip install --upgrade pip
52+
pip install --upgrade platformio
53+
54+
#Build CYD
55+
- name: Build CYD
56+
run: platformio run -e cyd
57+
- name: Upload artifact
58+
uses: actions/upload-artifact@v3
59+
with:
60+
name: CYD Firmware
61+
path: .pio/build/cyd/firmware.bin
62+
if-no-files-found: error
63+
- name: Copy compiled binaries for webflash
7664
run: |
77-
# mkdir GitHubPages/ESPWebTools/esp32Firmware
7865
mkdir GitHubPages/ESPWebTools/cyd
7966
8067
# Copy the manifest file for the CYD
8168
cp GitHubPages/ESPWebTools/manifest.json GitHubPages/ESPWebTools/cyd
82-
83-
# Copy compiled binaries that were exported by the `-e` flag in the arduino/compile-sketches task
84-
# Maintain folder structure, for cases where we are compiling for multiple board versions
85-
# If we were sure that we would never need to compile for anything other then esp32:esp32:esp32, we could have used this command instead: cp -r OpenMacroRail_Arduino/build/esp32.esp32.esp32/*.bin GitHubPages/ESPWebTools/esp32Firmware
86-
cd F1-Notifications/build
87-
find . -print | grep -i .bin$ | xargs -i cp --parent {} ../../GitHubPages/ESPWebTools/cyd
88-
cd ../..
89-
90-
# Copy boot_app0.bin to the esp32Firmware folder. This file will be common for all esp32 boards (i think)
91-
# Using a version agnostic search to find the file. grep -m 1 makes sure only one file is copied in case multiple versions are installed.
92-
find /home/runner/.arduino15/packages/esp32/hardware/esp32/ -type f | grep -i -m 1 boot_app0.bin$ | xargs -i cp {} GitHubPages/ESPWebTools/cyd
93-
94-
# Build Matrix Arduino Code
95-
- uses: arduino/compile-sketches@v1
96-
name: Compile Matrix code
97-
with:
98-
fqbn: "esp32:esp32:esp32"
99-
platforms: |
100-
- name: esp32:esp32
101-
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
102-
# No need to specify ESP-libraries as these are installed with the platform (on the line above).
103-
# Downloading SpeedyStepper from source to get correct casing on import of Arduino.h (spelled arduino.h in the version from Arduino Library Manager)
104-
libraries: |
105-
- name: ImageFetcher
106-
source-url: https://github.com/witnessmenow/file-fetcher-arduino.git
107-
- name: ESP32 HUB75 LED MATRIX PANEL DMA Display
108-
source-url: https://github.com/witnessmenow/ESP32-HUB75-MatrixPanel-I2S-DMA.git
109-
- name: Adafruit GFX Library
110-
sketch-paths: |
111-
- F1-Notifications
112-
enable-warnings-report: true
113-
verbose: false
114-
cli-compile-flags: |
115-
- --build-property
116-
- compiler.cpp.extra_flags=-DMATRIX_DISPLAY
117-
- --export-binaries
118-
119-
# Copy binaries to GitHubPages folder for publishing
120-
- name: Copy compiled binaries to Matrix
69+
70+
cp .pio/build/cyd/bootloader.bin GitHubPages/ESPWebTools/cyd
71+
cp .pio/build/cyd/partitions.bin GitHubPages/ESPWebTools/cyd
72+
cp /home/runner/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin GitHubPages/ESPWebTools/cyd
73+
cp .pio/build/cyd/firmware.bin GitHubPages/ESPWebTools/cyd
74+
75+
#Build CYD2USB
76+
- name: Build CYD2USB
77+
run: platformio run -e cyd2usb
78+
- name: Upload artifact
79+
uses: actions/upload-artifact@v3
80+
with:
81+
name: CYD Firmware
82+
path: .pio/build/cyd2usb/firmware.bin
83+
if-no-files-found: error
84+
- name: Copy compiled binaries for webflash
85+
run: |
86+
mkdir GitHubPages/ESPWebTools/cyd2usb
87+
88+
# Copy the manifest file for the cyd2usb
89+
cp GitHubPages/ESPWebTools/manifest.json GitHubPages/ESPWebTools/cyd2usb
90+
91+
cp .pio/build/cyd2usb/bootloader.bin GitHubPages/ESPWebTools/cyd2usb
92+
cp .pio/build/cyd2usb/partitions.bin GitHubPages/ESPWebTools/cyd2usb
93+
cp /home/runner/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin GitHubPages/ESPWebTools/cyd
94+
cp .pio/build/cyd2usb/firmware.bin GitHubPages/ESPWebTools/cyd2usb
95+
96+
#Build Matrix
97+
- name: Build Matrix
98+
run: platformio run -e trinity
99+
- name: Upload artifact
100+
uses: actions/upload-artifact@v3
101+
with:
102+
name: CYD Firmware
103+
path: .pio/build/trinity/firmware.bin
104+
if-no-files-found: error
105+
- name: Copy compiled binaries for webflash
121106
run: |
122-
# Make matrix directory
123107
mkdir GitHubPages/ESPWebTools/matrix
124108
125-
# Copy the manifest file for the matrix
109+
# Copy the manifest file for the Matrix
126110
cp GitHubPages/ESPWebTools/manifest.json GitHubPages/ESPWebTools/matrix
127-
128-
cd F1-Notifications/build
129-
find . -print | grep -i .bin$ | xargs -i cp --parent {} ../../GitHubPages/ESPWebTools/matrix
130-
cd ../..
131-
132-
# Copy boot_app0.bin to the esp32Firmware folder. This file will be common for all esp32 boards (i think)
133-
# Using a version agnostic search to find the file. grep -m 1 makes sure only one file is copied in case multiple versions are installed.
134-
find /home/runner/.arduino15/packages/esp32/hardware/esp32/ -type f | grep -i -m 1 boot_app0.bin$ | xargs -i cp {} GitHubPages/ESPWebTools/matrix
111+
112+
cp .pio/build/trinity/bootloader.bin GitHubPages/ESPWebTools/matrix
113+
cp .pio/build/trinity/partitions.bin GitHubPages/ESPWebTools/matrix
114+
cp /home/runner/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin GitHubPages/ESPWebTools/matrix
115+
cp .pio/build/trinity/firmware.bin GitHubPages/ESPWebTools/matrix
135116
136117
# Build GitHub Page
137118
- name: Setup Github Page
@@ -156,4 +137,4 @@ jobs:
156137
steps:
157138
- name: Deploy to GitHub Pages
158139
id: deployment
159-
uses: actions/deploy-pages@v2
140+
uses: actions/deploy-pages@v2

.github/workflows/test-build.yml

Lines changed: 36 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,51 @@ name: Test compiling arduino code
33
on:
44
# Runs on all branches but main, when a arduino file is changed
55
push:
6-
branches-ignore : ["main"]
6+
branches-ignore: ["main"]
77
paths:
8-
- '**.ino'
9-
- '**.h'
10-
- '**.yml'
8+
- "**.ino"
9+
- "**.h"
10+
- "**.yml"
1111

12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
1214

1315
jobs:
1416
# Build job
1517
build:
1618
runs-on: ubuntu-latest
1719
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v3
20-
21-
# Install the Arduino CLI
22-
- name: Install Arduino CLI
23-
uses: arduino/setup-arduino-cli@v1
24-
25-
# Install TFT_eSPI
26-
- name: Install TFT_eSPI library to prepare for modifications
20+
- uses: actions/checkout@v4
21+
- uses: actions/cache@v3
22+
- name: Cache pip
23+
uses: actions/cache@v3
24+
with:
25+
path: ~/.cache/pip
26+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
27+
restore-keys: |
28+
${{ runner.os }}-pip-
29+
- name: Cache PlatformIO
30+
uses: actions/cache@v3
31+
with:
32+
path: ~/.platformio
33+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
34+
- name: Set up Python
35+
uses: actions/setup-python@v4
36+
with:
37+
python-version: "3.10"
38+
- name: Install PlatformIO
2739
run: |
28-
arduino-cli lib install TFT_eSPI
40+
python -m pip install --upgrade pip
41+
pip install --upgrade platformio
2942
30-
# Copy user_setup from repo to TFT_eSPI folder
31-
- name: Copy User_Setup.h for TFT_eSPI
32-
run: |
33-
\cp -fR DisplayConfig/User_Setup.h ~/Arduino/libraries/TFT_eSPI/
43+
#Build CYD
44+
- name: Build CYD
45+
run: platformio run -e cyd
3446

35-
# Build CYD Arduino Code
36-
- uses: arduino/compile-sketches@v1
37-
name: Compile CYD code
38-
continue-on-error: true
39-
with:
40-
fqbn: "esp32:esp32:esp32"
41-
platforms: |
42-
- name: esp32:esp32
43-
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
44-
# No need to specify ESP-libraries as these are installed with the platform (on the line above).
45-
libraries: |
46-
- name: ImageFetcher
47-
source-url: https://github.com/witnessmenow/file-fetcher-arduino.git
48-
- name: WiFiManager
49-
- name: ESP_DoubleResetDetector
50-
- name: ArduinoJson
51-
- name: ezTime
52-
- name: UniversalTelegramBot
53-
- name: PNGdec
54-
sketch-paths: |
55-
- F1-Notifications
56-
enable-warnings-report: true
57-
verbose: false
47+
#Build CYD2USB
48+
- name: Build CYD2USB
49+
run: platformio run -e cyd2usb
5850

59-
# Build Matrix Arduino Code
60-
- uses: arduino/compile-sketches@v1
61-
name: Compile Matrix code
62-
with:
63-
fqbn: "esp32:esp32:esp32"
64-
platforms: |
65-
- name: esp32:esp32
66-
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
67-
# No need to specify ESP-libraries as these are installed with the platform (on the line above).
68-
# Downloading SpeedyStepper from source to get correct casing on import of Arduino.h (spelled arduino.h in the version from Arduino Library Manager)
69-
libraries: |
70-
- name: ImageFetcher
71-
source-url: https://github.com/witnessmenow/file-fetcher-arduino.git
72-
- name: ESP32 HUB75 LED MATRIX PANEL DMA Display
73-
source-url: https://github.com/witnessmenow/ESP32-HUB75-MatrixPanel-I2S-DMA.git
74-
- name: Adafruit GFX Library
75-
sketch-paths: |
76-
- F1-Notifications
77-
enable-warnings-report: true
78-
verbose: false
79-
cli-compile-flags: |
80-
- --build-property
81-
- compiler.cpp.extra_flags=-DMATRIX_DISPLAY
51+
#Build Matrix
52+
- name: Build Matrix
53+
run: platformio run -e trinity

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.pio
2+
.vscode/*
3+
.DS_Store
4+

0 commit comments

Comments
 (0)