diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml deleted file mode 100644 index 9d23daeb..00000000 --- a/.github/workflows/documentation.yml +++ /dev/null @@ -1,214 +0,0 @@ -# matth-x/MicroOcpp -# Copyright Matthias Akstaller 2019 - 2024 -# MIT License - -name: Documentation -on: - push: - branches: - - main - pull_request: - -permissions: - contents: write - -jobs: - build_simulator: - name: Build Simulator - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.x - - uses: actions/cache@v4 - with: - key: ${{ github.ref }} - path: .cache - - name: Get build tools - run: | - sudo apt update - sudo apt install cmake libssl-dev build-essential - - name: Checkout Simulator - uses: actions/checkout@v3 - with: - repository: matth-x/MicroOcppSimulator - path: MicroOcppSimulator - ref: 2cb07cdbe53954a694a29336ab31eac2d2b48673 - submodules: 'recursive' - - name: Clean MicroOcpp submodule - run: | - rm -rf MicroOcppSimulator/lib/MicroOcpp - - name: Checkout MicroOcpp submodule - uses: actions/checkout@v3 - with: - path: MicroOcppSimulator/lib/MicroOcpp - - name: Generate CMake files - run: cmake -S ./MicroOcppSimulator -B ./MicroOcppSimulator/build -DCMAKE_CXX_FLAGS="-DMO_OVERRIDE_ALLOCATION=1 -DMO_ENABLE_HEAP_PROFILER=1" - - name: Compile - run: cmake --build ./MicroOcppSimulator/build -j 32 --target mo_simulator - - name: Upload Simulator executable - uses: actions/upload-artifact@v4 - with: - name: Simulator executable - path: | - MicroOcppSimulator/build/mo_simulator - MicroOcppSimulator/public/bundle.html.gz - if-no-files-found: error - retention-days: 1 - - measure_heap: - needs: build_simulator - name: Heap measurements - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.x - - name: Install Python dependencies - run: pip install requests paramiko pandas - - name: Get Simulator - uses: actions/download-artifact@v4 - with: - name: Simulator executable - path: MicroOcppSimulator - - name: Measure heap and create reports - run: | - mkdir -p docs/assets/tables - python tests/benchmarks/scripts/measure_heap.py - env: - TEST_DRIVER_URL: ${{ secrets.TEST_DRIVER_URL }} - TEST_DRIVER_CONFIG: ${{ secrets.TEST_DRIVER_CONFIG }} - TEST_DRIVER_KEY: ${{ secrets.TEST_DRIVER_KEY }} - MO_SIM_CONFIG: ${{ secrets.MO_SIM_CONFIG }} - MO_SIM_OCPP_SERVER: ${{ secrets.MO_SIM_OCPP_SERVER }} - MO_SIM_API_CERT: ${{ secrets.MO_SIM_API_CERT }} - MO_SIM_API_KEY: ${{ secrets.MO_SIM_API_KEY }} - MO_SIM_API_CONFIG: ${{ secrets.MO_SIM_API_CONFIG }} - SSH_LOCAL_PRIV: ${{ secrets.SSH_LOCAL_PRIV }} - SSH_HOST_PUB: ${{ secrets.SSH_HOST_PUB }} - - name: Upload reports - uses: actions/upload-artifact@v4 - with: - name: Memory usage reports CSV - path: docs/assets/tables - if-no-files-found: error - - build_firmware_size: - name: Build firmware - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Cache pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Cache PlatformIO - uses: actions/cache@v4 - 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 - name: Static firmware analysis - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.x - - uses: actions/cache@v4 - 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: e1155149d54bb09b81e86f0e4e5cb7fbd2a318eb - 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 -p 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, measure_heap] - name: Deploy docs - 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@v4 - 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: Get memory occupation reports - uses: actions/download-artifact@v4 - with: - name: Memory usage reports CSV - path: docs/assets/tables - - name: Run mkdocs - run: mkdocs gh-deploy --force diff --git a/.github/workflows/esp-idf.yml b/.github/workflows/esp-idf.yml deleted file mode 100644 index 279cd4a8..00000000 --- a/.github/workflows/esp-idf.yml +++ /dev/null @@ -1,53 +0,0 @@ -# matth-x/MicroOcpp -# Copyright Matthias Akstaller 2019 - 2024 -# MIT License - -name: ESP-IDF CI - -on: - push: - branches: - - main - - pull_request: - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - name: Checkout ESP-IDF example folder structure - uses: actions/checkout@v3 - with: - sparse-checkout: examples/ESP-IDF - - name: Clean sumodules folders template - run: rm -r ./examples/ESP-IDF/components/* - - name: Checkout main repo - uses: actions/checkout@v3 - with: - path: examples/ESP-IDF/components/MicroOcpp - - name: Checkout Mongoose - uses: actions/checkout@v3 - with: - repository: cesanta/mongoose-esp-idf - path: examples/ESP-IDF/components/mongoose - submodules: 'recursive' - - name: Checkout Mongoose WS adapter - uses: actions/checkout@v3 - with: - repository: matth-x/MicroOcppMongoose - ref: v1.2.0 - path: examples/ESP-IDF/components/MicroOcppMongoose - - name: Checkout ArduinoJson - uses: actions/checkout@v3 - with: - repository: bblanchon/ArduinoJson - ref: 3e1be980d93e47b2a0073efeeb9a9396fd7a83be - path: examples/ESP-IDF/components/ArduinoJson - - name: esp-idf build - uses: espressif/esp-idf-ci-action@v1 - with: - esp_idf_version: v4.4 - target: esp32 - path: './examples/ESP-IDF' diff --git a/.github/workflows/pio.yml b/.github/workflows/pio.yml deleted file mode 100644 index 189351fd..00000000 --- a/.github/workflows/pio.yml +++ /dev/null @@ -1,47 +0,0 @@ -# matth-x/MicroOcpp -# Copyright Matthias Akstaller 2019 - 2024 -# MIT License - -name: PlatformIO CI - -on: - push: - branches: - - main - - pull_request: - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - example: [examples/ESP/main.cpp, examples/ESP-TLS/main.cpp] - - steps: - - uses: actions/checkout@v4 - - name: Cache pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Cache PlatformIO - uses: actions/cache@v4 - 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: Install library dependencies - run: pio pkg install - - name: Run PlatformIO - run: pio ci --lib="." --project-conf=platformio.ini ${{ matrix.dashboard-extra }} - env: - PLATFORMIO_CI_SRC: ${{ matrix.example }} diff --git a/.github/workflows/platformless.yml b/.github/workflows/platformless.yml deleted file mode 100644 index 58e7b1ee..00000000 --- a/.github/workflows/platformless.yml +++ /dev/null @@ -1,32 +0,0 @@ -# matth-x/MicroOcpp -# Copyright Matthias Akstaller 2019 - 2024 -# MIT License - -name: Default Compilation - -on: - push: - branches: - - main - - pull_request: - -jobs: - - compile-platform: - name: Compile (no linking) - runs-on: ubuntu-latest - steps: - - name: Check out repository code - uses: actions/checkout@v3 - - name: Get gcc compiler - run: | - sudo apt update - sudo apt install build-essential - sudo apt -y install gcc-9 g++-9 - g++ --version - echo "g++ version must be 9.4.0" - - name: Get ArduinoJson - run: wget -Uri https://github.com/bblanchon/ArduinoJson/releases/download/v6.19.4/ArduinoJson-v6.19.4.h -O ./src/ArduinoJson.h - - name: Compile - run: g++ -c -std=c++11 -I ./src $(find ./src -type f -iregex ".*\.cpp") -DMO_PLATFORM=MO_PLATFORM_NONE -Wall -Wextra -Wno-unused-parameter -Wno-redundant-move -Werror diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 38b1d04e..00000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,61 +0,0 @@ -# matth-x/MicroOcpp -# Copyright Matthias Akstaller 2019 - 2024 -# MIT License - -name: Unit tests - -on: - push: - branches: - - main - - pull_request: - -jobs: - - compile-and-run: - name: Automated Tests - runs-on: ubuntu-latest - steps: - - name: Check out repository code - uses: actions/checkout@v3 - - name: Check out MbedTLS - uses: actions/checkout@v3 - with: - repository: Mbed-TLS/mbedtls - ref: v2.28.10 - path: lib/mbedtls - - name: Get build tools - run: | - sudo apt update - sudo apt install build-essential cmake lcov valgrind - sudo apt -y install gcc-9 g++-9 - g++ --version - echo "g++ version must be 9.4.0" - - name: Get ArduinoJson - run: wget -Uri https://github.com/bblanchon/ArduinoJson/releases/download/v6.21.3/ArduinoJson-v6.21.3.h -O ./src/ArduinoJson.h - - name: Generate CMake build files - run: cmake -S . -B ./build -DMO_BUILD_UNIT_MBEDTLS=True - - name: Compile - run: cmake --build ./build -j 32 --target mo_unit_tests - - name: Configure FS - run: mkdir mo_store - - name: Run tests (valgrind) - run: valgrind --error-exitcode=1 --leak-check=full ./build/mo_unit_tests --abort - - name: Generate CMake build files (AddressSanitizer, UndefinedBehaviorSanitizer) - run: | - rm -r ./build - cmake -S . -B ./build -DCMAKE_CXX_FLAGS="-fsanitize=address -fsanitize=undefined" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address -fsanitize=undefined" -DMO_BUILD_UNIT_MBEDTLS=True - - name: Compile (ASan, UBSan) - run: cmake --build ./build -j 32 --target mo_unit_tests - - name: Run tests (ASan, UBSan) - run: ./build/mo_unit_tests --abort - - name: Create coverage report - run: | - lcov --directory . --capture --output-file coverage.info --ignore-errors mismatch - lcov --remove coverage.info '/usr/*' '*/tests/*' '*/ArduinoJson.h' --output-file coverage.info - lcov --list coverage.info - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index d47070b1..00000000 --- a/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -.pio -.vscode -build -lib -mo_store -src/ArduinoJson* -src/main.cpp -tests/helpers/ArduinoJson* -coverage.info -docs/assets diff --git a/examples/ESP-IDF/components/ArduinoJson/.gitkeep b/.nojekyll similarity index 100% rename from examples/ESP-IDF/components/ArduinoJson/.gitkeep rename to .nojekyll diff --git a/404.html b/404.html new file mode 100644 index 00000000..aa8b8da5 --- /dev/null +++ b/404.html @@ -0,0 +1,579 @@ + + + +
+ + + + + + + + + + + + + + +