mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-27 19:57:38 +00:00
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
96 lines
2.7 KiB
YAML
96 lines
2.7 KiB
YAML
# Checks whether the pushed commit can be build with PIO. Only triggered on normal push to the mega branch without tag and with pull requests targeting mega
|
|
|
|
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [mega]
|
|
tags-ignore: '**'
|
|
paths-ignore:
|
|
- 'dist/Release_notes.txt'
|
|
pull_request:
|
|
branches: [mega]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
documentation:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.x'
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }}
|
|
- name: Build documentation
|
|
run: |
|
|
cd docs
|
|
sudo apt install imagemagick zip
|
|
pip install -r requirements.txt
|
|
make html
|
|
cd ..
|
|
zip -r -qq ESPEasy_docs.zip docs/build/*
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Documentation
|
|
path: ESPEasy_docs.zip
|
|
generate-matrix:
|
|
runs-on: ubuntu-20.04
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.x'
|
|
- id: set-matrix
|
|
run: |
|
|
pip install platformio
|
|
python tools/ci/generate-matrix.py
|
|
|
|
build:
|
|
needs: generate-matrix
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.x'
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-${{ hashFiles('requirements.txt') }}
|
|
- uses: actions/cache@v3
|
|
if: ${{ contains(matrix.env, 'esp32') }}
|
|
with:
|
|
path: ~/.platformio
|
|
key: ${{ runner.os }}-esp32-${{ hashFiles('platformio*.ini') }}
|
|
- uses: actions/cache@v3
|
|
if: ${{ contains(matrix.env, 'esp8266') }}
|
|
with:
|
|
path: ~/.platformio
|
|
key: ${{ runner.os }}-esp8266-${{ hashFiles('platformio*.ini') }}
|
|
- name: Dependencies
|
|
run: |
|
|
sudo apt install binutils build-essential libffi-dev python-dev libgit2-dev
|
|
pip install -r requirements.txt
|
|
platformio update
|
|
- name: Build and archive
|
|
id: build-and-archive
|
|
env:
|
|
CHIP: ${{ matrix.chip }}
|
|
ENV: ${{ matrix.env }}
|
|
run: |
|
|
python tools/ci/build-and-archive.py
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Binaries
|
|
path: ESPEasy_${{ matrix.env }}.zip
|
|
if-no-files-found: ignore
|