From 809823a9b0a6a1e9599b91f3c642fc749df5a306 Mon Sep 17 00:00:00 2001 From: CaCO3 Date: Sat, 31 Dec 2022 20:16:20 +0100 Subject: [PATCH] Update build.yaml (#1737) * Update build.yaml * Update build.yaml --- .github/workflows/build.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1c514c30..eb2d1624 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,6 +24,14 @@ jobs: run: | echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Cache PIP + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Cache PlatformIO uses: actions/cache@v3 with: @@ -34,11 +42,18 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.10' + - name: Install PlatformIO run: | python -m pip install --upgrade pip pip install --upgrade platformio + - name: Use Build Cache + uses: actions/cache@v3 + with: + path: ./code/.pio/ + key: ${{ runner.os }}-pio-${{ github.ref_name }} + - name: Build Firmware #run: echo "Testing... ${{ github.ref_name }}, ${{ steps.vars.outputs.sha_short }}" > ./sd-card/html/version.txt; mkdir -p ./code/.pio/build/esp32cam/; cd ./code/.pio/build/esp32cam/; echo "${{ steps.vars.outputs.sha_short }}" > firmware.bin; cp firmware.bin partitions.bin; cp firmware.bin bootloader.bin # Testing run: cd code; platformio run --environment esp32cam