OCPP 2.0.1 Fixes after functionality tests #235
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
# matth-x/MicroOcpp | |
# Copyright Matthias Akstaller 2019 - 2024 | |
# MIT License | |
name: documentation | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: write | |
jobs: | |
build_firmware_size: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Cache PlatformIO | |
uses: actions/cache@v2 | |
with: | |
path: ~/.platformio | |
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
- name: Install PlatformIO | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade platformio | |
- name: Run PlatformIO | |
run: pio ci --lib="." --build-dir="${{ github.workspace }}/../build" --keep-build-dir --project-conf="./tests/benchmarks/firmware_size/platformio.ini" ./tests/benchmarks/firmware_size/main.cpp | |
- name: Move firmware files # change path to location without parent dir ('..') statement (to make upload-artifact happy) | |
run: | | |
mkdir firmware | |
mv "${{ github.workspace }}/../build/.pio/build/v16/firmware.elf" firmware/firmware_v16.elf | |
mv "${{ github.workspace }}/../build/.pio/build/v201/firmware.elf" firmware/firmware_v201.elf | |
- name: Upload firmware linker files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Firmware linker files | |
path: firmware | |
if-no-files-found: error | |
retention-days: 1 | |
evaluate_firmware: | |
needs: build_firmware_size | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- uses: actions/cache@v2 | |
with: | |
key: ${{ github.ref }} | |
path: .cache | |
- name: Install Python dependencies | |
run: pip install pandas | |
- name: Get build tools | |
run: | | |
sudo apt update | |
sudo apt install build-essential cmake ninja-build | |
sudo apt -y install gcc-9 g++-9 | |
g++ --version | |
- name: Check out bloaty | |
uses: actions/checkout@v3 | |
with: | |
repository: google/bloaty | |
ref: 379d5305670c00c36a57e608079fd253f13bde63 | |
path: tools/bloaty | |
submodules: recursive | |
- name: Install bloaty | |
run: | | |
cmake -B tools/bloaty/build -G Ninja -S tools/bloaty | |
cmake --build tools/bloaty/build -j 32 | |
- name: Get firmware linker files | |
uses: actions/download-artifact@v4 | |
with: | |
name: Firmware linker files | |
path: firmware | |
- name: Run bloaty | |
run: | | |
mkdir docs/assets | |
mkdir docs/assets/tables | |
tools/bloaty/build/bloaty firmware/firmware_v16.elf -d compileunits --csv -n 0 > docs/assets/tables/bloaty_v16.csv | |
tools/bloaty/build/bloaty firmware/firmware_v201.elf -d compileunits --csv -n 0 > docs/assets/tables/bloaty_v201.csv | |
- name: Evaluate and create reports | |
run: python tests/benchmarks/scripts/eval_firmware_size.py | |
- name: Upload reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Firmware size reports CSV | |
path: docs/assets/tables | |
if-no-files-found: error | |
deploy: | |
needs: evaluate_firmware | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- uses: actions/cache@v2 | |
with: | |
key: ${{ github.ref }} | |
path: .cache | |
- name: Install Python dependencies | |
run: pip install pandas mkdocs-material mkdocs-table-reader-plugin | |
- name: Get firmware size reports | |
uses: actions/download-artifact@v4 | |
with: | |
name: Firmware size reports CSV | |
path: docs/assets/tables | |
- name: Run mkdocs | |
run: mkdocs gh-deploy --force |