mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-24 14:48:14 +03:00
* Fix ESP8266SdFat architecture Avoid problems reported in https://forum.arduino.cc/index.php?topic=726897.msg4889319 * Fix Windows CI, python3 now *maybe* exists Python3 used to be called "python.exe" on earlier VMs, but it looks like the image has been updated and a "python3.exe" does now exist. Update the CI script to first check it "python3" exists, and if not then do the copy hack, OTW do nothing.
272 lines
7.4 KiB
YAML
272 lines
7.4 KiB
YAML
# 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: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
|
|
- 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: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
|
|
- 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: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
|
|
- 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".
|
|
try { Get-Command python3 } catch { 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: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
|
|
- 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 update
|
|
sudo apt 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 update
|
|
sudo apt 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 update
|
|
sudo apt 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 update
|
|
sudo apt 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: Cache Linux toolchain
|
|
id: cache-linux
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ./tools/dist
|
|
key: ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh') }}
|
|
- name: Boards.txt diff
|
|
env:
|
|
TRAVIS_BUILD_DIR: ${{ github.workspace }}
|
|
TRAVIS_TAG: ${{ github.ref }}
|
|
run: |
|
|
bash ./tests/ci/build_boards.sh
|
|
bash ./tests/ci/eboot_test.sh
|
|
bash ./tests/ci/pkgrefs_test.sh
|