Skip to content

Commit f3927f1

Browse files
Merge branch 'master' of https://github.com/esp8266/Arduino into virtual-mem
2 parents 8788c76 + 35d22ed commit f3927f1

File tree

588 files changed

+28536
-70374
lines changed

Some content is hidden

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

588 files changed

+28536
-70374
lines changed

.github/workflows/pull-request.yml

+270
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
# Run whenever a PR is generated or updated.
2+
3+
# Most jobs check out the code, ensure Python3 is installed, and for build
4+
# tests the ESP8266 toolchain is cached when possible to speed up execution.
5+
6+
name: ESP8266 Arduino CI
7+
8+
on:
9+
pull_request:
10+
11+
12+
jobs:
13+
14+
# Run 8 parallel jobs for the default build of all examples.
15+
build-linux:
16+
name: Build ${{ matrix.chunk }}
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
chunk: [0, 1, 2, 3, 4, 5, 6, 7]
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
submodules: true
25+
- uses: actions/setup-python@v2
26+
with:
27+
python-version: '3.x'
28+
- name: Cache Linux toolchain
29+
id: cache-linux
30+
uses: actions/cache@v2
31+
with:
32+
path: ./tools/dist
33+
key: key-linux-toolchain
34+
- name: Build Sketches
35+
env:
36+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
37+
TRAVIS_TAG: ${{ github.ref }}
38+
BUILD_PARITY: custom
39+
mod: 8
40+
rem: ${{ matrix.chunk }}
41+
run: |
42+
bash ./tests/build.sh
43+
44+
45+
# Cover the debug and IPv6 cases by enabling both and running 8 parallel jobs
46+
# over all example code.
47+
build-debug-ipv6:
48+
name: Debug IPv6 ${{ matrix.chunk }}
49+
runs-on: ubuntu-latest
50+
strategy:
51+
matrix:
52+
chunk: [0, 1, 2, 3, 4, 5, 6, 7]
53+
steps:
54+
- uses: actions/checkout@v2
55+
with:
56+
submodules: true
57+
- uses: actions/setup-python@v2
58+
with:
59+
python-version: '3.x'
60+
- name: Cache Linux toolchain
61+
id: cache-linux
62+
uses: actions/cache@v2
63+
with:
64+
path: ./tools/dist
65+
key: key-linux-toolchain
66+
- name: Build Sketches
67+
env:
68+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
69+
TRAVIS_TAG: ${{ github.ref }}
70+
BUILD_PARITY: custom
71+
mod: 8
72+
rem: ${{ matrix.chunk }}
73+
run: |
74+
bash ./tests/debug6.sh
75+
76+
77+
# Single build under Windows to ensure the Win toolchain is good.
78+
build-windows:
79+
name: Windows
80+
runs-on: windows-latest
81+
steps:
82+
- uses: actions/checkout@v2
83+
with:
84+
submodules: true
85+
- uses: actions/setup-python@v2
86+
with:
87+
python-version: '3.x'
88+
- name: Cache Windows toolchain
89+
id: cache-windows
90+
uses: actions/cache@v2
91+
with:
92+
path: ./tools/dist
93+
key: key-windows-toolchain
94+
- name: Build Sketch
95+
env:
96+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
97+
TRAVIS_TAG: ${{ github.ref }}
98+
WINDOWS: 1
99+
BUILD_PARITY: custom
100+
mod: 500
101+
rem: 1
102+
run: |
103+
# Windows has python3 already installed, but it's called "python".
104+
# Copy python.exe to the proper name so scripts "just work".
105+
copy (get-command python).source (get-command python).source.Replace("python.exe", "python3.exe")
106+
bash ./tests/build.sh
107+
108+
109+
# Single build under macOS to ensure the Mac toolchain is good.
110+
build-mac:
111+
name: Mac
112+
runs-on: macOS-latest
113+
steps:
114+
- uses: actions/checkout@v2
115+
with:
116+
submodules: true
117+
- uses: actions/setup-python@v2
118+
with:
119+
python-version: '3.x'
120+
- name: Cache Mac toolchain
121+
id: cache-mac
122+
uses: actions/cache@v2
123+
with:
124+
path: ./tools/dist
125+
key: key-mac-toolchain
126+
- name: Build Sketch
127+
env:
128+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
129+
TRAVIS_TAG: ${{ github.ref }}
130+
MACOSX: 1
131+
BUILD_PARITY: custom
132+
mod: 500
133+
rem: 1
134+
run: |
135+
bash ./tests/build.sh
136+
137+
138+
# Run a few Platform.IO jobs (not full suite) to check PIO integration.
139+
build-pio:
140+
name: Build Platform.IO
141+
runs-on: ubuntu-latest
142+
steps:
143+
- uses: actions/checkout@v2
144+
with:
145+
submodules: true
146+
- uses: actions/setup-python@v2
147+
with:
148+
python-version: '3.x'
149+
- name: Build subset on Platform.IO
150+
env:
151+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
152+
TRAVIS_TAG: ${{ github.ref }}
153+
BUILD_PARITY: custom
154+
mod: 42 # Picked at random to give 4-5 builds and exit.
155+
rem: 13
156+
run: |
157+
sudo apt update
158+
sudo apt install python3-pip python3-setuptools
159+
PATH=/home/runner/.local/bin:$PATH bash ./tests/platformio.sh
160+
161+
162+
# Run host test suite under valgrind for runtime checking of code.
163+
host-tests:
164+
name: Host tests
165+
runs-on: ubuntu-latest
166+
steps:
167+
- uses: actions/checkout@v2
168+
with:
169+
submodules: true
170+
- uses: actions/setup-python@v2
171+
with:
172+
python-version: '3.x'
173+
- name: Run host tests
174+
env:
175+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
176+
TRAVIS_TAG: ${{ github.ref }}
177+
run: |
178+
sudo apt update
179+
sudo apt install valgrind lcov
180+
bash ./tests/ci/host_test.sh
181+
182+
183+
# Ensure Sphinx can build the documentation properly.
184+
documentation:
185+
name: Documentation
186+
runs-on: ubuntu-latest
187+
steps:
188+
- uses: actions/checkout@v2
189+
with:
190+
submodules: true
191+
- uses: actions/setup-python@v2
192+
with:
193+
python-version: '3.x'
194+
- name: Build documentation
195+
env:
196+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
197+
TRAVIS_TAG: ${{ github.ref }}
198+
run: |
199+
sudo apt update
200+
sudo apt install python3-pip python3-setuptools
201+
# GitHub CI installs pip3 and setuptools outside the path.
202+
# Update the path to include them and run.
203+
PATH=/home/runner/.local/bin:$PATH pip3 install --user -r doc/requirements.txt
204+
PATH=/home/runner/.local/bin:$PATH bash ./tests/ci/build_docs.sh
205+
206+
207+
# Standard Arduino formatting in all the examples
208+
style-check:
209+
name: Style and formatting
210+
runs-on: ubuntu-latest
211+
steps:
212+
- uses: actions/checkout@v2
213+
with:
214+
submodules: true
215+
- uses: actions/setup-python@v2
216+
with:
217+
python-version: '3.x'
218+
- name: Style check
219+
env:
220+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
221+
TRAVIS_TAG: ${{ github.ref }}
222+
run: |
223+
sudo apt update
224+
sudo apt install astyle
225+
bash ./tests/ci/style_check.sh
226+
227+
228+
# Quick test that the mocking builds succeed
229+
mock-check:
230+
name: Mock trivial test
231+
runs-on: ubuntu-latest
232+
steps:
233+
- uses: actions/checkout@v2
234+
with:
235+
submodules: true
236+
- uses: actions/setup-python@v2
237+
with:
238+
python-version: '3.x'
239+
- name: Mock build
240+
env:
241+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
242+
TRAVIS_TAG: ${{ github.ref }}
243+
run: |
244+
bash ./tests/buildm.sh
245+
246+
247+
# Ensure no manual edits to boards.txt
248+
boards-check:
249+
name: Boards.txt check
250+
runs-on: ubuntu-latest
251+
steps:
252+
- uses: actions/checkout@v2
253+
with:
254+
submodules: true
255+
- uses: actions/setup-python@v2
256+
with:
257+
python-version: '3.x'
258+
- name: Cache Linux toolchain
259+
id: cache-linux
260+
uses: actions/cache@v2
261+
with:
262+
path: ./tools/dist
263+
key: key-linux-toolchain
264+
- name: Boards.txt diff
265+
env:
266+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
267+
TRAVIS_TAG: ${{ github.ref }}
268+
run: |
269+
bash ./tests/ci/build_boards.sh
270+
bash ./tests/ci/eboot_test.sh
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Whenever a release is published from a draft, this will update the
2+
# master Arduino JSON file to add its new entry.
3+
4+
# We keep the master JSON file in another repo, so we need to use a pre-set
5+
# Deployment SSH key to be able to push a change to the repo.
6+
7+
#### Steps to follow when you need to make a new SSH key for upload (not
8+
#### normally needed!)
9+
10+
# Generate a new SSH key private/public pair
11+
12+
# ssh-keygen -t rsa -b 4096 -C "[email protected]" -f ./deploy_rsa
13+
14+
# Upload deploy_rsa.pub to the *ESP8266.GITHUB.IO* repo as a deployment key
15+
16+
# Convert the private key to base64 (to remove line breaks and allow easier
17+
# usage in the script as an environment variable)
18+
19+
# base64.exe -w 0 < deploy_rsa > deploy_rsa.b64
20+
21+
# Copy the contents of the .b64 file to the clipboard, make a new GitHub
22+
# secret in the ESP8266/Arduino repo called "GHCI_DEPLOY_KEY" and paste
23+
# the B64 code into the variable.
24+
25+
name: ESP8266 Arduino Release Publisher
26+
27+
on:
28+
release:
29+
types: [published]
30+
31+
jobs:
32+
package:
33+
name: Update master JSON file
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v2
37+
with:
38+
submodules: true
39+
- uses: actions/setup-python@v2
40+
with:
41+
python-version: '3.x'
42+
- name: Set GIT tag name
43+
run: |
44+
echo "::set-env name=TRAVIS_TAG::$(git describe --exact-match --tags)"
45+
- name: Deploy updated JSON
46+
env:
47+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
48+
BUILD_TYPE: package
49+
CI_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
50+
GHCI_DEPLOY_KEY: ${{ secrets.GHCI_DEPLOY_KEY }}
51+
run: |
52+
bash ./tests/ci/build_package.sh
53+
# Only the regenerated JSON file will be used, but it's simpler
54+
# than looking for it in a GH release.
55+
bash ./package/deploy_package_index.sh
56+
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Whenever a tag of the form #.xxxx is pushed against master, generate a
2+
# draft release and upload the ZIP and JSON file to it. Maintainers then
3+
# will manually add the changelist and publish it.
4+
5+
name: ESP8266 Arduino Draft Release
6+
7+
on:
8+
push:
9+
tags:
10+
# Run for tags of the x.x.x* form (i.e. 3.0.0, 3.0.0-beta, etc.).
11+
- '[0-9]+.[0-9]+.[0-9]+*'
12+
13+
jobs:
14+
package:
15+
name: Package
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: true
21+
- uses: actions/setup-python@v2
22+
with:
23+
python-version: '3.x'
24+
- name: Set GIT tag name
25+
run: |
26+
# Sets an environment variable used in the next steps
27+
echo "::set-env name=TRAVIS_TAG::$(git describe --exact-match --tags)"
28+
- name: Build package JSON
29+
env:
30+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
31+
BUILD_TYPE: package
32+
CI_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
33+
run: |
34+
bash ./tests/ci/build_package.sh
35+
pip3 install PyGithub
36+
# Create a draft release and upload the ZIP and JSON files.
37+
# This draft is not visible to normal users and needs to be
38+
# updated manually with release notes and published from the
39+
# GitHub web interface.
40+
python3 ./package/upload_release.py --user "$GITHUB_ACTOR" --repo "$GITHUB_REPOSITORY" --token "$CI_GITHUB_API_KEY" --tag "$TRAVIS_TAG" --name "Release $TRAVIS_TAG" --msg "Update the draft with release notes before publishing." package/versions/*/*.zip package/versions/*/package_esp8266com_index.json

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
[submodule "tools/esptool"]
2020
path = tools/esptool
2121
url = https://github.com/espressif/esptool.git
22+
[submodule "libraries/Ethernet"]
23+
path = libraries/Ethernet
24+
url = https://github.com/arduino-libraries/Ethernet.git
2225
[submodule "tools/sdk/uzlib"]
2326
path = tools/sdk/uzlib
2427
url = https://github.com/earlephilhower/uzlib.git

0 commit comments

Comments
 (0)