Skip to content

Commit e4dba3f

Browse files
committed
Merged latest changes from wled branch main
2 parents 3d9d658 + 4a3af81 commit e4dba3f

391 files changed

Lines changed: 35982 additions & 29488 deletions

File tree

Some content is hidden

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

.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: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,54 @@
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

15-
// Set *default* container specific settings.json values on container create.
16-
"settings": {
17-
"terminal.integrated.shell.linux": "/bin/bash",
18-
"python.pythonPath": "/usr/local/bin/python",
19-
"python.linting.enabled": true,
20-
"python.linting.pylintEnabled": true,
21-
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
22-
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
23-
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
24-
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
25-
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
26-
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
27-
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
28-
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
29-
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
30-
},
12+
// To give the container access to a device serial port, you can uncomment one of the following lines.
13+
// Note: If running on Windows, you will have to do some additional steps:
14+
// https://stackoverflow.com/questions/68527888/how-can-i-use-a-usb-com-port-inside-of-a-vscode-development-container
15+
//
16+
// You can explicitly just forward the port you want to connect to. Replace `/dev/ttyACM0` with the serial port for
17+
// your device. This will only work if the device is plugged in from the start without reconnecting. Adding the
18+
// `dialout` group is needed if read/write permisions for the port are limitted to the dialout user.
19+
// "runArgs": ["--device=/dev/ttyACM0", "--group-add", "dialout"],
20+
//
21+
// Alternatively, you can give more comprehensive access to the host system. This will expose all the host devices to
22+
// the container. Adding the `dialout` group is needed if read/write permisions for the port are limitted to the
23+
// dialout user. This could allow the container to modify unrelated serial devices, which would be a similar level of
24+
// risk to running the build directly on the host.
25+
// "runArgs": ["--privileged", "-v", "/dev/bus/usb:/dev/bus/usb", "--group-add", "dialout"],
3126

32-
// Add the IDs of extensions you want installed when the container is created.
33-
"extensions": [
34-
"ms-python.python",
35-
"platformio.platformio-ide"
36-
],
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+
}
49+
},
3750

3851
// Use 'forwardPorts' to make a list of ports inside the container available locally.
3952
// "forwardPorts": [],
4053

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

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

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ body:
8080
id: terms
8181
attributes:
8282
label: Code of Conduct
83-
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/Aircoookie/WLED/blob/master/CODE_OF_CONDUCT.md)
83+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/wled-dev/WLED/blob/main/CODE_OF_CONDUCT.md)
8484
options:
8585
- label: I agree to follow this project's Code of Conduct
8686
required: true

.github/stale.yml

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

.github/workflows/build.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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 Environments
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+
61+
- name: Build firmware
62+
run: pio run -e ${{ matrix.environment }}
63+
- uses: actions/upload-artifact@v4
64+
with:
65+
name: firmware-${{ matrix.environment }}
66+
path: |
67+
build_output/release/*.bin
68+
build_output/release/*_ESP02*.bin.gz
69+
70+
71+
testCdata:
72+
name: Test cdata.js
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/checkout@v4
76+
- name: Use Node.js
77+
uses: actions/setup-node@v4
78+
with:
79+
node-version-file: '.nvmrc'
80+
cache: 'npm'
81+
- run: npm ci
82+
- run: npm test

.github/workflows/nightly.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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
42+
- name: Repository Dispatch
43+
uses: peter-evans/repository-dispatch@v3
44+
with:
45+
repository: wled/WLED-WebInstaller
46+
event-type: release-nightly
47+
token: ${{ secrets.PAT_PUBLIC }}

.github/workflows/pr-merge.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Notify Discord on PR Merge
2+
on:
3+
pull_request:
4+
types: [closed]
5+
6+
jobs:
7+
notify:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Send Discord notification
11+
shell: bash
12+
env:
13+
DISCORD_WEBHOOK_BETA_TESTERS: ${{ secrets.DISCORD_WEBHOOK_BETA_TESTERS }}
14+
if: github.event.pull_request.merged == true
15+
run: |
16+
curl -H "Content-Type: application/json" -d '{"content": "Pull Request #{{ github.event.pull_request.number }} merged by {{ github.actor }}"}' $DISCORD_WEBHOOK_BETA_TESTERS

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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: "✏️ Generate release changelog"
22+
id: changelog
23+
uses: janheinrichmerker/action-github-changelog-generator@v2.3
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
sinceTag: v0.15.0
27+
- name: Create draft release
28+
uses: softprops/action-gh-release@v1
29+
with:
30+
body: ${{ steps.changelog.outputs.changelog }}
31+
draft: True
32+
files: |
33+
*.bin
34+
*.bin.gz
35+

.github/workflows/stale.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 'Close stale issues and PRs'
2+
on:
3+
schedule:
4+
- cron: '0 12 * * *'
5+
workflow_dispatch:
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/stale@v9
12+
with:
13+
days-before-stale: 120
14+
days-before-close: 7
15+
stale-issue-label: 'stale'
16+
stale-pr-label: 'stale'
17+
exempt-issue-labels: 'pinned,keep,enhancement,confirmed'
18+
exempt-pr-labels: 'pinned,keep,enhancement,confirmed'
19+
exempt-all-milestones: true
20+
operations-per-run: 1000
21+
stale-issue-message: >
22+
Hey! This issue has been open for quite some time without any new comments now.
23+
It will be closed automatically in a week if no further activity occurs.
24+
25+
Thank you for using WLED! ✨
26+
stale-pr-message: >
27+
Hey! This pull request has been open for quite some time without any new comments now.
28+
It will be closed automatically in a week if no further activity occurs.
29+
30+
Thank you for contributing to WLED! ❤️

.github/workflows/test.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
on:
2+
workflow_dispatch:
3+
4+
jobs:
5+
dispatch:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Repository Dispatch
9+
uses: peter-evans/repository-dispatch@v3
10+
with:
11+
repository: wled/WLED-WebInstaller
12+
event-type: release-nightly
13+
token: ${{ secrets.PAT_PUBLIC }}

0 commit comments

Comments
 (0)