Skip to content

Commit e410404

Browse files
committed
Rework CI workflows
- split workflows into separate files to trigger by path this should help out documentation and boards / eboot / pkg files updates, since those *wont* trigger usual build stuff anymore - build*.sh whatever merged into just common.sh and build.sh trigger different parity builds, mod % rem and allow to set .ino list through the environment variable - removes unnecessary temporary files, try to use more pipes move remaining ones into cache dir instead of PWD - remove legacy TRAVIS env vars, use ESP8266_ARDUINO prefix for config - remove Windows path workarounds - hardware/ and ide/ directories are set through envionment do not force specific paths, simplify builds on local machine - sketch list is set through environment. expicit paths for Windows and macOS builders. platformio also gets a real shuffled list instead of mod and rem magic numbers - detect root of the repo through git cli, not base{name,dir} or relative paths
1 parent d3eddeb commit e410404

28 files changed

+837
-759
lines changed

Diff for: .github/workflows/build-host.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Run host test suite under valgrind for runtime checking of code.
2+
# Also, a quick test that the mocking builds work at all
3+
4+
name: Build on host OS
5+
6+
on:
7+
pull_request:
8+
paths-ignore:
9+
- "boards.txt"
10+
- "package/**"
11+
- "tools/boards.txt.py"
12+
- 'doc/**'
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
host-tests:
19+
name: Tests
20+
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
shell: bash
24+
steps:
25+
- uses: actions/checkout@v3
26+
with:
27+
submodules: true
28+
- run: |
29+
sudo apt update
30+
sudo apt install valgrind lcov
31+
bash ./tests/ci/host_test.sh
32+
33+
mock-check:
34+
name: Mock
35+
runs-on: ubuntu-latest
36+
defaults:
37+
run:
38+
shell: bash
39+
steps:
40+
- uses: actions/checkout@v3
41+
with:
42+
submodules: true
43+
- run: |
44+
cd tests/host
45+
make -j ../../libraries/ESP8266WebServer/examples/FSBrowser/FSBrowser

Diff for: .github/workflows/build-ide.yml

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Cross-platform builds to ensure our Core and toolchain works
2+
3+
name: Build IDE examples
4+
5+
on:
6+
pull_request:
7+
paths-ignore:
8+
- "boards.txt"
9+
- "package/**"
10+
- "tools/boards.txt.py"
11+
- 'doc/**'
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
18+
# Examples are built in parallel to avoid CI total job time limitation
19+
20+
build-linux:
21+
name: Linux - LwIP ${{ matrix.lwip }} (${{ matrix.chunk }})
22+
runs-on: ubuntu-latest
23+
defaults:
24+
run:
25+
shell: bash
26+
strategy:
27+
matrix:
28+
lwip: ["default", "IPv6"]
29+
chunk: [0, 1, 2, 3, 4, 5, 6, 7]
30+
steps:
31+
- uses: actions/checkout@v3
32+
with:
33+
submodules: true
34+
- uses: actions/setup-python@v4
35+
with:
36+
python-version: '3.x'
37+
- uses: actions/cache@v3
38+
with:
39+
path: ./tools/dist
40+
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
41+
- name: Build Sketches
42+
env:
43+
ESP8266_ARDUINO_BUILDER: "arduino"
44+
ESP8266_ARDUINO_LWIP: ${{ matrix.lwip }}
45+
run: |
46+
bash ./tests/build.sh 8 ${{ matrix.chunk }}
47+
48+
# Just try to build at least one sketch, since we spend so much time with the matrix above
49+
50+
build-windows:
51+
name: Windows
52+
runs-on: windows-latest
53+
steps:
54+
- uses: actions/checkout@v3
55+
with:
56+
submodules: false
57+
- uses: actions/setup-python@v4
58+
with:
59+
python-version: '3.x'
60+
- uses: actions/cache@v3
61+
with:
62+
path: ./tools/dist
63+
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
64+
- name: Build Sketch
65+
env:
66+
ESP8266_ARDUINO_HARDWARE: "${{ runner.temp }}/hardware"
67+
ESP8266_ARDUINO_SKETCHES: "libraries/esp8266/examples/Blink/Blink.ino"
68+
run: |
69+
bash ./tests/build.sh
70+
71+
build-mac:
72+
name: macOS
73+
runs-on: macOS-latest
74+
defaults:
75+
run:
76+
shell: bash
77+
steps:
78+
- uses: actions/checkout@v3
79+
with:
80+
submodules: false
81+
- uses: actions/setup-python@v4
82+
with:
83+
python-version: '3.x'
84+
- uses: actions/cache@v3
85+
with:
86+
path: ./tools/dist
87+
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
88+
- name: Build Sketch
89+
env:
90+
ESP8266_ARDUINO_HARDWARE: "${{ runner.temp }}/hardware"
91+
ESP8266_ARDUINO_SKETCHES: "libraries/esp8266/examples/Blink/Blink.ino"
92+
run: |
93+
bash ./tests/build.sh

Diff for: .github/workflows/build-platformio.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# We do not distribute any environment settings, so just try to build some sketches
2+
# using the 'master' branch and using the uploaded toolchain version via get.py
3+
# Also, limit the amount of sketches and simply
4+
5+
name: Build examples with PlatformIO
6+
7+
on:
8+
pull_request:
9+
paths-ignore:
10+
- "boards.txt"
11+
- "package/**"
12+
- "tools/boards.txt.py"
13+
- 'doc/**'
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
build-pio:
20+
name: Linux (random sketches)
21+
runs-on: ubuntu-latest
22+
defaults:
23+
run:
24+
shell: bash
25+
steps:
26+
- uses: actions/checkout@v3
27+
with:
28+
submodules: true
29+
- uses: actions/setup-python@v4
30+
with:
31+
python-version: '3.x'
32+
- uses: actions/cache@v3
33+
with:
34+
path: ./tools/dist
35+
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
36+
- name: Build
37+
env:
38+
ESP8266_ARDUINO_BUILDER: "platformio"
39+
run: |
40+
pip install -U platformio
41+
env ESP8266_ARDUINO_SKETCHES="$(find libraries/ -name '*.ino' | shuf -n 10 -)" bash ./tests/build.sh

Diff for: .github/workflows/check-autogenerated.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Ensure no manual edits happen to our autogenerated files
2+
3+
name: Check autogenerated files
4+
5+
on:
6+
pull_request:
7+
paths:
8+
- "boards.txt"
9+
- "bootloaders/**"
10+
- "doc/boards.rst"
11+
- "package/**"
12+
- "tools/boards.txt.py"
13+
- "tools/sdk/ld/**"
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
pkgrefs-check:
20+
name: .json template
21+
runs-on: ubuntu-latest
22+
defaults:
23+
run:
24+
shell: bash
25+
steps:
26+
- uses: actions/checkout@v3
27+
with:
28+
submodules: false
29+
- run: |
30+
bash ./tests/ci/pkgrefs_test.sh
31+
32+
eboot-check:
33+
name: eboot .elf
34+
runs-on: ubuntu-latest
35+
defaults:
36+
run:
37+
shell: bash
38+
steps:
39+
- uses: actions/checkout@v3
40+
with:
41+
submodules: false
42+
- uses: actions/setup-python@v4
43+
with:
44+
python-version: '3.x'
45+
- uses: actions/cache@v3
46+
with:
47+
path: ./tools/dist
48+
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
49+
- run: |
50+
# ^ reuse toolchain cache from our linux build job
51+
git submodule update --init --remote tools/sdk/uzlib
52+
bash ./tests/ci/eboot_test.sh
53+
54+
boards-txt-check:
55+
name: boards.txt.py
56+
runs-on: ubuntu-latest
57+
defaults:
58+
run:
59+
shell: bash
60+
steps:
61+
- uses: actions/checkout@v3
62+
with:
63+
submodules: false
64+
- uses: actions/setup-python@v4
65+
with:
66+
python-version: '3.x'
67+
- name: Check git-diff result
68+
run: |
69+
bash ./tests/ci/build_boards.sh

Diff for: .github/workflows/documentation.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Ensure Sphinx can build the documentation properly.
2+
3+
name: Documentation
4+
5+
on:
6+
pull_request:
7+
paths:
8+
- 'doc/**'
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
documentation:
15+
name: Sphinx build
16+
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
shell: bash
20+
steps:
21+
- uses: actions/checkout@v3
22+
with:
23+
submodules: true
24+
- uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.x'
27+
- name: Build documentation
28+
run: |
29+
pip install --user -r doc/requirements.txt
30+
bash ./tests/ci/build_docs.sh

0 commit comments

Comments
 (0)