Skip to content

Commit dfd7ff5

Browse files
committed
Merge branch 'cdata' of https://github.com/w00000dy/WLED into cdata
2 parents d56ded8 + af3ebbb commit dfd7ff5

File tree

95 files changed

+5240
-4058
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+5240
-4058
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22

33
# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6
44
ARG VARIANT="3"
5-
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
6-
7-
# [Option] Install Node.js
8-
ARG INSTALL_NODE="true"
9-
ARG NODE_VERSION="lts/*"
10-
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
5+
FROM mcr.microsoft.com/devcontainers/python:0-${VARIANT}
116

127
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
138
# COPY requirements.txt /tmp/pip-tmp/

.devcontainer/devcontainer.json

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
"context": "..",
66
"args": {
77
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9
8-
"VARIANT": "3",
9-
// Options
10-
"INSTALL_NODE": "true",
11-
"NODE_VERSION": "lts/*"
8+
"VARIANT": "3"
129
}
1310
},
1411

@@ -27,34 +24,35 @@
2724
// risk to running the build directly on the host.
2825
// "runArgs": ["--privileged", "-v", "/dev/bus/usb:/dev/bus/usb", "--group-add", "dialout"],
2926

30-
// Set *default* container specific settings.json values on container create.
31-
"settings": {
32-
"terminal.integrated.shell.linux": "/bin/bash",
33-
"python.pythonPath": "/usr/local/bin/python",
34-
"python.linting.enabled": true,
35-
"python.linting.pylintEnabled": true,
36-
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
37-
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
38-
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
39-
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
40-
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
41-
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
42-
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
43-
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
44-
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
27+
"customizations": {
28+
"vscode": {
29+
"settings": {
30+
"terminal.integrated.shell.linux": "/bin/bash",
31+
"python.pythonPath": "/usr/local/bin/python",
32+
"python.linting.enabled": true,
33+
"python.linting.pylintEnabled": true,
34+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
35+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
36+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
37+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
38+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
39+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
40+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
41+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
42+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
43+
},
44+
"extensions": [
45+
"ms-python.python",
46+
"platformio.platformio-ide"
47+
]
48+
}
4549
},
4650

47-
// Add the IDs of extensions you want installed when the container is created.
48-
"extensions": [
49-
"ms-python.python",
50-
"platformio.platformio-ide"
51-
],
52-
5351
// Use 'forwardPorts' to make a list of ports inside the container available locally.
5452
// "forwardPorts": [],
5553

5654
// Use 'postCreateCommand' to run commands after the container is created.
57-
"postCreateCommand": "npm install",
55+
"postCreateCommand": "bash -i -c 'nvm install && npm ci'",
5856

5957
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
6058
"remoteUser": "vscode"

.github/workflows/build.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: WLED Build
2+
3+
# Only included into other workflows
4+
on:
5+
workflow_call:
6+
7+
jobs:
8+
9+
get_default_envs:
10+
name: Gather Environments
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.12'
17+
cache: 'pip'
18+
- name: Install PlatformIO
19+
run: pip install -r requirements.txt
20+
- name: Get default environments
21+
id: envs
22+
run: |
23+
echo "environments=$(pio project config --json-output | jq -cr '.[0][1][0][1]')" >> $GITHUB_OUTPUT
24+
outputs:
25+
environments: ${{ steps.envs.outputs.environments }}
26+
27+
28+
build:
29+
name: Build Enviornments
30+
runs-on: ubuntu-latest
31+
needs: get_default_envs
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
environment: ${{ fromJSON(needs.get_default_envs.outputs.environments) }}
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Set up Node.js
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version-file: '.nvmrc'
42+
cache: 'npm'
43+
- run: npm ci
44+
- name: Cache PlatformIO
45+
uses: actions/cache@v4
46+
with:
47+
path: |
48+
~/.platformio/.cache
49+
~/.buildcache
50+
build_output
51+
key: pio-${{ runner.os }}-${{ matrix.environment }}-${{ hashFiles('platformio.ini', 'pio-scripts/output_bins.py') }}-${{ hashFiles('wled00/**', 'usermods/**') }}
52+
restore-keys: pio-${{ runner.os }}-${{ matrix.environment }}-${{ hashFiles('platformio.ini', 'pio-scripts/output_bins.py') }}-
53+
- name: Set up Python
54+
uses: actions/setup-python@v5
55+
with:
56+
python-version: '3.12'
57+
cache: 'pip'
58+
- name: Install PlatformIO
59+
run: pip install -r requirements.txt
60+
- name: Build firmware
61+
run: pio run -e ${{ matrix.environment }}
62+
- uses: actions/upload-artifact@v4
63+
with:
64+
name: firmware-${{ matrix.environment }}
65+
path: |
66+
build_output/release/*.bin
67+
build_output/release/*_ESP02*.bin.gz
68+
69+
70+
testCdata:
71+
name: Test cdata.js
72+
runs-on: ubuntu-latest
73+
steps:
74+
- uses: actions/checkout@v4
75+
- name: Use Node.js
76+
uses: actions/setup-node@v4
77+
with:
78+
node-version-file: '.nvmrc'
79+
cache: 'npm'
80+
- run: npm ci
81+
- run: npm test

.github/workflows/nightly.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
name: Deploy Nightly
3+
on:
4+
# This can be used to automatically publish nightlies at UTC nighttime
5+
schedule:
6+
- cron: '0 2 * * *' # run at 2 AM UTC
7+
# This can be used to allow manually triggering nightlies from the web interface
8+
workflow_dispatch:
9+
10+
jobs:
11+
wled_build:
12+
uses: ./.github/workflows/build.yml
13+
nightly:
14+
name: Deploy nightly
15+
runs-on: ubuntu-latest
16+
needs: wled_build
17+
steps:
18+
- name: Download artifacts
19+
uses: actions/download-artifact@v4
20+
with:
21+
merge-multiple: true
22+
- name: Show Files
23+
run: ls -la
24+
- name: "✏️ Generate release changelog"
25+
id: changelog
26+
uses: janheinrichmerker/action-github-changelog-generator@v2.3
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
sinceTag: v0.15.0
30+
- name: Update Nightly Release
31+
uses: andelf/nightly-release@main
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
with:
35+
tag_name: nightly
36+
name: 'Nightly Release $$'
37+
prerelease: true
38+
body: ${{ steps.changelog.outputs.changelog }}
39+
files: |
40+
*.bin
41+
*.bin.gz

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: WLED Release CI
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
10+
wled_build:
11+
uses: ./.github/workflows/build.yml
12+
13+
release:
14+
name: Create Release
15+
runs-on: ubuntu-latest
16+
needs: wled_build
17+
steps:
18+
- uses: actions/download-artifact@v4
19+
with:
20+
merge-multiple: true
21+
- name: Create draft release
22+
uses: softprops/action-gh-release@v1
23+
with:
24+
draft: True
25+
files: |
26+
*.bin
27+
*.bin.gz
28+

.github/workflows/wled-ci.yml

Lines changed: 7 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,11 @@
11
name: WLED CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
48

59
jobs:
6-
7-
get_default_envs:
8-
name: Gather Environments
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@v4
12-
- uses: actions/setup-python@v5
13-
with:
14-
python-version: '3.12'
15-
cache: 'pip'
16-
- name: Install PlatformIO
17-
run: pip install -r requirements.txt
18-
- name: Get default environments
19-
id: envs
20-
run: |
21-
echo "environments=$(pio project config --json-output | jq -cr '.[0][1][0][1]')" >> $GITHUB_OUTPUT
22-
outputs:
23-
environments: ${{ steps.envs.outputs.environments }}
24-
25-
26-
build:
27-
name: Build Enviornments
28-
runs-on: ubuntu-latest
29-
needs: get_default_envs
30-
strategy:
31-
fail-fast: false
32-
matrix:
33-
environment: ${{ fromJSON(needs.get_default_envs.outputs.environments) }}
34-
steps:
35-
- uses: actions/checkout@v4
36-
- name: Set up Node.js
37-
uses: actions/setup-node@v4
38-
with:
39-
cache: 'npm'
40-
- run: npm ci
41-
- name: Cache PlatformIO
42-
uses: actions/cache@v4
43-
with:
44-
path: |
45-
~/.platformio/.cache
46-
~/.buildcache
47-
build_output
48-
key: pio-${{ runner.os }}-${{ matrix.environment }}-${{ hashFiles('platformio.ini', 'pio-scripts/output_bins.py') }}-${{ hashFiles('wled00/**', 'usermods/**') }}
49-
restore-keys: pio-${{ runner.os }}-${{ matrix.environment }}-${{ hashFiles('platformio.ini', 'pio-scripts/output_bins.py') }}-
50-
- name: Set up Python
51-
uses: actions/setup-python@v5
52-
with:
53-
python-version: '3.12'
54-
cache: 'pip'
55-
- name: Install PlatformIO
56-
run: pip install -r requirements.txt
57-
- name: Build firmware
58-
run: pio run -e ${{ matrix.environment }}
59-
- uses: actions/upload-artifact@v4
60-
with:
61-
name: firmware-${{ matrix.environment }}
62-
path: |
63-
build_output/release/*.bin
64-
build_output/release/*_ESP02*.bin.gz
65-
release:
66-
name: Create Release
67-
runs-on: ubuntu-latest
68-
needs: build
69-
if: startsWith(github.ref, 'refs/tags/')
70-
steps:
71-
- uses: actions/download-artifact@v4
72-
with:
73-
merge-multiple: true
74-
- name: Create draft release
75-
uses: softprops/action-gh-release@v1
76-
with:
77-
draft: True
78-
files: |
79-
*.bin
80-
*.bin.gz
81-
82-
83-
testCdata:
84-
name: Test cdata.js
85-
runs-on: ubuntu-latest
86-
steps:
87-
- uses: actions/checkout@v4
88-
- name: Use Node.js
89-
uses: actions/setup-node@v4
90-
with:
91-
node-version: '20.x'
92-
cache: 'npm'
93-
- run: npm ci
94-
- run: npm test
10+
wled_build:
11+
uses: ./.github/workflows/build.yml

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.18

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
- v0.15.0-b2
174174
- WS2805 support (RGB + WW + CW, 600kbps)
175175
- Unified PSRAM use
176-
- NeoPixelBus v2.7.9
176+
- NeoPixelBus v2.7.9 (for future WS2805 support)
177177
- Ubiquitous PSRAM mode for all variants of ESP32
178178
- SSD1309_64 I2C Support for FLD Usermod (#3836 by @THATDONFC)
179179
- Palette cycling fix (add support for `{"seg":[{"pal":"X~Y~"}]}` or `{"seg":[{"pal":"X~Yr"}]}`)

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ A good description helps us to review and understand your proposed changes. For
1414

1515
### Target branch for pull requests
1616

17-
Please make all PRs against the `0_15` branch.
17+
Please make all PRs against the `main` branch.
1818

1919
### Updating your code
2020
While the PR is open - and under review by maintainers - you may be asked to modify your PR source code.
@@ -105,4 +105,4 @@ Good:
105105

106106
There is no hard character limit for a comment within a line,
107107
though as a rule of thumb consider wrapping after 120 characters.
108-
Inline comments are OK if they describe that line only and are not exceedingly wide.
108+
Inline comments are OK if they describe that line only and are not exceedingly wide.

0 commit comments

Comments
 (0)