From 922ef882e034192bcf2f070df40a286368199569 Mon Sep 17 00:00:00 2001 From: Xargon Wan Date: Tue, 3 May 2022 10:44:44 +0900 Subject: [PATCH] Migrated cache to artifact --- .github/workflows/cooker.yml | 109 +++++++++++++++++++++++++++-------- 1 file changed, 84 insertions(+), 25 deletions(-) diff --git a/.github/workflows/cooker.yml b/.github/workflows/cooker.yml index db5f45a9..68950613 100644 --- a/.github/workflows/cooker.yml +++ b/.github/workflows/cooker.yml @@ -42,7 +42,8 @@ jobs: needs: [Job1_-_Prepearing_enviornment] steps: - - uses: actions/download-artifact@v2 + - name: Download global cache + uses: actions/download-artifact@v2 with: name: global-cache continue-on-error: true @@ -62,12 +63,19 @@ jobs: sudo flatpak install -y org.kde.Sdk//5.15-21.08 org.kde.Platform//5.15-21.08 io.qt.qtwebengine.BaseApp/x86_64/5.15-21.08 org.freedesktop.Sdk.Extension.llvm13 sudo flatpak-builder --download-only --user --repo=local retrodeck-flatpak net.retrodeck.retrodeck.yml - - name: Generating build specific cache - id: intenral-cache - uses: actions/cache@v2 + # - name: Generating build specific cache + # id: intenral-cache + # uses: actions/cache@v2 + # with: + # path: /home/runner/work/RetroDECK + # key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} + + - name: Upload build specific cache + uses: actions/upload-artifact@v3 with: + name: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} path: /home/runner/work/RetroDECK - key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} + # - name: Continuing with previous worklow cache # if: steps.cache-cooker.outputs.cache-hit == 'true' @@ -89,12 +97,18 @@ jobs: steps: #- uses: actions/checkout@v3 - - name: cache-cooker - id: internal-cache - uses: actions/cache@v2 + # - name: cache-cooker + # id: internal-cache + # uses: actions/cache@v2 + # with: + # path: /home/runner/work/RetroDECK + # key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} + + - name: Download build specific cache + uses: actions/download-artifact@v2 with: + name: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} path: /home/runner/work/RetroDECK - key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} - name: Initializing enviornment #if: steps.cache-cooker.outputs.cache-hit != 'true' @@ -113,6 +127,12 @@ jobs: cd /home/runner/work/RetroDECK/RetroDECK sudo flatpak-builder --build-only --stop-at=melonds --user --repo=local retrodeck-flatpak net.retrodeck.retrodeck.yml + - name: Upload build specific cache + uses: actions/upload-artifact@v3 + with: + name: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} + path: /home/runner/work/RetroDECK + Job4_-_Building_part_2: runs-on: ubuntu-latest needs: [Job1_-_Prepearing_enviornment, Job2_-_Downloading_Sources, Job3_-_Building_part_1] @@ -143,18 +163,30 @@ jobs: cd /home/runner/work/RetroDECK/RetroDECK sudo flatpak-builder --build-only --user --repo=local retrodeck-flatpak net.retrodeck.retrodeck.yml + - name: Upload build specific cache + uses: actions/upload-artifact@v3 + with: + name: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} + path: /home/runner/work/RetroDECK + Job5_-_Finishing_build: runs-on: ubuntu-latest needs: [Job1_-_Prepearing_enviornment, Job2_-_Downloading_Sources, Job3_-_Building_part_1, Job4_-_Building_part_2] steps: #- uses: actions/checkout@v3 - - name: cache-cooker - id: internal-cache - uses: actions/cache@v2 + # - name: cache-cooker + # id: internal-cache + # uses: actions/cache@v2 + # with: + # path: /home/runner/work/RetroDECK + # key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} + + - name: Download build specific cache + uses: actions/download-artifact@v2 with: + name: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} path: /home/runner/work/RetroDECK - key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} - name: Initializing enviornment #if: steps.cache-cooker.outputs.cache-hit != 'true' @@ -173,18 +205,30 @@ jobs: cd /home/runner/work/RetroDECK/RetroDECK sudo flatpak-builder --finish-only --user --repo=local retrodeck-flatpak net.retrodeck.retrodeck.yml + - name: Upload build specific cache + uses: actions/upload-artifact@v3 + with: + name: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} + path: /home/runner/work/RetroDECK + Job6_-_Build_bundle: runs-on: ubuntu-latest needs: [Job1_-_Prepearing_enviornment, Job2_-_Downloading_Sources, Job3_-_Building_part_1, Job4_-_Building_part_2, Job5_-_Finishing_build] steps: #- uses: actions/checkout@v3 - - name: cache-cooker - id: internal-cache - uses: actions/cache@v2 + # - name: cache-cooker + # id: internal-cache + # uses: actions/cache@v2 + # with: + # path: /home/runner/work/RetroDECK + # key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} + + - name: Download build specific cache + uses: actions/download-artifact@v2 with: + name: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} path: /home/runner/work/RetroDECK - key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} - name: Initializing enviornment #if: steps.cache-cooker.outputs.cache-hit != 'true' @@ -203,17 +247,29 @@ jobs: cd /home/runner/work/RetroDECK/RetroDECK sudo flatpak build-bundle local RetroDECK.flatpak net.retrodeck.retrodeck + - name: Upload build specific cache + uses: actions/upload-artifact@v3 + with: + name: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} + path: /home/runner/work/RetroDECK + Job7_-_Publishing_flatpak: runs-on: ubuntu-latest needs: [Job1_-_Prepearing_enviornment, Job2_-_Downloading_Sources, Job3_-_Building_part_1, Job4_-_Building_part_2, Job5_-_Finishing_build, Job6_-_Build_bundle] steps: - - name: cache-cooker - id: internal-cache - uses: actions/cache@v2 - with: - path: /home/runner/work/RetroDECK - key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} + # - name: cache-cooker + # id: internal-cache + # uses: actions/cache@v2 + # with: + # path: /home/runner/work/RetroDECK + # key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} + + - name: Download build specific cache + uses: actions/download-artifact@v2 + with: + name: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }} + path: /home/runner/work/RetroDECK - name: Get date for artifacts id: date @@ -243,6 +299,9 @@ jobs: token: ${{ secrets.TRIGGER_BUILD_TOKEN }} repo: RetroDECK-cooker - - uses: actions/download-artifact@v2 + - name: Upload global cache + uses: actions/upload-artifact@v3 with: - name: global-cache \ No newline at end of file + name: global-cache + path: /home/runner/work/RetroDECK + continue-on-error: true \ No newline at end of file