[P104] Improve storing settings (speed and size) #6877
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' | |
- 'docs/**' | |
pull_request: | |
branches: [mega] | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
documentation: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- uses: actions/cache@v4 | |
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 | |
python ./builds_overview.py | |
make html | |
cd .. | |
zip -r -qq ESPEasy_docs.zip docs/build/* | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Documentation | |
path: ESPEasy_docs.zip | |
generate-matrix: | |
runs-on: ubuntu-22.04 | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
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-22.04 | |
strategy: | |
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-${{ hashFiles('requirements.txt') }} | |
- uses: actions/cache@v4 | |
if: ${{ contains(matrix.env, 'esp32') }} | |
with: | |
path: ~/.platformio | |
key: ${{ runner.os }}-esp32-${{ hashFiles('platformio*.ini') }} | |
- uses: actions/cache@v4 | |
if: ${{ contains(matrix.env, 'esp8266') }} | |
with: | |
path: ~/.platformio | |
key: ${{ runner.os }}-esp8266-${{ hashFiles('platformio*.ini') }} | |
- name: Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt install binutils build-essential libffi-dev libgit2-dev | |
pip3 install --upgrade pip | |
pip install wheel | |
pip install -r requirements.txt | |
platformio update | |
- name: Get current date | |
id: date | |
run: | | |
echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT | |
- name: Build and archive | |
id: build-and-archive | |
env: | |
CHIP: ${{ matrix.chip }} | |
ENV: ${{ matrix.env }} | |
run: | | |
python tools/ci/build-and-archive.py | |
- id: string | |
uses: Entepotenz/change-string-case-action-min-dependencies@v1 | |
with: | |
string: ${{ matrix.chip }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
# FIXME Workaround to (temporarily) not use # in the artifact name, see https://github.com/actions/upload-artifact/issues/473 | |
name: Bin-${{ steps.string.outputs.uppercase }}-${{ matrix.env }}-${{ steps.date.outputs.builddate }}_PR_${{ github.event.number }}_${{ github.run_id }} # Sort by ESP type | |
path: | | |
bin | |
if-no-files-found: ignore | |
# Package all ESP82xx and ESP32 into a single ESPEasy-all-Binaries-<date>_PR#<pr_nr>_<runnr>.zip | |
combine_package: | |
needs: build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }} | |
- name: Get current date | |
id: date | |
run: | | |
echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT | |
- name: Download all artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts/Binaries/bin/ | |
pattern: Bin-* | |
merge-multiple: true | |
- name: List all files in the package for single-archive upload | |
run: | | |
cd artifacts/Binaries/ | |
ls -R | |
- uses: actions/upload-artifact@v4 | |
with: | |
# FIXME Workaround to (temporarily) not use # in the artifact name, see https://github.com/actions/upload-artifact/issues/473 | |
name: ESPEasy-all-Binaries-${{ steps.date.outputs.builddate }}_PR_${{ github.event.number }}_${{ github.run_id }} | |
path: | | |
artifacts/Binaries/ | |
if-no-files-found: ignore |