Skip to content

Commit 1e46a3b

Browse files
committed
Add multiple strips
1 parent be586ba commit 1e46a3b

File tree

8 files changed

+313
-304
lines changed

8 files changed

+313
-304
lines changed

.github/workflows/push-master.yml

Lines changed: 0 additions & 171 deletions
This file was deleted.

.github/workflows/push.yml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
name: HyperSerialPico CI Build
2+
3+
on:
4+
push:
5+
branches:
6+
- "**" # Runs on push to any branch
7+
8+
jobs:
9+
###########################
10+
#### HyperSerialPico ######
11+
###########################
12+
13+
HyperSerialPico:
14+
runs-on: ubuntu-22.04
15+
16+
steps:
17+
- uses: actions/[email protected]
18+
with:
19+
submodules: recursive
20+
21+
- name: Install GNU Arm Embedded Toolchain
22+
uses: carlosperate/arm-none-eabi-gcc-action@v1
23+
with:
24+
release: "12.2.Rel1"
25+
26+
- name: Build packages
27+
shell: bash
28+
run: |
29+
mkdir build
30+
cd build
31+
cmake ..
32+
cmake --build . --config Release
33+
34+
- uses: actions/[email protected]
35+
name: Upload artifacts (commit)
36+
if: (startsWith(github.event.ref, 'refs/tags') != true)
37+
with:
38+
path: |
39+
firmware/*.uf2
40+
41+
- uses: actions/[email protected]
42+
name: Upload artifacts (release)
43+
if: startsWith(github.ref, 'refs/tags/')
44+
with:
45+
name: firmware-release-generic
46+
path: |
47+
firmware/*.uf2
48+
49+
- name: Build packages for Adafruit Feather RP2040 Scorpio (release-only)
50+
if: startsWith(github.ref, 'refs/tags/')
51+
shell: bash
52+
run: |
53+
cd build
54+
rm *.*
55+
rm ../firmware/*
56+
echo "Neopixel is using GPIO16(OUTPUT_DATA_PIN) on output 0." > ../firmware/Firmwares_for_Adafruit_Feather_RP2040_Scorpio.txt
57+
echo "SPI is using spi0 interface pins: GPIO19(OUTPUT_SPI_DATA_PIN) and GPIO18(OUTPUT_SPI_CLOCK_PIN) on output 3 and 2 respectively." >> ../firmware/Firmwares_for_Adafruit_Feather_RP2040_Scorpio.txt
58+
cmake -DOVERRIDE_BOOT_WORKAROUND=ON -DOVERRIDE_DATA_PIN=16 -DOVERRIDE_SPI_DATA_PIN=19 -DOVERRIDE_SPI_CLOCK_PIN=18 -DCMAKE_BUILD_TYPE=Release ..
59+
cmake --build .
60+
zip -j ../firmware/Adafruit_Feather_RP2040_Scorpio.zip ../firmware/*
61+
62+
- uses: actions/[email protected]
63+
name: Upload artifacts (release Adafruit_Feather)
64+
if: startsWith(github.ref, 'refs/tags/')
65+
with:
66+
name: firmware-release-adafruit-scorpio
67+
path: |
68+
firmware/*.zip
69+
70+
- name: Build packages for Adafruit ItsyBitsy RP2040 (release-only)
71+
if: startsWith(github.ref, 'refs/tags/')
72+
shell: bash
73+
run: |
74+
cd build
75+
rm *.*
76+
rm ../firmware/*
77+
echo "Neopixel is using GPIO14(OUTPUT_DATA_PIN) on output 5." > ../firmware/Firmwares_for_Adafruit_ItsyBitsy_2040.txt
78+
cmake -DOVERRIDE_BOOT_WORKAROUND=ON -DOVERRIDE_DATA_PIN=14 -DCMAKE_BUILD_TYPE=Release ..
79+
cmake --build .
80+
rm ../firmware/*_Spi.uf2
81+
zip -j ../firmware/Adafruit_ItsyBitsy_2040.zip ../firmware/*
82+
83+
- uses: actions/[email protected]
84+
name: Upload artifacts (release Adafruit_ItsyBitsy)
85+
if: startsWith(github.ref, 'refs/tags/')
86+
with:
87+
name: firmware-release-adafruit-itsybitsy
88+
path: |
89+
firmware/*.zip
90+
91+
- name: Build packages for Pimoroni Plasma Stick 2040 W (release-only)
92+
if: startsWith(github.ref, 'refs/tags/')
93+
shell: bash
94+
run: |
95+
cd build
96+
rm *.*
97+
rm ../firmware/*
98+
echo "Neopixel is using GPIO15(OUTPUT_DATA_PIN) on output PIXELS." > ../firmware/Firmwares_for_Pimoroni_Plasma_Stick_2040_W.txt
99+
cmake -DOVERRIDE_DATA_PIN=15 -DCMAKE_BUILD_TYPE=Release ..
100+
cmake --build .
101+
rm ../firmware/*_Spi.uf2
102+
zip -j ../firmware/Pimoroni_Plasma_Stick_2040_W.zip ../firmware/*
103+
104+
- uses: actions/[email protected]
105+
name: Upload artifacts (release Pimoroni_Plasma_Stick_W)
106+
if: startsWith(github.ref, 'refs/tags/')
107+
with:
108+
name: firmware-release-pimoroni-plasma-stick
109+
path: |
110+
firmware/*.zip
111+
112+
- name: Build packages for Pimoroni Plasma 2040 (release-only)
113+
if: startsWith(github.ref, 'refs/tags/')
114+
shell: bash
115+
run: |
116+
cd build
117+
rm *.*
118+
rm ../firmware/*
119+
echo "Neopixel is using GPIO15(OUTPUT_DATA_PIN) on output DA." > ../firmware/Firmwares_for_Pimoroni_Plasma_2040.txt
120+
echo "SPI is using spi1 interface pins: GPIO15(OUTPUT_SPI_DATA_PIN) and GPIO14(OUTPUT_SPI_CLOCK_PIN) on output DA and CL respectively." >> ../firmware/Firmwares_for_Pimoroni_Plasma_2040.txt
121+
cmake -DOVERRIDE_DATA_PIN=15 -DOVERRIDE_SPI_INTERFACE=spi1 -DOVERRIDE_SPI_DATA_PIN=15 -DOVERRIDE_SPI_CLOCK_PIN=14 -DCMAKE_BUILD_TYPE=Release ..
122+
cmake --build .
123+
zip -j ../firmware/Pimoroni_Plasma_2040.zip ../firmware/*
124+
125+
- uses: actions/[email protected]
126+
name: Upload artifacts (release Pimoroni_Plasma)
127+
if: startsWith(github.ref, 'refs/tags/')
128+
with:
129+
name: firmware-release-pimoroni-plasma
130+
path: |
131+
firmware/*.zip
132+
133+
################################
134+
###### Publish Releases ########
135+
################################
136+
137+
publish:
138+
name: Publish Releases
139+
if: startsWith(github.event.ref, 'refs/tags')
140+
needs: [HyperSerialPico]
141+
runs-on: ubuntu-22.04
142+
permissions:
143+
contents: write
144+
steps:
145+
# generate environment variables
146+
- name: Generate environment variables from version and tag
147+
run: |
148+
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
149+
echo "preRelease=false" >> $GITHUB_ENV
150+
151+
# If version contains alpha or beta, mark draft release as pre-release
152+
- name: Mark release as pre-release
153+
if: contains(env.VERSION, 'alpha') || contains(env.VERSION, 'beta')
154+
run: echo "preRelease=true" >> $GITHUB_ENV
155+
156+
- uses: actions/[email protected]
157+
with:
158+
pattern: firmware-release-*
159+
merge-multiple: true
160+
161+
# create draft release and upload artifacts
162+
- name: Create draft release
163+
uses: softprops/[email protected]
164+
with:
165+
name: HyperSerialPico ${{ env.VERSION }}
166+
tag_name: ${{ env.TAG }}
167+
files: |
168+
*.uf2
169+
*.zip
170+
draft: true
171+
prerelease: ${{ env.preRelease }}
172+
env:
173+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ bld/
3838

3939
# Visual Studio 2015/2017 cache/options directory
4040
.vs/
41+
.vscode/
4142
# Uncomment if you have tasks that create the project's static files in wwwroot
4243
#wwwroot/
4344

0 commit comments

Comments
 (0)