Skip to content

Commit cae9845

Browse files
committed
Merge remote-tracking branch 'upstream/main' into 0_15__speed_improvements
2 parents 0a05611 + 83da756 commit cae9845

Some content is hidden

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

45 files changed

+915
-717
lines changed

.github/workflows/build.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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+
cache: 'npm'
42+
- run: npm ci
43+
- name: Cache PlatformIO
44+
uses: actions/cache@v4
45+
with:
46+
path: |
47+
~/.platformio/.cache
48+
~/.buildcache
49+
build_output
50+
key: pio-${{ runner.os }}-${{ matrix.environment }}-${{ hashFiles('platformio.ini', 'pio-scripts/output_bins.py') }}-${{ hashFiles('wled00/**', 'usermods/**') }}
51+
restore-keys: pio-${{ runner.os }}-${{ matrix.environment }}-${{ hashFiles('platformio.ini', 'pio-scripts/output_bins.py') }}-
52+
- name: Set up Python
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version: '3.12'
56+
cache: 'pip'
57+
- name: Install PlatformIO
58+
run: pip install -r requirements.txt
59+
- name: Build firmware
60+
run: pio run -e ${{ matrix.environment }}
61+
- uses: actions/upload-artifact@v4
62+
with:
63+
name: firmware-${{ matrix.environment }}
64+
path: |
65+
build_output/release/*.bin
66+
build_output/release/*_ESP02*.bin.gz
67+
68+
69+
testCdata:
70+
name: Test cdata.js
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@v4
74+
- name: Use Node.js
75+
uses: actions/setup-node@v4
76+
with:
77+
node-version: '20.x'
78+
cache: 'npm'
79+
- run: npm ci
80+
- run: npm test

.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

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.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wled",
3-
"version": "0.15.0-b7",
3+
"version": "0.15.0-dev",
44
"description": "Tools for WLED project",
55
"main": "tools/cdata.js",
66
"directories": {
@@ -27,5 +27,8 @@
2727
"html-minifier-terser": "^7.2.0",
2828
"inliner": "^1.13.1",
2929
"nodemon": "^3.1.7"
30+
},
31+
"engines": {
32+
"node": ">=20.0.0"
3033
}
3134
}

pio-scripts/output_bins.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ def _create_dirs(dirs=["map", "release", "firmware"]):
1919
os.makedirs(os.path.join(OUTPUT_DIR, d), exist_ok=True)
2020

2121
def create_release(source):
22-
release_name = _get_cpp_define_value(env, "WLED_RELEASE_NAME")
23-
if release_name:
22+
release_name_def = _get_cpp_define_value(env, "WLED_RELEASE_NAME")
23+
if release_name_def:
24+
release_name = release_name_def.replace("\\\"", "")
2425
version = _get_cpp_define_value(env, "WLED_VERSION")
2526
release_file = os.path.join(OUTPUT_DIR, "release", f"WLED_{version}_{release_name}.bin")
2627
release_gz_file = release_file + ".gz"

0 commit comments

Comments
 (0)