Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
d59b148
done with release 2.7.2 (#7430)
d-a-v Jul 7, 2020
7b48b9d
boards: 4dsystems (gen4iod) updates (#7433)
d-a-v Jul 7, 2020
d979b57
Upgrade to GCC 10.1 toolchain (#6294)
earlephilhower Jul 7, 2020
c663c55
Free space of overwritten files in LittleFS (#7434)
earlephilhower Jul 8, 2020
252cb1d
Remove wget dump during CI (#7438)
earlephilhower Jul 8, 2020
1ead157
Fix spelling typos in files under packages dir (#7439)
standby24x7 Jul 9, 2020
70e4457
Remove axTLS from code and documentation (#7437)
earlephilhower Jul 9, 2020
af1bc71
remove lwip-v1.4 specific code (#7436)
d-a-v Jul 9, 2020
a6ccad4
Update Arduino.h (#7440)
devyte Jul 9, 2020
df9bc38
Grammar fixes (#7441)
G0rocks Jul 10, 2020
83158af
Pass String by const reference [3.0] (#6583)
dirkmueller Jul 10, 2020
2d4a601
webserver: string optimization (#7446)
d-a-v Jul 10, 2020
1134194
Fix spelling typos in readme.rst (#7447)
standby24x7 Jul 10, 2020
e58bb60
webserver: do not count "plain" in argument list (#6768)
d-a-v Jul 13, 2020
f809131
Update to BearSSL version lost in GCC10 update (#7453)
earlephilhower Jul 14, 2020
3bd2458
Transition from TravisCI to GitHub CI (#7444)
earlephilhower Jul 15, 2020
69bea49
Allow 100% high or low periods.
dok-net Jan 6, 2020
5257dd7
Fix serious jitter issues in previous versions.
dok-net Jan 7, 2020
09e8703
Use ESP.getCycleCount() just like everyone else.
dok-net Jan 7, 2020
8a9b082
Highest timer rate at which this runs stable appears to be 2µs (500kHz).
dok-net Jan 7, 2020
5e78d4a
Guard for zero period length undefined waveforms.
dok-net Jan 7, 2020
08c4746
Cycle precision for expiry instead of special treatment for 0 value.
dok-net Jan 8, 2020
e8a5917
Give expiry proper precedence over updating a waveform
dok-net Jan 8, 2020
897c4c7
Important comment
dok-net Feb 6, 2020
591e648
Refactored, identical behavior.
dok-net Feb 6, 2020
86a8b16
Use plural for bit arrays.
dok-net Feb 6, 2020
c81b695
Fix for completely duty or all off cycle period case.
dok-net Feb 7, 2020
b229bd3
Expiration is explicitly relative to service time.
dok-net Feb 7, 2020
1a0ae2b
Comment updated, here it's about cycles not usecs.
dok-net Feb 8, 2020
d62bb62
Revert misconception of how waveformToEnable/Disable communicates wit…
dok-net Feb 9, 2020
6f540ec
Rewrite to keep phase in sync if period remains same during duty cycl…
dok-net Feb 9, 2020
0e70a10
Rather iterate even if full-duty or no-duty cycle in period, than too…
dok-net Feb 11, 2020
279378e
Must fire timer early to reach waveform deadlines, otherwise under so…
dok-net Feb 11, 2020
7b8fb09
Schedule expiry explicitly, too.
dok-net Feb 11, 2020
97c050d
Quick change lets analogWrite keep phase for any duty cycle (includin…
dok-net Feb 15, 2020
50376df
Set duration to multiple of period, so tone stops on LOW pin output.
dok-net Feb 20, 2020
7a73c3c
Improve phase timing
dok-net Feb 26, 2020
e0826db
Eror causing next Timer IRQ to fail busy-to-off cycle transitions.
dok-net Mar 1, 2020
ff90bf2
Regression fix, don't reset timer if pending shortly.
dok-net Mar 2, 2020
cebdde2
Rather reschedule ISR instead of busy looping during permitted maximu…
dok-net Mar 2, 2020
f48dc80
Lead time improved for ISR
dok-net Mar 2, 2020
ee35cd7
Reduce number of cycle calculations.
dok-net Mar 2, 2020
7b410dd
Reactive the gcc optimize pragmas.
dok-net Mar 2, 2020
0fd99c0
Simplify calculation.
dok-net Mar 6, 2020
4cfc67d
handles overshoot where an updated period is shorter than the previou…
dok-net Mar 6, 2020
c670528
Misleading code, there must ever be only one bit set at a time, start…
dok-net Mar 7, 2020
eb00907
Prevent missing a duty cycle unless it is overshot already.
dok-net Mar 8, 2020
500bdea
Continuously remove distant pending waveform edges from the loop, con…
dok-net Mar 9, 2020
10d9fa1
Replace volatile for one-way exchange into ISR with memory fence.
dok-net Mar 9, 2020
3efd110
Remove redundant stack object.
dok-net Mar 9, 2020
6e9e60d
Revert pending waveform removal from loop - corrupts continuous next …
dok-net Mar 9, 2020
a54b921
Reduce if/do ... while to while
dok-net Mar 22, 2020
5e06f2d
Convert relative timings to absolute.
dok-net Mar 23, 2020
3b33c46
Relax waveform start to possibly cluster phases into same IRQ interval.
dok-net Mar 23, 2020
dfd0909
max 12us in ISR seems to work best for servo/fan/led/tone combo test.
dok-net Mar 23, 2020
7f70c9d
Restructured code in ISR for expiration, this saves 36 byte IRAM, and…
dok-net Mar 29, 2020
057a97e
Simplified overshot detection and 0% / 100% duty cycle.
dok-net Mar 29, 2020
e48dba6
Leave ISR early if rescheduling is more promising than busy-waiting u…
dok-net Mar 30, 2020
35f68c1
Stabilized timings.
dok-net Mar 31, 2020
7aeda96
Prevent WDT under load.
dok-net Apr 2, 2020
7c8ab63
Use clock cycle resolution instead of us for analogWrite.
dok-net Apr 6, 2020
c2d033b
Reduce idle calculations in ISR.
dok-net Apr 7, 2020
e6c575b
Optimize in-ISR time.
dok-net Apr 7, 2020
5616153
Support starting new waveform in phase with another running waveform.
dok-net Apr 8, 2020
a1b34e0
Align phase for analogWrite PWMs.
dok-net Apr 8, 2020
9ec21eb
Tune preshoot, add lost period fast forward.
dok-net Apr 8, 2020
c08339c
Adapt phase sync code from analogWrite to Servo
dok-net Apr 9, 2020
cce5416
Fix for going off 100% duty cycle period.
dok-net Apr 9, 2020
7dcf289
Eschew obfuscation.
dok-net Apr 10, 2020
33b6dc2
Fixed logic for zero duty cycle.
dok-net Apr 10, 2020
155790a
Determine generator quantum during same IRQ - this is better than tim…
dok-net Apr 11, 2020
185ed8b
Tune timings, fix write barriers and overshoot logic.
dok-net Apr 12, 2020
4d40503
Migrate Tone to waveform with CPU cycle precision
dok-net Apr 13, 2020
9125b6e
Can do 60kHz PWM.
dok-net Apr 14, 2020
0de83d0
Recalibrated timings after performance optimizations.
dok-net Apr 15, 2020
766664a
Fix regression for waveform runtime.
dok-net Apr 15, 2020
3d52749
Test cycle duration values for signed arithmetic safety.
dok-net Apr 16, 2020
b1cf98c
Performance tuning.
dok-net Apr 16, 2020
c87d27e
Performance tweak, in-ISR quantum is now 1.12µs.
dok-net Apr 16, 2020
4a3098d
Round up duration instead of down - possibly to zero, which means for…
dok-net Apr 17, 2020
5428d40
Extend phase alignment with optional phase offset.
dok-net Apr 19, 2020
d637519
Slightly better in-ISR quantum approximation for steadier increments.
dok-net Apr 19, 2020
7eb3c5b
Waveform stopped by runtime limit in iSR doesn't deinit the timer, bu…
dok-net Apr 19, 2020
4d18119
Improved quantum correction code.
dok-net Apr 20, 2020
87d3160
Fix broken multi-wave generation.
dok-net Apr 20, 2020
722c42a
Aggregate GPIO output across inner loop. True phase sync, and now bet…
dok-net Apr 21, 2020
30a53f1
IRQ latency can be reduced from 2 to 1 us now, no WDT etc.
dok-net Apr 21, 2020
65a6eb4
Improved handling of complete idle cycle miss, progress directly into…
dok-net Apr 21, 2020
e289a09
Recalibrated after latest changes and reverts.
dok-net Apr 22, 2020
158c17c
Overshoot compensation for duty cycle results in PWM milestone.
dok-net Apr 22, 2020
a9fff66
Adjustments to duty/idle cycle to mitigate effects of floating duty c…
dok-net Apr 22, 2020
d416000
Remove implicit condition from loop guard and fix timer restart duration
dok-net Apr 22, 2020
85213a6
Host all static globals in an anonymous static struct.
dok-net Apr 22, 2020
40efbef
Busy wait directly for next pending event and go to that pin.
dok-net Apr 22, 2020
85b134f
Record nextEventCcy in waveform struct to save a few cycles.
dok-net Apr 22, 2020
e30007e
Adapt duty cycle modification to only fix full duty and all idle cases.
dok-net Apr 22, 2020
1b7bb67
Remember next pin to operate between IRQs.
dok-net Apr 23, 2020
8ed22c3
Don't set pinMode each time on already running PWM or Tone.
dok-net Apr 23, 2020
902db01
Remove quantum, correct irq latency from testing,reuse isr timeout fr…
dok-net Apr 23, 2020
cadb30a
Move updating "now" out of inner loop, prevents float between pins th…
dok-net Apr 23, 2020
9514073
Merge init loop with action loop again.
dok-net Apr 23, 2020
a633413
Adaptive PWM frequency and floating duty cycle.
dok-net Apr 23, 2020
53288d0
Predictive static frequency scaling.
dok-net Apr 24, 2020
c3fec57
Dynamic frequency down-scaling
dok-net Apr 24, 2020
f0e62f5
Frequency scaling is only for PWM-like applications, anything needing…
dok-net Apr 24, 2020
3691890
Conserve IRAM cache, resort to best effort.
dok-net Apr 24, 2020
1f0b0a0
Directly scale frequency for all duty/all idle waves to reasonable ma…
dok-net Apr 24, 2020
30da4e7
Getting the math right beats permanently reducing PWM frequency.
dok-net Apr 25, 2020
d5302c6
Rename identifier to help think about the problem.
dok-net Apr 25, 2020
e654862
AutoPwm correction moved to correct location - after overshoot recalc…
dok-net Apr 26, 2020
17037fd
Finish overshoot math fixes.
dok-net Apr 26, 2020
05bd795
First set pin mode, then digital write.
dok-net Apr 28, 2020
56f9150
Simplify calculations, fix non-autoPwm for servo use, where exact dut…
dok-net Apr 28, 2020
f2462cf
Move wave initialization and modification outside the inner loop.
dok-net Apr 29, 2020
6d2b842
Some optimizing.
dok-net Apr 29, 2020
51bcb8c
Updating "now" in the inner loop should lessen interference
dok-net Apr 29, 2020
ab6b930
Finally get rid of volatile and use atomic thread fence memory barrie…
dok-net Apr 29, 2020
9b06876
Improved idle cycle overshoot mitigation.
dok-net Apr 30, 2020
9c598d1
Improved duty cycle overshoot mitigation.
dok-net May 1, 2020
8dbc0e9
Move startPin etc. into common static struct
dok-net May 2, 2020
88cbe1e
Persist next event cycle across ISR invocations, like initPin was bef…
dok-net May 2, 2020
d1560ba
Recalibrated DELTAIRQ and IRQLATENCY. Tested @ 3x 40kHz PWM + 440Hz Tone
dok-net May 2, 2020
cac08ce
CPU clock to Timer1 ccy correction must be dynamic even when BSP is c…
dok-net May 3, 2020
07cc7d0
Corrected use of Timer1 registers and add rationale to Timer1 use in …
dok-net May 3, 2020
a6b0cca
Let duty cycle overshoot correction depend on relative impact compare…
dok-net May 4, 2020
d5b3589
80MHz/160MHz specific code can be compile-time selected in general, o…
dok-net May 5, 2020
245d42f
Seems that removing the redudant resetting of edge interrupt mode sha…
dok-net May 5, 2020
2b6c366
Recalibrated delta irq ccys.
dok-net May 5, 2020
0df1713
Off-by-one in 100% duty overshoot correction.
dok-net May 6, 2020
c652646
Simple register writes.
dok-net May 6, 2020
809a7f8
Memory fences checked and joining events into same loop iteration tha…
dok-net May 6, 2020
8184fb8
Shorten progression when going off 100% duty.
dok-net May 6, 2020
235ee60
Code simplifications.
dok-net May 7, 2020
2e48b75
Dynamically map pins out from in-ISR handling based on next event tim…
dok-net May 8, 2020
5542f23
Reverting maximum IRQ period to 10ms. This sets the wave reprogrammin…
dok-net May 8, 2020
b623914
Revert recent change that is the most likely cause of reported PWM fr…
dok-net May 9, 2020
074fc53
Much simplified overshoot mitigation code.
dok-net May 9, 2020
4e636a3
Fixing overshoot mitigation, 3x 880Hz, 256 states now.
dok-net May 9, 2020
00a4fe2
Increase resolution by keeping reference time moving forward earlier.
dok-net May 10, 2020
58634be
Mitigation logic for ESP8266 SDK boosting to 160MHz during some WiFi …
dok-net May 10, 2020
057ff0e
Event timestamps are all recorded for compile-time CPU frequency, the…
dok-net May 11, 2020
8711860
Expired pins must not be checked for next event.
dok-net May 12, 2020
9c6b539
Recalibrate after latest changes.
dok-net May 11, 2020
2023938
Save a few bytes code.
dok-net May 12, 2020
4b24e55
Guards are in place, so xor rather than and bitwise not.
dok-net May 14, 2020
fd687ae
Reduce memory use.
dok-net May 15, 2020
4f4dd29
SDK boost to 160MHz may last across multiple ISR invocations, therefo…
dok-net May 17, 2020
6204e0d
Overshoot mitigation w/o PWM frequency change.
dok-net May 20, 2020
e059c36
New PWM overshoot mitigation code keeps frequency. Averages duty betw…
dok-net May 21, 2020
d75d844
Small refactoring, remove code path that is never taken even at 3x25k…
dok-net May 22, 2020
8eff567
Don't ever skip off duty, no matter if late or infinitely short.
dok-net May 22, 2020
68a5035
Shed speed-up code that didn't speed up things.
dok-net May 23, 2020
e25add4
Must always recompute new waveform.nextEventCcy if there is any busy …
dok-net May 23, 2020
0c4fa9b
Break out of ISR if timespan to next event allows, instead of busy wa…
dok-net May 24, 2020
34ed704
Minor code simplification.
dok-net May 26, 2020
97e079d
Improve code efficiency.
dok-net May 27, 2020
712b9bb
Improved performance of loop.
dok-net May 27, 2020
f8093c4
Recalibrated.
dok-net May 28, 2020
ba723df
No positive effect of lead time inclusion was found during testing, r…
dok-net May 28, 2020
cb72f0b
Fix WDT when at 160MHz CPU clock the Timer1 is set below 1µs.
dok-net May 30, 2020
76f4f85
Consolidate 160MHz constexpr check, finish 1µs minimum for Timer1 fix.
dok-net May 30, 2020
f0f6022
Test for non-zero before subtract should improve performance.
dok-net May 31, 2020
8329b28
Reviewers/tested noted they were seeing WDT, and this change appeared…
dok-net Jun 7, 2020
80a8e74
More expressive use of parentheses and alias CPU2X for reduced code s…
dok-net Jun 7, 2020
b2b54c5
Bug fix: at 160MHz compiled, don't force minimum Timer1 latency to 2µs.
dok-net Jun 7, 2020
ef93286
Alternate CPU frequency scaling mitigation.
dok-net Jun 8, 2020
01321c8
Handle time-of-flight in the right spot.
dok-net Jun 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
259 changes: 259 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
# Run whenever a PR is generated or updated.

# Most jobs check out the code, ensure Python3 is installed, and for build
# tests the ESP8266 toolchain is cached when possible to speed up execution.

name: ESP8266 Arduino CI

on:
pull_request:


jobs:

# Run 8 parallel jobs for the default build of all examples.
build-linux:
name: Build ${{ matrix.chunk }}
runs-on: ubuntu-latest
strategy:
matrix:
chunk: [0, 1, 2, 3, 4, 5, 6, 7]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Cache Linux toolchain
id: cache-linux
uses: actions/cache@v2
with:
path: ./tools/dist
key: key-linux-toolchain
- name: Build Sketches
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_TAG: ${{ github.ref }}
BUILD_PARITY: custom
mod: 8
rem: ${{ matrix.chunk }}
run: |
bash ./tests/build.sh


# Cover the debug and IPv6 cases by enabling both and running 8 parallel jobs
# over all example code.
build-debug-ipv6:
name: Debug IPv6 ${{ matrix.chunk }}
runs-on: ubuntu-latest
strategy:
matrix:
chunk: [0, 1, 2, 3, 4, 5, 6, 7]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Cache Linux toolchain
id: cache-linux
uses: actions/cache@v2
with:
path: ./tools/dist
key: key-linux-toolchain
- name: Build Sketches
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_TAG: ${{ github.ref }}
BUILD_PARITY: custom
mod: 8
rem: ${{ matrix.chunk }}
run: |
bash ./tests/debug6.sh


# Single build under Windows to ensure the Win toolchain is good.
build-windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Cache Windows toolchain
id: cache-windows
uses: actions/cache@v2
with:
path: ./tools/dist
key: key-windows-toolchain
- name: Build Sketch
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_TAG: ${{ github.ref }}
WINDOWS: 1
BUILD_PARITY: custom
mod: 500
rem: 1
run: |
# Windows has python3 already installed, but it's called "python".
# Copy python.exe to the proper name so scripts "just work".
copy (get-command python).source (get-command python).source.Replace("python.exe", "python3.exe")
bash ./tests/build.sh


# Single build under macOS to ensure the Mac toolchain is good.
build-mac:
name: Mac
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Cache Mac toolchain
id: cache-mac
uses: actions/cache@v2
with:
path: ./tools/dist
key: key-mac-toolchain
- name: Build Sketch
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_TAG: ${{ github.ref }}
MACOSX: 1
BUILD_PARITY: custom
mod: 500
rem: 1
run: |
bash ./tests/build.sh


# Run a few Platform.IO jobs (not full suite) to check PIO integration.
build-pio:
name: Build Platform.IO
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Build subset on Platform.IO
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_TAG: ${{ github.ref }}
BUILD_PARITY: custom
mod: 42 # Picked at random to give 4-5 builds and exit.
rem: 13
run: |
sudo apt-get install python3-pip python3-setuptools
PATH=/home/runner/.local/bin:$PATH bash ./tests/platformio.sh


# Run host test suite under valgrind for runtime checking of code.
host-tests:
name: Host tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Run host tests
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_TAG: ${{ github.ref }}
run: |
sudo apt-get install valgrind lcov
bash ./tests/ci/host_test.sh


# Ensure Sphinx can build the documentation properly.
documentation:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Build documentation
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_TAG: ${{ github.ref }}
run: |
sudo apt-get install python3-pip python3-setuptools
# GitHub CI installs pip3 and setuptools outside the path.
# Update the path to include them and run.
PATH=/home/runner/.local/bin:$PATH pip3 install --user -r doc/requirements.txt
PATH=/home/runner/.local/bin:$PATH bash ./tests/ci/build_docs.sh


# Standard Arduino formatting in all the examples
style-check:
name: Style and formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Style check
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_TAG: ${{ github.ref }}
run: |
sudo apt-get install astyle
bash ./tests/ci/style_check.sh


# Quick test that the mocking builds succeed
mock-check:
name: Mock trivial test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Mock build
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_TAG: ${{ github.ref }}
run: |
bash ./tests/buildm.sh


# Ensure no manual edits to boards.txt
boards-check:
name: Boards.txt check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Boards.txt diff
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_TAG: ${{ github.ref }}
run: |
bash ./tests/ci/build_boards.sh
56 changes: 56 additions & 0 deletions .github/workflows/release-to-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Whenever a release is published from a draft, this will update the
# master Arduino JSON file to add its new entry.

# We keep the master JSON file in another repo, so we need to use a pre-set
# Deployment SSH key to be able to push a change to the repo.

#### Steps to follow when you need to make a new SSH key for upload (not
#### normally needed!)

# Generate a new SSH key private/public pair

# ssh-keygen -t rsa -b 4096 -C "your@email.com" -f ./deploy_rsa

# Upload deploy_rsa.pub to the *ESP8266.GITHUB.IO* repo as a deployment key

# Convert the private key to base64 (to remove line breaks and allow easier
# usage in the script as an environment variable)

# base64.exe -w 0 < deploy_rsa > deploy_rsa.b64

# Copy the contents of the .b64 file to the clipboard, make a new GitHub
# secret in the ESP8266/Arduino repo called "GHCI_DEPLOY_KEY" and paste
# the B64 code into the variable.

name: ESP8266 Arduino Release Publisher

on:
release:
types: [published]

jobs:
package:
name: Update master JSON file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Set GIT tag name
run: |
echo "::set-env name=TRAVIS_TAG::$(git describe --exact-match --tags)"
- name: Deploy updated JSON
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
BUILD_TYPE: package
CI_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
GHCI_DEPLOY_KEY: ${{ secrets.GHCI_DEPLOY_KEY }}
run: |
bash ./tests/ci/build_package.sh
# Only the regenerated JSON file will be used, but it's simpler
# than looking for it in a GH release.
bash ./package/deploy_package_index.sh

40 changes: 40 additions & 0 deletions .github/workflows/tag-to-draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Whenever a tag of the form #.xxxx is pushed against master, generate a
# draft release and upload the ZIP and JSON file to it. Maintainers then
# will manually add the changelist and publish it.

name: ESP8266 Arduino Draft Release

on:
push:
tags:
# Run for tags of the x.x.x* form (i.e. 3.0.0, 3.0.0-beta, etc.).
- '[0-9]+.[0-9]+.[0-9]+*'

jobs:
package:
name: Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Set GIT tag name
run: |
# Sets an environment variable used in the next steps
echo "::set-env name=TRAVIS_TAG::$(git describe --exact-match --tags)"
- name: Build package JSON
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
BUILD_TYPE: package
CI_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
run: |
bash ./tests/ci/build_package.sh
pip3 install PyGithub
# Create a draft release and upload the ZIP and JSON files.
# This draft is not visible to normal users and needs to be
# updated manually with release notes and published from the
# GitHub web interface.
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
Loading