Skip to content

Commit ad7fc8a

Browse files
authored
Merge branch 'master' into arduinoethernet
2 parents af9234e + 3bd2458 commit ad7fc8a

File tree

275 files changed

+3311
-51826
lines changed

Some content is hidden

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

275 files changed

+3311
-51826
lines changed

.github/workflows/pull-request.yml

Lines changed: 259 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,259 @@
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-get install python3-pip python3-setuptools
158+
PATH=/home/runner/.local/bin:$PATH bash ./tests/platformio.sh
159+
160+
161+
# Run host test suite under valgrind for runtime checking of code.
162+
host-tests:
163+
name: Host tests
164+
runs-on: ubuntu-latest
165+
steps:
166+
- uses: actions/checkout@v2
167+
with:
168+
submodules: true
169+
- uses: actions/setup-python@v2
170+
with:
171+
python-version: '3.x'
172+
- name: Run host tests
173+
env:
174+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
175+
TRAVIS_TAG: ${{ github.ref }}
176+
run: |
177+
sudo apt-get install valgrind lcov
178+
bash ./tests/ci/host_test.sh
179+
180+
181+
# Ensure Sphinx can build the documentation properly.
182+
documentation:
183+
name: Documentation
184+
runs-on: ubuntu-latest
185+
steps:
186+
- uses: actions/checkout@v2
187+
with:
188+
submodules: true
189+
- uses: actions/setup-python@v2
190+
with:
191+
python-version: '3.x'
192+
- name: Build documentation
193+
env:
194+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
195+
TRAVIS_TAG: ${{ github.ref }}
196+
run: |
197+
sudo apt-get install python3-pip python3-setuptools
198+
# GitHub CI installs pip3 and setuptools outside the path.
199+
# Update the path to include them and run.
200+
PATH=/home/runner/.local/bin:$PATH pip3 install --user -r doc/requirements.txt
201+
PATH=/home/runner/.local/bin:$PATH bash ./tests/ci/build_docs.sh
202+
203+
204+
# Standard Arduino formatting in all the examples
205+
style-check:
206+
name: Style and formatting
207+
runs-on: ubuntu-latest
208+
steps:
209+
- uses: actions/checkout@v2
210+
with:
211+
submodules: true
212+
- uses: actions/setup-python@v2
213+
with:
214+
python-version: '3.x'
215+
- name: Style check
216+
env:
217+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
218+
TRAVIS_TAG: ${{ github.ref }}
219+
run: |
220+
sudo apt-get install astyle
221+
bash ./tests/ci/style_check.sh
222+
223+
224+
# Quick test that the mocking builds succeed
225+
mock-check:
226+
name: Mock trivial test
227+
runs-on: ubuntu-latest
228+
steps:
229+
- uses: actions/checkout@v2
230+
with:
231+
submodules: true
232+
- uses: actions/setup-python@v2
233+
with:
234+
python-version: '3.x'
235+
- name: Mock build
236+
env:
237+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
238+
TRAVIS_TAG: ${{ github.ref }}
239+
run: |
240+
bash ./tests/buildm.sh
241+
242+
243+
# Ensure no manual edits to boards.txt
244+
boards-check:
245+
name: Boards.txt check
246+
runs-on: ubuntu-latest
247+
steps:
248+
- uses: actions/checkout@v2
249+
with:
250+
submodules: true
251+
- uses: actions/setup-python@v2
252+
with:
253+
python-version: '3.x'
254+
- name: Boards.txt diff
255+
env:
256+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
257+
TRAVIS_TAG: ${{ github.ref }}
258+
run: |
259+
bash ./tests/ci/build_boards.sh
Lines changed: 56 additions & 0 deletions
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 "your@email.com" -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+
Lines changed: 40 additions & 0 deletions
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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy