fix: disable sleep while charging to allow external communication and… #526
This file contains hidden or 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
| name: PlatformIO CI | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| pull_request: | |
| branches: | |
| - "**" | |
| jobs: | |
| paxo_v5_build_test_upload: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/pip | |
| ~/.platformio/.cache | |
| .pio/build_cache | |
| .pio/libdeps | |
| key: ${{ runner.os }}-platformio-ci-paxo-v5 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install PlatformIO Core | |
| run: pip install --upgrade platformio | |
| # We are unable to run tests on ESP32 | |
| - name: Build PlatformIO Project for Paxo ESP32 | |
| run: pio run -e paxo-v5 | |
| - name: Move files into artifact directory | |
| shell: bash | |
| run: | | |
| mkdir build | |
| cp -r .pio/build/paxo-v5/firmware.bin build | |
| cp -r .pio/build/paxo-v5/firmware.elf build | |
| [[ -e .pio/build/paxo-v5/firmware.map ]] && cp -r .pio/build/paxo-v5/firmware.map build | |
| cp -r .pio/build/paxo-v5/bootloader.bin build | |
| cp -r .pio/build/paxo-v5/partitions.bin build | |
| cp -r cacert.pem build | |
| cp -r storage build | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: paxo-v5-build | |
| include-hidden-files: true | |
| path: | | |
| build/ | |
| linux_build_test_upload: | |
| name: "Linux: Build, Test, and Upload" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/pip | |
| ~/.platformio/.cache | |
| .pio/build_cache | |
| .pio/libdeps | |
| key: ${{ runner.os }}-platformio-ci-linux | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install PlatformIO Core | |
| run: pip install --upgrade platformio | |
| - name: Install dependencies | |
| run: sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse" && sudo apt-get update -y -qq && sudo apt-get install -y libsdl2-dev curl libcurl4-openssl-dev | |
| - name: Run tests for Linux | |
| run: pio test -e linux --json-output-path linux-test-report.json --junit-output-path linux-test-report.xml | |
| - name: Upload test reports | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-test-reports | |
| path: | | |
| linux-test-report.json | |
| linux-test-report.xml | |
| - name: Build PlatformIO Project for Linux | |
| run: pio run -e linux | |
| - name: Move files into artifact directory | |
| shell: bash | |
| run: | | |
| mkdir build | |
| cp -r .pio/build/linux/program build | |
| cp -r storage build | |
| cp -r cacert.pem build | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-build | |
| include-hidden-files: true | |
| path: | | |
| build/ | |
| macos_build_test_upload: | |
| name: "macOS: Build, Test, and Upload" | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/pip | |
| ~/.platformio/.cache | |
| .pio/build_cache | |
| .pio/libdeps | |
| key: ${{ runner.os }}-platformio-ci-macos | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install PlatformIO Core | |
| run: pip install --upgrade platformio | |
| - name: Install dependencies | |
| run: brew install SDL2 curl | |
| - name: Run tests for macOS | |
| run: DYLD_LIBRARY_PATH="`brew --prefix sdl2`/lib" pio test -e macos --json-output-path macos-test-report.json --junit-output-path macos-test-report.xml | |
| - name: Upload test reports | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-test-reports | |
| path: | | |
| macos-test-report.json | |
| macos-test-report.xml | |
| - name: Build PlatformIO Project for macOS | |
| run: DYLD_LIBRARY_PATH="`brew --prefix sdl2`/lib" pio run -e macos | |
| - name: Move files into artifact directory | |
| shell: bash | |
| run: | | |
| mkdir build | |
| cp -r .pio/build/macos/program build | |
| cp -r storage build | |
| cp -r cacert.pem build | |
| chmod +x build/program | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-build | |
| include-hidden-files: true | |
| path: | | |
| build/ | |
| windows_build_test_upload: | |
| name: "Windows: Build, Test, and Upload" | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/pip | |
| ~/.platformio/.cache | |
| .pio/build_cache | |
| .pio/libdeps | |
| key: ${{ runner.os }}-platformio-ci-windows | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install PlatformIO Core | |
| run: pip install --upgrade platformio | |
| - name: Run tests for Windows | |
| run: pio test -e windows --json-output-path windows-test-report.json --junit-output-path windows-test-report.xml | |
| - name: Upload test reports | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-test-reports | |
| path: | | |
| windows-test-report.json | |
| windows-test-report.xml | |
| - name: Build PlatformIO Project for Windows | |
| run: pio run -e windows | |
| - name: Move files into artifact directory | |
| shell: bash | |
| run: | | |
| mkdir build | |
| cp -r .pio/build/windows/program.exe build | |
| cp -r .pio/build/windows/*.dll build | |
| cp -r cacert.pem build | |
| cp -r storage build | |
| - name: Copy required DLLs into artifact directory | |
| run: python scripts/github_actions/windows/get_dll.py build | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-build | |
| include-hidden-files: true | |
| path: | | |
| build/ | |