forked from espressif/arduino-esp32
ci: Miscellaneous improvements (#6132)
Cache downloaded tools. Cancel duplicate jobs. Use current repo when linking the core, this allows users to test their code when creating PRs against their forks (for instance an error in an example sketch will build successfully in a fork workflow.) Cache Arduino IDE. Add workflow_dispatch to be able to trigger the workflow manually.
This commit is contained in:
committed by
GitHub
parent
c6e30e0027
commit
77756d8a06
@ -15,7 +15,7 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then
|
|||||||
pip install requests > /dev/null
|
pip install requests > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then
|
if [ ! -z "$GITHUB_REPOSITORY" ]; then
|
||||||
echo "Linking Core..."
|
echo "Linking Core..."
|
||||||
ln -s $GITHUB_WORKSPACE esp32
|
ln -s $GITHUB_WORKSPACE esp32
|
||||||
else
|
else
|
||||||
|
23
.github/workflows/push.yml
vendored
23
.github/workflows/push.yml
vendored
@ -1,14 +1,19 @@
|
|||||||
name: ESP32 Arduino CI
|
name: ESP32 Arduino CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- release/*
|
- release/*
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: build-${{github.event.pull_request.number || github.ref}}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
# Ubuntu
|
# Ubuntu
|
||||||
build-arduino-linux:
|
build-arduino-linux:
|
||||||
name: Arduino ${{ matrix.chunk }} on ubuntu-latest
|
name: Arduino ${{ matrix.chunk }} on ubuntu-latest
|
||||||
@ -16,12 +21,22 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
chunk: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
|
chunk: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
|
- name: Cache tools
|
||||||
|
id: cache-linux
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
./tools/dist
|
||||||
|
~/arduino_ide
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('package/package_esp32_index.template.json',
|
||||||
|
'tools/get.py',
|
||||||
|
'.github/scripts/install-arduino-ide.sh') }}
|
||||||
- name: Build Sketches
|
- name: Build Sketches
|
||||||
run: bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} 15
|
run: bash ./.github/scripts/on-push.sh ${{ matrix.chunk }} 15
|
||||||
|
|
||||||
@ -32,7 +47,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest, macOS-latest]
|
os: [windows-latest, macOS-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
@ -48,7 +63,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
|
Reference in New Issue
Block a user