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