From abc96e37fe6b878002c4159643497d3e3a0a0850 Mon Sep 17 00:00:00 2001 From: kdmukai Date: Thu, 23 Jan 2025 10:06:05 -0600 Subject: [PATCH 1/7] version up all deprecated CI actions --- .github/workflows/build.yml | 12 ++++++------ .github/workflows/tests.yml | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0649dc7..3c2de8c8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: target: [ "pi0", "pi2", "pi02w", "pi4" ] steps: - name: checkout seedsigner-os - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: "seedsigner/seedsigner-os" # use the os-ref input parameter in case of workflow_dispatch or default to main in case of cron triggers @@ -42,7 +42,7 @@ jobs: fetch-depth: 0 - name: checkout source - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # ref defaults to repo default-branch=dev (cron) or SHA of event (workflow_dispatch) path: "seedsigner-os/opt/rootfs-overlay/opt" @@ -78,7 +78,7 @@ jobs: ls -la src - name: restore build cache - uses: actions/cache@v3 + uses: actions/cache@v4 # Caching reduces the build time to ~50% (currently: ~30 mins instead of ~1 hour, # while consuming ~850 MB storage space). with: @@ -113,7 +113,7 @@ jobs: ls -la seedsigner-os/images - name: upload images - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: seedsigner_os_images path: "seedsigner-os/images/*.img" @@ -127,7 +127,7 @@ jobs: needs: build steps: - name: download images - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: seedsigner_os_images path: images @@ -148,7 +148,7 @@ jobs: sha256sum *.img > seedsigner_os.${{ env.source_hash }}.sha256 - name: upload checksums - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: seedsigner_os_images path: "images/*.sha256" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9fba7af5..20e530ce 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,12 +26,12 @@ jobs: python-version: ["3.10", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # Needs to also pull the seedsigner-translations repo submodules: recursive - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -63,7 +63,7 @@ jobs: - name: Coverage report run: coverage report - name: Archive CI Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ci-artifacts path: artifacts/** From 05d0644529968b5d65b63f2cda2ae1f73f6a0eba Mon Sep 17 00:00:00 2001 From: kdmukai Date: Thu, 23 Jan 2025 10:20:30 -0600 Subject: [PATCH 2/7] bugfix: set distinct artifact upload names --- .github/workflows/build.yml | 4 ++-- .github/workflows/tests.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c2de8c8..4cea156b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -115,7 +115,7 @@ jobs: - name: upload images uses: actions/upload-artifact@v4 with: - name: seedsigner_os_images + name: seedsigner_os_images-${{ matrix.target }} path: "seedsigner-os/images/*.img" if-no-files-found: error # maximum 90 days retention @@ -150,7 +150,7 @@ jobs: - name: upload checksums uses: actions/upload-artifact@v4 with: - name: seedsigner_os_images + name: seedsigner_os_hashes-${{ matrix.target }} path: "images/*.sha256" if-no-files-found: error # maximum 90 days retention diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 20e530ce..9be339c0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -65,7 +65,7 @@ jobs: - name: Archive CI Artifacts uses: actions/upload-artifact@v4 with: - name: ci-artifacts + name: ci-artifacts-${{ matrix.python-version }} path: artifacts/** retention-days: 10 # Upload also when tests fail. The workflow result (red/green) will From 11965d4b7fa91ecef143fd8bbda5ebee78d1c3b1 Mon Sep 17 00:00:00 2001 From: kdmukai Date: Thu, 23 Jan 2025 10:32:53 -0600 Subject: [PATCH 3/7] bugfix: wildcard syntax, download artifact name --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4cea156b..7af6a7e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,7 +101,7 @@ jobs: - name: rename image run: | cd seedsigner-os/images - mv seedsigner_os*.img seedsigner_os.${{ env.img_version }}.${{ matrix.target }}.img + mv *.img seedsigner_os.${{ env.img_version }}.${{ matrix.target }}.img - name: print sha256sum run: | @@ -129,7 +129,7 @@ jobs: - name: download images uses: actions/download-artifact@v4 with: - name: seedsigner_os_images + name: seedsigner_os_images-${{ matrix.target }} path: images - name: list images From 09007c03ec359b49b89919939ab03e05bacd573a Mon Sep 17 00:00:00 2001 From: kdmukai Date: Thu, 23 Jan 2025 10:48:09 -0600 Subject: [PATCH 4/7] bugfix: revert cache to v3 --- .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 7af6a7e3..26ecf742 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,7 +78,7 @@ jobs: ls -la src - name: restore build cache - uses: actions/cache@v4 + uses: actions/cache@v3 # Caching reduces the build time to ~50% (currently: ~30 mins instead of ~1 hour, # while consuming ~850 MB storage space). with: From b526d86a63d625e39b45fa5a9b08c583518a280f Mon Sep 17 00:00:00 2001 From: kdmukai Date: Thu, 23 Jan 2025 12:20:01 -0600 Subject: [PATCH 5/7] stick w/cache@v4, but try w/out `--no-clean` --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26ecf742..e17d03ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,7 +78,7 @@ jobs: ls -la src - name: restore build cache - uses: actions/cache@v3 + uses: actions/cache@v4 # Caching reduces the build time to ~50% (currently: ~30 mins instead of ~1 hour, # while consuming ~850 MB storage space). with: @@ -92,7 +92,7 @@ jobs: - name: build run: | cd seedsigner-os/opt - ./build.sh --${{ matrix.target }} --skip-repo --no-clean + ./build.sh --${{ matrix.target }} --skip-repo - name: list image (before rename) run: | From 3966675197ca811bbec2dcb340d117b3838c0eb8 Mon Sep 17 00:00:00 2001 From: kdmukai Date: Thu, 23 Jan 2025 12:30:28 -0600 Subject: [PATCH 6/7] Try disabling cache --- .github/workflows/build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e17d03ed..43ce651c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,17 +77,17 @@ jobs: ls -la . ls -la src - - name: restore build cache - uses: actions/cache@v4 - # Caching reduces the build time to ~50% (currently: ~30 mins instead of ~1 hour, - # while consuming ~850 MB storage space). - with: - path: | - ~/.buildroot-ccache/ - seedsigner-os/buildroot_dl - key: build-cache-${{ matrix.target }}-${{ env.builder_hash }} - restore-keys: | - build-cache-${{ matrix.target }}- + # - name: restore build cache + # uses: actions/cache@v4 + # # Caching reduces the build time to ~50% (currently: ~30 mins instead of ~1 hour, + # # while consuming ~850 MB storage space). + # with: + # path: | + # ~/.buildroot-ccache/ + # seedsigner-os/buildroot_dl + # key: build-cache-${{ matrix.target }}-${{ env.builder_hash }} + # restore-keys: | + # build-cache-${{ matrix.target }}- - name: build run: | From 3e4deb4bda31010d7963ac6ada6f3b5f67f53184 Mon Sep 17 00:00:00 2001 From: kdmukai Date: Thu, 23 Jan 2025 12:45:19 -0600 Subject: [PATCH 7/7] Remove build.yml from PR --- .github/workflows/build.yml | 42 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43ce651c..a0649dc7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: target: [ "pi0", "pi2", "pi02w", "pi4" ] steps: - name: checkout seedsigner-os - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: repository: "seedsigner/seedsigner-os" # use the os-ref input parameter in case of workflow_dispatch or default to main in case of cron triggers @@ -42,7 +42,7 @@ jobs: fetch-depth: 0 - name: checkout source - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: # ref defaults to repo default-branch=dev (cron) or SHA of event (workflow_dispatch) path: "seedsigner-os/opt/rootfs-overlay/opt" @@ -77,22 +77,22 @@ jobs: ls -la . ls -la src - # - name: restore build cache - # uses: actions/cache@v4 - # # Caching reduces the build time to ~50% (currently: ~30 mins instead of ~1 hour, - # # while consuming ~850 MB storage space). - # with: - # path: | - # ~/.buildroot-ccache/ - # seedsigner-os/buildroot_dl - # key: build-cache-${{ matrix.target }}-${{ env.builder_hash }} - # restore-keys: | - # build-cache-${{ matrix.target }}- + - name: restore build cache + uses: actions/cache@v3 + # Caching reduces the build time to ~50% (currently: ~30 mins instead of ~1 hour, + # while consuming ~850 MB storage space). + with: + path: | + ~/.buildroot-ccache/ + seedsigner-os/buildroot_dl + key: build-cache-${{ matrix.target }}-${{ env.builder_hash }} + restore-keys: | + build-cache-${{ matrix.target }}- - name: build run: | cd seedsigner-os/opt - ./build.sh --${{ matrix.target }} --skip-repo + ./build.sh --${{ matrix.target }} --skip-repo --no-clean - name: list image (before rename) run: | @@ -101,7 +101,7 @@ jobs: - name: rename image run: | cd seedsigner-os/images - mv *.img seedsigner_os.${{ env.img_version }}.${{ matrix.target }}.img + mv seedsigner_os*.img seedsigner_os.${{ env.img_version }}.${{ matrix.target }}.img - name: print sha256sum run: | @@ -113,9 +113,9 @@ jobs: ls -la seedsigner-os/images - name: upload images - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: - name: seedsigner_os_images-${{ matrix.target }} + name: seedsigner_os_images path: "seedsigner-os/images/*.img" if-no-files-found: error # maximum 90 days retention @@ -127,9 +127,9 @@ jobs: needs: build steps: - name: download images - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: - name: seedsigner_os_images-${{ matrix.target }} + name: seedsigner_os_images path: images - name: list images @@ -148,9 +148,9 @@ jobs: sha256sum *.img > seedsigner_os.${{ env.source_hash }}.sha256 - name: upload checksums - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: - name: seedsigner_os_hashes-${{ matrix.target }} + name: seedsigner_os_images path: "images/*.sha256" if-no-files-found: error # maximum 90 days retention