From 02717039ae507d13df35747dfac1ed2fde7cb3ce Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Mon, 25 Dec 2023 16:57:48 +0100 Subject: [PATCH 01/14] [Build] Fix buildscripts for v4 Actions `upload-artifact`, `download-artifact` and `delete-artifact` --- .github/workflows/build.yml | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5849a2f13..4e41710a25 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: make html cd .. zip -r -qq ESPEasy_docs.zip docs/build/* - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Documentation path: ESPEasy_docs.zip @@ -96,9 +96,9 @@ jobs: ENV: ${{ matrix.env }} run: | python tools/ci/build-and-archive.py - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: Binaries + name: Binaries-${{ matrix.runs-on }} path: | bin if-no-files-found: ignore @@ -120,9 +120,11 @@ jobs: id: date run: | echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - path: artifacts/ + path: artifacts/Binaries/ + pattern: Binaries-* + merge-multiple: true - name: Prepare artifacts run: | # ESP82xx @@ -150,62 +152,63 @@ jobs: fi done # Each supported cpu has to be listed separately, but empty folders are ignored - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_PR#${{ github.event.number }}_${{ github.run_id }} path: | ESPEasy_dist_ESP32/* if-no-files-found: ignore - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32solo1_PR#${{ github.event.number }}_${{ github.run_id }} path: | ESPEasy_dist_ESP32solo1/* if-no-files-found: ignore - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s2_PR#${{ github.event.number }}_${{ github.run_id }} path: | ESPEasy_dist_ESP32s2/* if-no-files-found: ignore - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c3_PR#${{ github.event.number }}_${{ github.run_id }} path: | ESPEasy_dist_ESP32c3/* if-no-files-found: ignore - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s3_PR#${{ github.event.number }}_${{ github.run_id }} path: | ESPEasy_dist_ESP32s3/* if-no-files-found: ignore - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c2_PR#${{ github.event.number }}_${{ github.run_id }} path: | ESPEasy_dist_ESP32c2/* if-no-files-found: ignore - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c6_PR#${{ github.event.number }}_${{ github.run_id }} path: | ESPEasy_dist_ESP32c6/* if-no-files-found: ignore - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32h2_PR#${{ github.event.number }}_${{ github.run_id }} path: | ESPEasy_dist_ESP32h2/* if-no-files-found: ignore - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP82xx_PR#${{ github.event.number }}_${{ github.run_id }} path: | ESPEasy_dist_ESP82xx/* if-no-files-found: ignore # When successfully re-packaged, the original Binaries can be removed - # comment below 3 lines to not remove the Binaries artifact after repackaging - - uses: geekyeggo/delete-artifact@v2 + # comment below 4 lines to not remove the Binaries artifact after repackaging + - uses: geekyeggo/delete-artifact@v4 with: - name: Binaries \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} + name: Binaries-* \ No newline at end of file From c20079f96012ec87ce736d6aab975ddf10fbc1ee Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Mon, 25 Dec 2023 17:18:01 +0100 Subject: [PATCH 02/14] [Build] GH Actions v4 use unique upload-id --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e41710a25..6b7562a172 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,7 +98,7 @@ jobs: python tools/ci/build-and-archive.py - uses: actions/upload-artifact@v4 with: - name: Binaries-${{ matrix.runs-on }} + name: Binaries-${{ matrix.env }} path: | bin if-no-files-found: ignore From 4748caae63841a6689278f135e1f22701bb6d6ce Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Mon, 25 Dec 2023 19:35:31 +0100 Subject: [PATCH 03/14] [Build] GH Actions use setup-python v5, improved glob for delete-artifact --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b7562a172..dcc00a2e71 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - uses: actions/cache@v3 @@ -49,7 +49,7 @@ jobs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - id: set-matrix @@ -64,9 +64,9 @@ jobs: matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.x' - uses: actions/cache@v3 with: path: ~/.cache/pip @@ -109,7 +109,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - uses: actions/cache@v3 @@ -211,4 +211,4 @@ jobs: - uses: geekyeggo/delete-artifact@v4 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Binaries-* \ No newline at end of file + name: Binaries-** \ No newline at end of file From dfa49043407b0ec0b578e5a4911a87f0f2f0a5dd Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Mon, 25 Dec 2023 21:44:08 +0100 Subject: [PATCH 04/14] [Build] GH Actions v4 try fix artifact download permissions issue --- .github/workflows/build.yml | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dcc00a2e71..6cf8b6b32b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,10 +98,11 @@ jobs: python tools/ci/build-and-archive.py - uses: actions/upload-artifact@v4 with: - name: Binaries-${{ matrix.env }} + name: zzBinaries-${{ matrix.env }} # Sort as last path: | bin if-no-files-found: ignore + # retention-days: 1 # Remove automatically after 1 day # Repackage separately for ESP82xx and ESP32 repackage: @@ -123,7 +124,7 @@ jobs: - uses: actions/download-artifact@v4 with: path: artifacts/Binaries/ - pattern: Binaries-* + pattern: zzBinaries-* merge-multiple: true - name: Prepare artifacts run: | @@ -149,6 +150,8 @@ jobs: cd ../artifacts/Binaries find . -name "$spec" -exec mv {} ../../ESPEasy_dist_${cpu}/bin/ \; cd ../.. + # List gathered bin files + ls -l ESPEasy_dist_${cpu}/bin/ fi done # Each supported cpu has to be listed separately, but empty folders are ignored @@ -156,59 +159,60 @@ jobs: with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_PR#${{ github.event.number }}_${{ github.run_id }} path: | - ESPEasy_dist_ESP32/* + ESPEasy_dist_ESP32/ if-no-files-found: ignore - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32solo1_PR#${{ github.event.number }}_${{ github.run_id }} path: | - ESPEasy_dist_ESP32solo1/* + ESPEasy_dist_ESP32solo1/ if-no-files-found: ignore - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s2_PR#${{ github.event.number }}_${{ github.run_id }} path: | - ESPEasy_dist_ESP32s2/* + ESPEasy_dist_ESP32s2/ if-no-files-found: ignore - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c3_PR#${{ github.event.number }}_${{ github.run_id }} path: | - ESPEasy_dist_ESP32c3/* + ESPEasy_dist_ESP32c3/ if-no-files-found: ignore - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s3_PR#${{ github.event.number }}_${{ github.run_id }} path: | - ESPEasy_dist_ESP32s3/* + ESPEasy_dist_ESP32s3/ if-no-files-found: ignore - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c2_PR#${{ github.event.number }}_${{ github.run_id }} path: | - ESPEasy_dist_ESP32c2/* + ESPEasy_dist_ESP32c2/ if-no-files-found: ignore - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c6_PR#${{ github.event.number }}_${{ github.run_id }} path: | - ESPEasy_dist_ESP32c6/* + ESPEasy_dist_ESP32c6/ if-no-files-found: ignore - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32h2_PR#${{ github.event.number }}_${{ github.run_id }} path: | - ESPEasy_dist_ESP32h2/* + ESPEasy_dist_ESP32h2/ if-no-files-found: ignore - uses: actions/upload-artifact@v4 with: name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP82xx_PR#${{ github.event.number }}_${{ github.run_id }} path: | - ESPEasy_dist_ESP82xx/* + ESPEasy_dist_ESP82xx/ if-no-files-found: ignore # When successfully re-packaged, the original Binaries can be removed # comment below 4 lines to not remove the Binaries artifact after repackaging - uses: geekyeggo/delete-artifact@v4 with: - token: ${{ secrets.GITHUB_TOKEN }} - name: Binaries-** \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} + name: | + zzBinaries-** \ No newline at end of file From d8e2391eff3b53026a7d94cf2514eafee97e5ca1 Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Tue, 26 Dec 2023 15:14:15 +0100 Subject: [PATCH 05/14] [Build] GH Actions v4 Sort builds by ESP, remove repackage step --- .github/workflows/build.yml | 225 ++++++++++++++++++------------------ tools/ci/generate-matrix.py | 13 ++- 2 files changed, 123 insertions(+), 115 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6cf8b6b32b..d3fdd0f66f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,121 +98,120 @@ jobs: python tools/ci/build-and-archive.py - uses: actions/upload-artifact@v4 with: - name: zzBinaries-${{ matrix.env }} # Sort as last + name: Binaries-${{ matrix.typ }}-${{ matrix.env }} # Sort by ESP type path: | bin if-no-files-found: ignore - # retention-days: 1 # Remove automatically after 1 day # Repackage separately for ESP82xx and ESP32 - repackage: - needs: build - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - uses: actions/cache@v3 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }} - - name: Get current date - id: date - run: | - echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT - - uses: actions/download-artifact@v4 - with: - path: artifacts/Binaries/ - pattern: zzBinaries-* - merge-multiple: true - - name: Prepare artifacts - run: | - # ESP82xx - mkdir ESPEasy_dist_ESP82xx - cd dist - find . -exec cp -r --parents {} ../ESPEasy_dist_ESP82xx/ \; - rm ../ESPEasy_dist_ESP82xx/bin/blank_8MB.bin - cd ../artifacts/Binaries - find . -not -name '*ESP32*' -exec mv {} ../../ESPEasy_dist_ESP82xx/bin/ \; - cd ../.. - # ESP32 and derived cpus, ESP32 (classic) _MUST_ be last in this list! - for cpu in ESP32s2 ESP32c3 ESP32s3 ESP32c2 ESP32c6 ESP32h2 ESP32solo1 ESP32 - do - mkdir ESPEasy_dist_${cpu} - spec="*${cpu}*" - _files=$(find ./artifacts/Binaries -name "$spec"|wc -l) - if [[ $_files > 0 ]]; then - cd dist - find . -exec cp -r --parents {} ../ESPEasy_dist_${cpu}/ \; - cd ../ESPEasy_dist_${cpu} - rm bin/blank_1MB.bin bin/blank_2MB.bin bin/ESPEasy_2step_UploaderMega_1024.bin - cd ../artifacts/Binaries - find . -name "$spec" -exec mv {} ../../ESPEasy_dist_${cpu}/bin/ \; - cd ../.. - # List gathered bin files - ls -l ESPEasy_dist_${cpu}/bin/ - fi - done - # Each supported cpu has to be listed separately, but empty folders are ignored - - uses: actions/upload-artifact@v4 - with: - name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_PR#${{ github.event.number }}_${{ github.run_id }} - path: | - ESPEasy_dist_ESP32/ - if-no-files-found: ignore - - uses: actions/upload-artifact@v4 - with: - name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32solo1_PR#${{ github.event.number }}_${{ github.run_id }} - path: | - ESPEasy_dist_ESP32solo1/ - if-no-files-found: ignore - - uses: actions/upload-artifact@v4 - with: - name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s2_PR#${{ github.event.number }}_${{ github.run_id }} - path: | - ESPEasy_dist_ESP32s2/ - if-no-files-found: ignore - - uses: actions/upload-artifact@v4 - with: - name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c3_PR#${{ github.event.number }}_${{ github.run_id }} - path: | - ESPEasy_dist_ESP32c3/ - if-no-files-found: ignore - - uses: actions/upload-artifact@v4 - with: - name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s3_PR#${{ github.event.number }}_${{ github.run_id }} - path: | - ESPEasy_dist_ESP32s3/ - if-no-files-found: ignore - - uses: actions/upload-artifact@v4 - with: - name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c2_PR#${{ github.event.number }}_${{ github.run_id }} - path: | - ESPEasy_dist_ESP32c2/ - if-no-files-found: ignore - - uses: actions/upload-artifact@v4 - with: - name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c6_PR#${{ github.event.number }}_${{ github.run_id }} - path: | - ESPEasy_dist_ESP32c6/ - if-no-files-found: ignore - - uses: actions/upload-artifact@v4 - with: - name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32h2_PR#${{ github.event.number }}_${{ github.run_id }} - path: | - ESPEasy_dist_ESP32h2/ - if-no-files-found: ignore - - uses: actions/upload-artifact@v4 - with: - name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP82xx_PR#${{ github.event.number }}_${{ github.run_id }} - path: | - ESPEasy_dist_ESP82xx/ - if-no-files-found: ignore - # When successfully re-packaged, the original Binaries can be removed - # comment below 4 lines to not remove the Binaries artifact after repackaging - - uses: geekyeggo/delete-artifact@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - name: | - zzBinaries-** \ No newline at end of file + # repackage: + # needs: build + # runs-on: ubuntu-22.04 + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.x' + # - uses: actions/cache@v3 + # with: + # path: ~/.cache/pip + # key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }} + # - name: Get current date + # id: date + # run: | + # echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT + # - uses: actions/download-artifact@v4 + # with: + # path: artifacts/Binaries/ + # pattern: Binaries-* + # merge-multiple: true + # - name: Prepare artifacts + # run: | + # # ESP82xx + # mkdir ESPEasy_dist_ESP82xx + # cd dist + # find . -exec cp -r --parents {} ../ESPEasy_dist_ESP82xx/ \; + # rm ../ESPEasy_dist_ESP82xx/bin/blank_8MB.bin + # cd ../artifacts/Binaries + # find . -not -name '*ESP32*' -exec mv {} ../../ESPEasy_dist_ESP82xx/bin/ \; + # cd ../.. + # # ESP32 and derived cpus, ESP32 (classic) _MUST_ be last in this list! + # for cpu in ESP32s2 ESP32c3 ESP32s3 ESP32c2 ESP32c6 ESP32h2 ESP32solo1 ESP32 + # do + # mkdir ESPEasy_dist_${cpu} + # spec="*${cpu}*" + # _files=$(find ./artifacts/Binaries -name "$spec"|wc -l) + # if [[ $_files > 0 ]]; then + # cd dist + # find . -exec cp -r --parents {} ../ESPEasy_dist_${cpu}/ \; + # cd ../ESPEasy_dist_${cpu} + # rm bin/blank_1MB.bin bin/blank_2MB.bin bin/ESPEasy_2step_UploaderMega_1024.bin + # cd ../artifacts/Binaries + # find . -name "$spec" -exec mv {} ../../ESPEasy_dist_${cpu}/bin/ \; + # cd ../.. + # # List gathered bin files + # ls -l ESPEasy_dist_${cpu}/bin/ + # fi + # done + # # Each supported cpu has to be listed separately, but empty folders are ignored + # - uses: actions/upload-artifact@v4 + # with: + # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_PR#${{ github.event.number }}_${{ github.run_id }} + # path: | + # ESPEasy_dist_ESP32/ + # if-no-files-found: ignore + # - uses: actions/upload-artifact@v4 + # with: + # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32solo1_PR#${{ github.event.number }}_${{ github.run_id }} + # path: | + # ESPEasy_dist_ESP32solo1/ + # if-no-files-found: ignore + # - uses: actions/upload-artifact@v4 + # with: + # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s2_PR#${{ github.event.number }}_${{ github.run_id }} + # path: | + # ESPEasy_dist_ESP32s2/ + # if-no-files-found: ignore + # - uses: actions/upload-artifact@v4 + # with: + # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c3_PR#${{ github.event.number }}_${{ github.run_id }} + # path: | + # ESPEasy_dist_ESP32c3/ + # if-no-files-found: ignore + # - uses: actions/upload-artifact@v4 + # with: + # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s3_PR#${{ github.event.number }}_${{ github.run_id }} + # path: | + # ESPEasy_dist_ESP32s3/ + # if-no-files-found: ignore + # - uses: actions/upload-artifact@v4 + # with: + # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c2_PR#${{ github.event.number }}_${{ github.run_id }} + # path: | + # ESPEasy_dist_ESP32c2/ + # if-no-files-found: ignore + # - uses: actions/upload-artifact@v4 + # with: + # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c6_PR#${{ github.event.number }}_${{ github.run_id }} + # path: | + # ESPEasy_dist_ESP32c6/ + # if-no-files-found: ignore + # - uses: actions/upload-artifact@v4 + # with: + # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32h2_PR#${{ github.event.number }}_${{ github.run_id }} + # path: | + # ESPEasy_dist_ESP32h2/ + # if-no-files-found: ignore + # - uses: actions/upload-artifact@v4 + # with: + # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP82xx_PR#${{ github.event.number }}_${{ github.run_id }} + # path: | + # ESPEasy_dist_ESP82xx/ + # if-no-files-found: ignore + # # When successfully re-packaged, the original Binaries can be removed + # # comment below 4 lines to not remove the Binaries artifact after repackaging + # - uses: geekyeggo/delete-artifact@v4 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # name: | + # Binaries-** \ No newline at end of file diff --git a/tools/ci/generate-matrix.py b/tools/ci/generate-matrix.py index ecbe36e042..150f75f38b 100644 --- a/tools/ci/generate-matrix.py +++ b/tools/ci/generate-matrix.py @@ -7,16 +7,25 @@ import json import os +import re from platformio.project.config import ProjectConfig def get_jobs(cfg): + regex = re.compile(r".*(ESP[^_]*).*") for env in cfg.envs(): platform = cfg.get("env:{}".format(env), "platform") + match = regex.match(env) + if type(match) == re.Match: + typ = match.group(1) + if "ESP8285" == typ: + typ = "ESP8266" # Generalize ESP8285 into ESP8266 + else: + typ = "ESP8266" # Catch WROOM02 and some other 'hard_' builds if "espressif8266" in platform: - yield {"chip": "esp8266", "env": env} + yield {"chip": "esp8266", "env": env, "typ": typ} elif "espressif32" in platform: - yield {"chip": "esp32", "env": env} + yield {"chip": "esp32", "env": env, "typ": typ} else: raise ValueError( "Unknown `platform = {}` for `[env:{}]`".format(platform, env) From dfd5f0fd573a0239768ef9e39eaeef9dec510997 Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Tue, 26 Dec 2023 16:46:11 +0100 Subject: [PATCH 06/14] [Build] GH Actions v4 Fix build names vs dependencies, add all-binaries artifact --- .github/workflows/build.yml | 41 ++++++++++++++++++++++++++++++++++++- tools/ci/generate-matrix.py | 4 ++-- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3fdd0f66f..2a10f0c374 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,13 +96,52 @@ jobs: ENV: ${{ matrix.env }} run: | python tools/ci/build-and-archive.py + - id: string + uses: Entepotenz/change-string-case-action-min-dependencies@v1 + with: + string: ${{ matrix.chip }} - uses: actions/upload-artifact@v4 with: - name: Binaries-${{ matrix.typ }}-${{ matrix.env }} # Sort by ESP type + name: Binaries-${{ steps.string.outputs.uppercase }}-${{ matrix.env }} # Sort by ESP type path: | bin if-no-files-found: ignore + # Repackage all ESP82xx and ESP32 into a single Binaries-all.zip + repackage: + needs: build + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + - uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }} + - name: Get current date + id: date + run: | + echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT + - uses: actions/download-artifact@v4 + with: + path: artifacts/Binaries/ + pattern: Binaries-* + merge-multiple: true + - name: Repackage for single-archive upload + run: | + ls -R + cd artifacts/Binaries + mkdir bin + mv *.* bin + - uses: actions/upload-artifact@v4 + with: + name: ESPEasy-all-Binaries-${{ steps.date.outputs.builddate }}_PR#${{ github.event.number }}_${{ github.run_id }} + path: | + artifacts/Binaries/ + if-no-files-found: ignore + # Repackage separately for ESP82xx and ESP32 # repackage: # needs: build diff --git a/tools/ci/generate-matrix.py b/tools/ci/generate-matrix.py index 150f75f38b..cb817b7a43 100644 --- a/tools/ci/generate-matrix.py +++ b/tools/ci/generate-matrix.py @@ -23,9 +23,9 @@ def get_jobs(cfg): else: typ = "ESP8266" # Catch WROOM02 and some other 'hard_' builds if "espressif8266" in platform: - yield {"chip": "esp8266", "env": env, "typ": typ} + yield {"chip": typ.lower(), "env": env} elif "espressif32" in platform: - yield {"chip": "esp32", "env": env, "typ": typ} + yield {"chip": typ.lower(), "env": env} else: raise ValueError( "Unknown `platform = {}` for `[env:{}]`".format(platform, env) From 839dccac5913def1b51f0629a8d5fa632f569c5d Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Tue, 26 Dec 2023 21:25:28 +0100 Subject: [PATCH 07/14] [Build] GH Actions v4 Rename `repackage` job to `combine_package` --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2a10f0c374..10d34e27b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -107,8 +107,8 @@ jobs: bin if-no-files-found: ignore - # Repackage all ESP82xx and ESP32 into a single Binaries-all.zip - repackage: + # Package all ESP82xx and ESP32 into a single Binaries-all.zip + combine_package: needs: build runs-on: ubuntu-22.04 steps: @@ -129,7 +129,7 @@ jobs: path: artifacts/Binaries/ pattern: Binaries-* merge-multiple: true - - name: Repackage for single-archive upload + - name: Combine all files in a package for single-archive upload run: | ls -R cd artifacts/Binaries From 0aa66dab3d619f3c914c759f7224fb3afc5c599c Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Tue, 26 Dec 2023 22:25:17 +0100 Subject: [PATCH 08/14] [Build] GH Actions v4 Apply also to `release.yml`, add ESP32-C2 and ESP32-C6 artifact uploads --- .github/workflows/release.yml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 347b171347..8446777968 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - id: set-matrix @@ -37,7 +37,7 @@ jobs: matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - uses: actions/cache@v3 @@ -66,9 +66,9 @@ jobs: ENV: ${{ matrix.env }} run: | python tools/ci/build-and-archive.py - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: Binaries + name: Binaries-${{ matrix.runs-on }} path: | bin if-no-files-found: ignore @@ -78,7 +78,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - uses: actions/cache@v3 @@ -98,7 +98,7 @@ jobs: cd dist zip -r -qq ../ESPEasy_dist.zip * cd .. - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Distribution path: | @@ -112,7 +112,7 @@ jobs: notes: ${{ steps.release-notes.outputs.result }} steps: - id: release-notes - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: result-encoding: string script: | @@ -134,16 +134,18 @@ jobs: needs: [build, prepare-dist, prepare-notes] runs-on: ubuntu-22.04 steps: - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - name: Get current date id: date run: | echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - path: artifacts/ + path: artifacts/Binaries/ + pattern: Binaries-* + merge-multiple: true - name: Repackage for release upload run: | ls -R @@ -153,10 +155,12 @@ jobs: mv *.* bin find . -not -name '*ESP32*' -print | zip -@ ../../ESPEasy_ESP82xx.zip # ESP32 and derived chips - # TODO if/when available: ESP32c2 ESP32c6 ESP32h2 + # TODO if/when available: ESP32h2 find . -name '*ESP32s2*' -print | zip -@ ../../ESPEasy_ESP32s2.zip find . -name '*ESP32c3*' -print | zip -@ ../../ESPEasy_ESP32c3.zip find . -name '*ESP32s3*' -print | zip -@ ../../ESPEasy_ESP32s3.zip + find . -name '*ESP32c2*' -print | zip -@ ../../ESPEasy_ESP32c2.zip + find . -name '*ESP32c6*' -print | zip -@ ../../ESPEasy_ESP32c6.zip find . -name '*ESP32solo1*' -print | zip -@ ../../ESPEasy_ESP32solo1.zip find . -name '*ESP32_*' -print | zip -@ ../../ESPEasy_ESP32.zip cd ../.. @@ -166,16 +170,18 @@ jobs: mv ESPEasy_dist.zip ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_binaries.zip zip -d ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_binaries.zip "bin/blank_1MB.bin" "bin/blank_2MB.bin" "bin/ESPEasy_2step_UploaderMega_1024.bin" zipmerge ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP82xx_binaries.zip ESPEasy_ESP82xx.zip - # TODO if/when available: ESP32c2 ESP32c6 ESP32h2 + # TODO if/when available: ESP32h2 zipmerge ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s2_binaries.zip ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_binaries.zip ESPEasy_ESP32s2.zip zipmerge ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c3_binaries.zip ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_binaries.zip ESPEasy_ESP32c3.zip zipmerge ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s3_binaries.zip ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_binaries.zip ESPEasy_ESP32s3.zip + zipmerge ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c2_binaries.zip ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_binaries.zip ESPEasy_ESP32c2.zip + zipmerge ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c6_binaries.zip ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_binaries.zip ESPEasy_ESP32c6.zip zipmerge ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32solo1_binaries.zip ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_binaries.zip ESPEasy_ESP32solo1.zip zipmerge ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_binaries.zip ESPEasy_ESP32.zip - uses: ncipollo/release-action@v1 with: # Include all separately supported CPU models - # TODO if/when available: ESP32c2 ESP32c6 ESP32h2 - artifacts: "ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP82xx_binaries.zip,ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_binaries.zip,ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32solo1_binaries.zip,ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s2_binaries.zip,ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c3_binaries.zip,ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s3_binaries.zip,artifacts/Distribution/*.zip" + # TODO if/when available: ESP32h2 + artifacts: "ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP82xx_binaries.zip,ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_binaries.zip,ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32solo1_binaries.zip,ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s2_binaries.zip,ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c3_binaries.zip,ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s3_binaries.zip,ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c2_binaries.zip,ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c6_binaries.zip,artifacts/Distribution/*.zip" body: ${{ needs.prepare-notes.outputs.notes }} token: ${{ secrets.GITHUB_TOKEN }} From 14294a783ddf9e35b25ada3523eb6b4f7ed70783 Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Thu, 28 Dec 2023 17:25:45 +0100 Subject: [PATCH 09/14] [Build] Combine_package use separate downloads to reduce chance of failure --- .github/workflows/build.yml | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10d34e27b7..25b6c4eac6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -127,7 +127,42 @@ jobs: - uses: actions/download-artifact@v4 with: path: artifacts/Binaries/ - pattern: Binaries-* + pattern: Binaries-ESP82* + merge-multiple: true + - uses: actions/download-artifact@v4 + with: + path: artifacts/Binaries/ + pattern: Binaries-ESP32S2* + merge-multiple: true + - uses: actions/download-artifact@v4 + with: + path: artifacts/Binaries/ + pattern: Binaries-ESP32S3* + merge-multiple: true + - uses: actions/download-artifact@v4 + with: + path: artifacts/Binaries/ + pattern: Binaries-ESP32C2* + merge-multiple: true + - uses: actions/download-artifact@v4 + with: + path: artifacts/Binaries/ + pattern: Binaries-ESP32C3* + merge-multiple: true + - uses: actions/download-artifact@v4 + with: + path: artifacts/Binaries/ + pattern: Binaries-ESP32C6* + merge-multiple: true + - uses: actions/download-artifact@v4 + with: + path: artifacts/Binaries/ + pattern: Binaries-ESP32SOLO* + merge-multiple: true + - uses: actions/download-artifact@v4 + with: + path: artifacts/Binaries/ + pattern: Binaries-ESP32-* merge-multiple: true - name: Combine all files in a package for single-archive upload run: | From 8a25de749d6ad8bb0688055fa57c8076c925f3dc Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Thu, 28 Dec 2023 20:23:31 +0100 Subject: [PATCH 10/14] [Build] Combine_package use wretry.action to try and succeed the downloads --- .github/workflows/build.yml | 49 ++++++++----------------------------- 1 file changed, 10 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25b6c4eac6..7b02808ecb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -124,46 +124,17 @@ jobs: id: date run: | echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT - - uses: actions/download-artifact@v4 + # FIXME: Workaround for https://github.com/actions/download-artifact/issues/249 + - name: Download all artifacts with retry + uses: Wandalen/wretry.action@master with: - path: artifacts/Binaries/ - pattern: Binaries-ESP82* - merge-multiple: true - - uses: actions/download-artifact@v4 - with: - path: artifacts/Binaries/ - pattern: Binaries-ESP32S2* - merge-multiple: true - - uses: actions/download-artifact@v4 - with: - path: artifacts/Binaries/ - pattern: Binaries-ESP32S3* - merge-multiple: true - - uses: actions/download-artifact@v4 - with: - path: artifacts/Binaries/ - pattern: Binaries-ESP32C2* - merge-multiple: true - - uses: actions/download-artifact@v4 - with: - path: artifacts/Binaries/ - pattern: Binaries-ESP32C3* - merge-multiple: true - - uses: actions/download-artifact@v4 - with: - path: artifacts/Binaries/ - pattern: Binaries-ESP32C6* - merge-multiple: true - - uses: actions/download-artifact@v4 - with: - path: artifacts/Binaries/ - pattern: Binaries-ESP32SOLO* - merge-multiple: true - - uses: actions/download-artifact@v4 - with: - path: artifacts/Binaries/ - pattern: Binaries-ESP32-* - merge-multiple: true + action: actions/download-artifact@v4 + with: | + path: artifacts/Binaries/ + pattern: Binaries-* + merge-multiple: true + attempt_limit: 5 + attempt_delay: 2000 - name: Combine all files in a package for single-archive upload run: | ls -R From 079d0ccda7ddd1470fe589d91fa3d29e2aad3728 Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Fri, 29 Dec 2023 20:13:51 +0100 Subject: [PATCH 11/14] [Build/Release] Fix some issues, apply workarounds where needed --- .github/workflows/build.yml | 135 ++++------------------------------ .github/workflows/release.yml | 22 ++++-- 2 files changed, 28 insertions(+), 129 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b02808ecb..e398a1af4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,6 +89,10 @@ jobs: pip install wheel pip install -r requirements.txt platformio update + - name: Get current date + id: date + run: | + echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT - name: Build and archive id: build-and-archive env: @@ -102,12 +106,13 @@ jobs: string: ${{ matrix.chip }} - uses: actions/upload-artifact@v4 with: - name: Binaries-${{ steps.string.outputs.uppercase }}-${{ matrix.env }} # Sort by ESP type + # FIXME Workaround to (temporarily) not use # in the artifact name, see https://github.com/actions/upload-artifact/issues/473 + name: Bin-${{ steps.string.outputs.uppercase }}-${{ matrix.env }}-${{ steps.date.outputs.builddate }}_PR_${{ github.event.number }}_${{ github.run_id }} # Sort by ESP type path: | bin if-no-files-found: ignore - # Package all ESP82xx and ESP32 into a single Binaries-all.zip + # Package all ESP82xx and ESP32 into a single ESPEasy-all-Binaries-_PR#_.zip combine_package: needs: build runs-on: ubuntu-22.04 @@ -130,133 +135,19 @@ jobs: with: action: actions/download-artifact@v4 with: | - path: artifacts/Binaries/ - pattern: Binaries-* + path: artifacts/Binaries/bin/ + pattern: Bin-* merge-multiple: true attempt_limit: 5 attempt_delay: 2000 - - name: Combine all files in a package for single-archive upload + - name: List all files in the package for single-archive upload run: | + cd artifacts/Binaries/ ls -R - cd artifacts/Binaries - mkdir bin - mv *.* bin - uses: actions/upload-artifact@v4 with: - name: ESPEasy-all-Binaries-${{ steps.date.outputs.builddate }}_PR#${{ github.event.number }}_${{ github.run_id }} + # FIXME Workaround to (temporarily) not use # in the artifact name, see https://github.com/actions/upload-artifact/issues/473 + name: ESPEasy-all-Binaries-${{ steps.date.outputs.builddate }}_PR_${{ github.event.number }}_${{ github.run_id }} path: | artifacts/Binaries/ if-no-files-found: ignore - - # Repackage separately for ESP82xx and ESP32 - # repackage: - # needs: build - # runs-on: ubuntu-22.04 - # steps: - # - uses: actions/checkout@v4 - # - uses: actions/setup-python@v5 - # with: - # python-version: '3.x' - # - uses: actions/cache@v3 - # with: - # path: ~/.cache/pip - # key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }} - # - name: Get current date - # id: date - # run: | - # echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT - # - uses: actions/download-artifact@v4 - # with: - # path: artifacts/Binaries/ - # pattern: Binaries-* - # merge-multiple: true - # - name: Prepare artifacts - # run: | - # # ESP82xx - # mkdir ESPEasy_dist_ESP82xx - # cd dist - # find . -exec cp -r --parents {} ../ESPEasy_dist_ESP82xx/ \; - # rm ../ESPEasy_dist_ESP82xx/bin/blank_8MB.bin - # cd ../artifacts/Binaries - # find . -not -name '*ESP32*' -exec mv {} ../../ESPEasy_dist_ESP82xx/bin/ \; - # cd ../.. - # # ESP32 and derived cpus, ESP32 (classic) _MUST_ be last in this list! - # for cpu in ESP32s2 ESP32c3 ESP32s3 ESP32c2 ESP32c6 ESP32h2 ESP32solo1 ESP32 - # do - # mkdir ESPEasy_dist_${cpu} - # spec="*${cpu}*" - # _files=$(find ./artifacts/Binaries -name "$spec"|wc -l) - # if [[ $_files > 0 ]]; then - # cd dist - # find . -exec cp -r --parents {} ../ESPEasy_dist_${cpu}/ \; - # cd ../ESPEasy_dist_${cpu} - # rm bin/blank_1MB.bin bin/blank_2MB.bin bin/ESPEasy_2step_UploaderMega_1024.bin - # cd ../artifacts/Binaries - # find . -name "$spec" -exec mv {} ../../ESPEasy_dist_${cpu}/bin/ \; - # cd ../.. - # # List gathered bin files - # ls -l ESPEasy_dist_${cpu}/bin/ - # fi - # done - # # Each supported cpu has to be listed separately, but empty folders are ignored - # - uses: actions/upload-artifact@v4 - # with: - # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32_PR#${{ github.event.number }}_${{ github.run_id }} - # path: | - # ESPEasy_dist_ESP32/ - # if-no-files-found: ignore - # - uses: actions/upload-artifact@v4 - # with: - # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32solo1_PR#${{ github.event.number }}_${{ github.run_id }} - # path: | - # ESPEasy_dist_ESP32solo1/ - # if-no-files-found: ignore - # - uses: actions/upload-artifact@v4 - # with: - # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s2_PR#${{ github.event.number }}_${{ github.run_id }} - # path: | - # ESPEasy_dist_ESP32s2/ - # if-no-files-found: ignore - # - uses: actions/upload-artifact@v4 - # with: - # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c3_PR#${{ github.event.number }}_${{ github.run_id }} - # path: | - # ESPEasy_dist_ESP32c3/ - # if-no-files-found: ignore - # - uses: actions/upload-artifact@v4 - # with: - # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32s3_PR#${{ github.event.number }}_${{ github.run_id }} - # path: | - # ESPEasy_dist_ESP32s3/ - # if-no-files-found: ignore - # - uses: actions/upload-artifact@v4 - # with: - # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c2_PR#${{ github.event.number }}_${{ github.run_id }} - # path: | - # ESPEasy_dist_ESP32c2/ - # if-no-files-found: ignore - # - uses: actions/upload-artifact@v4 - # with: - # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32c6_PR#${{ github.event.number }}_${{ github.run_id }} - # path: | - # ESPEasy_dist_ESP32c6/ - # if-no-files-found: ignore - # - uses: actions/upload-artifact@v4 - # with: - # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP32h2_PR#${{ github.event.number }}_${{ github.run_id }} - # path: | - # ESPEasy_dist_ESP32h2/ - # if-no-files-found: ignore - # - uses: actions/upload-artifact@v4 - # with: - # name: ESPEasy_mega_${{ steps.date.outputs.builddate }}_ESP82xx_PR#${{ github.event.number }}_${{ github.run_id }} - # path: | - # ESPEasy_dist_ESP82xx/ - # if-no-files-found: ignore - # # When successfully re-packaged, the original Binaries can be removed - # # comment below 4 lines to not remove the Binaries artifact after repackaging - # - uses: geekyeggo/delete-artifact@v4 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # name: | - # Binaries-** \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8446777968..c14d04ea91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,9 +66,13 @@ jobs: ENV: ${{ matrix.env }} run: | python tools/ci/build-and-archive.py + - id: string + uses: Entepotenz/change-string-case-action-min-dependencies@v1 + with: + string: ${{ matrix.chip }} - uses: actions/upload-artifact@v4 with: - name: Binaries-${{ matrix.runs-on }} + name: Bin-${{ steps.string.outputs.uppercase }}-${{ matrix.env }} path: | bin if-no-files-found: ignore @@ -141,18 +145,22 @@ jobs: id: date run: | echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT - - uses: actions/download-artifact@v4 + # FIXME: Workaround for https://github.com/actions/download-artifact/issues/249 + - name: Download all artifacts with retry + uses: Wandalen/wretry.action@master with: - path: artifacts/Binaries/ - pattern: Binaries-* - merge-multiple: true + action: actions/download-artifact@v4 + with: | + path: artifacts/Binaries/bin/ + pattern: Bin-* + merge-multiple: true + attempt_limit: 5 + attempt_delay: 2000 - name: Repackage for release upload run: | ls -R sudo apt install zipmerge zip cd artifacts/Binaries - mkdir bin - mv *.* bin find . -not -name '*ESP32*' -print | zip -@ ../../ESPEasy_ESP82xx.zip # ESP32 and derived chips # TODO if/when available: ESP32h2 From 61814e3122ef18af6586e4669be2425f13b9230c Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Tue, 2 Jan 2024 22:11:52 +0100 Subject: [PATCH 12/14] [Docs] Update copyright year to 2024 --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 20f1bd87da..d413c1aa05 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,7 +21,7 @@ # -- Project information ----------------------------------------------------- project = u'ESP Easy' -copyright = u'2018-2023, ESP Easy' +copyright = u'2018-2024, ESP Easy' author = u'Grovkillen, TD-er & Friends' # The short X.Y version From b77b9c4674df37c23f64c5fe4ff92754b166e822 Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Thu, 25 Jan 2024 22:57:19 +0100 Subject: [PATCH 13/14] [Build/Release] Update actions/cache to v4 --- .github/workflows/build.yml | 10 +++++----- .github/workflows/release.yml | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e398a1af4b..f1607ad1c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.x' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }} @@ -67,16 +67,16 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.x' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-${{ hashFiles('requirements.txt') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 if: ${{ contains(matrix.env, 'esp32') }} with: path: ~/.platformio key: ${{ runner.os }}-esp32-${{ hashFiles('platformio*.ini') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 if: ${{ contains(matrix.env, 'esp8266') }} with: path: ~/.platformio @@ -121,7 +121,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.x' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c14d04ea91..cccd43989f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,16 +40,16 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.x' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-${{ hashFiles('requirements.txt') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 if: ${{ contains(matrix.env, 'esp32') }} with: path: ~/.platformio key: ${{ runner.os }}-esp32-${{ hashFiles('platformio*.ini') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 if: ${{ contains(matrix.env, 'esp8266') }} with: path: ~/.platformio @@ -85,7 +85,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.x' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-docs-${{ hashFiles('docs/requirements.txt') }} From c7608cfe6c30931af7d9f8824ce023d5570c5648 Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Fri, 26 Jan 2024 20:57:47 +0100 Subject: [PATCH 14/14] [Build/Release] Remove Wdalen/retry.action plugin for Node 20 compatibility --- .github/workflows/build.yml | 15 +++++---------- .github/workflows/release.yml | 15 +++++---------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1607ad1c4..ebcf124dda 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -129,17 +129,12 @@ jobs: id: date run: | echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT - # FIXME: Workaround for https://github.com/actions/download-artifact/issues/249 - - name: Download all artifacts with retry - uses: Wandalen/wretry.action@master + - name: Download all artifacts + uses: actions/download-artifact@v4 with: - action: actions/download-artifact@v4 - with: | - path: artifacts/Binaries/bin/ - pattern: Bin-* - merge-multiple: true - attempt_limit: 5 - attempt_delay: 2000 + path: artifacts/Binaries/bin/ + pattern: Bin-* + merge-multiple: true - name: List all files in the package for single-archive upload run: | cd artifacts/Binaries/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cccd43989f..5480c70ff9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -145,17 +145,12 @@ jobs: id: date run: | echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT - # FIXME: Workaround for https://github.com/actions/download-artifact/issues/249 - - name: Download all artifacts with retry - uses: Wandalen/wretry.action@master + - name: Download all artifacts + uses: actions/download-artifact@v4 with: - action: actions/download-artifact@v4 - with: | - path: artifacts/Binaries/bin/ - pattern: Bin-* - merge-multiple: true - attempt_limit: 5 - attempt_delay: 2000 + path: artifacts/Binaries/bin/ + pattern: Bin-* + merge-multiple: true - name: Repackage for release upload run: | ls -R