From 2326a6c48a8f60959be0d69fab7e75ba89315a0a Mon Sep 17 00:00:00 2001 From: Nitek Date: Sun, 4 Feb 2024 13:47:54 +0100 Subject: [PATCH 1/2] Exclude non webflashable examples from build --- .github/workflows/main.yml | 2 +- Examples/Basics/7-HelloRadio/platformio.ini | 1 + Examples/Projects/RollingClock/platformio.ini | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d5df98..04c6cad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,7 @@ jobs: pip install --upgrade platformio - name: Build run: | - find . -not -path '*/.*' -type f -name 'platformio.ini' -printf '%h\n' | xargs -i bash -c "(echo {}; pio run -e cyd -e cyd2usb -d {})" + find . -not -path '*/.*' -type f -name 'platformio.ini' -print0 | xargs -0 grep -L "; nowebflash" | xargs -i bash -c "(echo {}; pio run -e cyd -e cyd2usb -d {})" - name: Merge flash files run: | find . -path '*/.pio*' -type f -name 'firmware.bin' -printf '%h\n' | xargs -i bash -c "(echo {}; cd {}; ~/.platformio/packages/tool-esptoolpy/esptool.py --chip esp32 merge_bin -o merged-flash.bin --flash_mode dio --flash_size 4MB 0x1000 bootloader.bin 0x8000 partitions.bin 0x10000 firmware.bin)" diff --git a/Examples/Basics/7-HelloRadio/platformio.ini b/Examples/Basics/7-HelloRadio/platformio.ini index 4d0dd33..37bb7fb 100644 --- a/Examples/Basics/7-HelloRadio/platformio.ini +++ b/Examples/Basics/7-HelloRadio/platformio.ini @@ -1,3 +1,4 @@ +; nowebflash [platformio] src_dir = . default_envs = cyd diff --git a/Examples/Projects/RollingClock/platformio.ini b/Examples/Projects/RollingClock/platformio.ini index ff2c443..1357c0f 100644 --- a/Examples/Projects/RollingClock/platformio.ini +++ b/Examples/Projects/RollingClock/platformio.ini @@ -1,3 +1,4 @@ +; nowebflash [platformio] src_dir = . default_envs = cyd From c3c271eb224fd070feab0760bd776c9f4e21136f Mon Sep 17 00:00:00 2001 From: Nitek Date: Sun, 4 Feb 2024 14:01:43 +0100 Subject: [PATCH 2/2] Update github actions --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 04c6cad..8d2e70e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,19 +18,19 @@ jobs: steps: - uses: actions/checkout@v4 - name: Cache pip - uses: actions/cache@v3 + 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@v3 + uses: actions/cache@v4 with: path: ~/.platformio key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install PlatformIO @@ -72,9 +72,9 @@ jobs: echo ']}' >> tmp/examples.json - name: Setup Github Page - uses: actions/configure-pages@v3 + uses: actions/configure-pages@v4 - name: Upload webflash files - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: ./tmp @@ -90,4 +90,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 \ No newline at end of file + uses: actions/deploy-pages@v4 \ No newline at end of file