Migrated cache to artifact - removed job2

This commit is contained in:
Xargon Wan 2022-05-03 15:04:17 +09:00
parent 44298bba70
commit 31a42d0096

View file

@ -37,51 +37,51 @@ jobs:
outputs:
buildID: "${{ steps.extract_branch.outputs.branch }}-${{ steps.date.outputs.date }}"
Job2_-_Downloading_Sources:
runs-on: ubuntu-latest
needs: [Job1_-_Prepearing_enviornment]
steps:
# Job2_-_Downloading_Sources:
# runs-on: ubuntu-latest
# needs: [Job1_-_Prepearing_enviornment]
# steps:
- name: Download global cache
uses: actions/download-artifact@v2
with:
name: global-cache
continue-on-error: true
# - name: Download global cache
# uses: actions/download-artifact@v2
# with:
# name: global-cache
# continue-on-error: true
- name: Exctracting cache
run: unzip retrodeck-cooker.zip -d /home/runner/work/RetroDECK
continue-on-error: true
# - name: Exctracting cache
# run: unzip -n retrodeck-cooker.zip -d /home/runner/work/RetroDECK
# continue-on-error: true
- uses: actions/checkout@v3
#if: steps.global-cache.outputs.cache-hit != 'true'
# - uses: actions/checkout@v3
# #if: steps.global-cache.outputs.cache-hit != 'true'
- name: Downloading sources
run: |
git pull
git submodule init
git submodule update
sudo add-apt-repository ppa:alexlarsson/flatpak
sudo apt-get update
sudo apt install flatpak flatpak-builder p7zip-full
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
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: Downloading sources
# run: |
# git pull
# git submodule init
# git submodule update
# sudo add-apt-repository ppa:alexlarsson/flatpak
# sudo apt-get update
# sudo apt install flatpak flatpak-builder p7zip-full
# sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# 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
# with:
# retrodeck-cooker.zip
# key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }}
# # - name: Generating build specific cache
# # id: intenral-cache
# # uses: actions/cache@v2
# # with:
# # retrodeck-cooker.zip
# # key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }}
- name: Compressing cache
run: zip -r retrodeck-cooker.zip /home/runner/work/RetroDECK/* -x retrodeck-cooker.zip
# - name: Compressing cache
# run: zip -r retrodeck-cooker.zip /home/runner/work/RetroDECK/* -x retrodeck-cooker.zip
- name: Upload build specific cache
uses: actions/upload-artifact@v3
with:
name: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }}
path: retrodeck-cooker.zip
# - name: Upload build specific cache
# uses: actions/upload-artifact@v3
# with:
# name: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }}
# path: retrodeck-cooker.zip
# - name: Continuing with previous worklow cache
@ -100,29 +100,25 @@ jobs:
Job3_-_Building_part_1:
runs-on: ubuntu-latest
needs: [Job1_-_Prepearing_enviornment, Job2_-_Downloading_Sources]
needs: [Job1_-_Prepearing_enviornment]
steps:
#- uses: actions/checkout@v3
# - name: cache-cooker
# id: internal-cache
# uses: actions/cache@v2
# with:
# retrodeck-cooker.zip
# key: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }}
- name: Download build specific cache
- name: Download global cache
uses: actions/download-artifact@v2
with:
name: ${{ needs.Job1_-_Prepearing_enviornment.outputs.buildID }}
path: retrodeck-cooker.zip
name: global-cache
continue-on-error: true
- name: Exctracting cache
run: unzip retrodeck-cooker.zip -d /home/runner/work/RetroDECK
run: unzip -n retrodeck-cooker.zip -d /home/runner/work/RetroDECK
continue-on-error: true
- uses: actions/checkout@v3
- name: Initializing enviornment
#if: steps.cache-cooker.outputs.cache-hit != 'true'
run: |
git pull
git submodule init
git submodule update
sudo add-apt-repository ppa:alexlarsson/flatpak
@ -130,6 +126,7 @@ jobs:
sudo apt install flatpak flatpak-builder p7zip-full
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
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: Bulding part 1 - Until melonds
#if: steps.cache-cooker.outputs.cache-hit != 'true'
@ -148,7 +145,7 @@ jobs:
Job4_-_Building_part_2:
runs-on: ubuntu-latest
needs: [Job1_-_Prepearing_enviornment, Job2_-_Downloading_Sources, Job3_-_Building_part_1]
needs: [Job1_-_Prepearing_enviornment, Job3_-_Building_part_1]
steps:
#- uses: actions/checkout@v3
@ -186,7 +183,7 @@ jobs:
Job5_-_Finishing_build:
runs-on: ubuntu-latest
needs: [Job1_-_Prepearing_enviornment, Job2_-_Downloading_Sources, Job3_-_Building_part_1, Job4_-_Building_part_2]
needs: [Job1_-_Prepearing_enviornment, Job3_-_Building_part_1, Job4_-_Building_part_2]
steps:
#- uses: actions/checkout@v3
@ -204,7 +201,7 @@ jobs:
path: retrodeck-cooker.zip
- name: Exctracting cache
run: unzip retrodeck-cooker.zip -d /home/runner/work/RetroDECK
run: unzip -n retrodeck-cooker.zip -d /home/runner/work/RetroDECK
- name: Initializing enviornment
#if: steps.cache-cooker.outputs.cache-hit != 'true'
@ -234,7 +231,7 @@ jobs:
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]
needs: [Job1_-_Prepearing_enviornment, Job3_-_Building_part_1, Job4_-_Building_part_2, Job5_-_Finishing_build]
steps:
#- uses: actions/checkout@v3
@ -252,7 +249,7 @@ jobs:
path: retrodeck-cooker.zip
- name: Exctracting cache
run: unzip retrodeck-cooker.zip -d /home/runner/work/RetroDECK
run: unzip -n retrodeck-cooker.zip -d /home/runner/work/RetroDECK
- name: Initializing enviornment
#if: steps.cache-cooker.outputs.cache-hit != 'true'
@ -282,7 +279,7 @@ jobs:
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]
needs: [Job1_-_Prepearing_enviornment, Job3_-_Building_part_1, Job4_-_Building_part_2, Job5_-_Finishing_build, Job6_-_Build_bundle]
steps:
# - name: cache-cooker
@ -299,7 +296,7 @@ jobs:
path: retrodeck-cooker.zip
- name: Exctracting cache
run: unzip retrodeck-cooker.zip -d /home/runner/work/RetroDECK
run: unzip -n retrodeck-cooker.zip -d /home/runner/work/RetroDECK
- name: Get date for artifacts
id: date