mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-23 14:35:39 +00:00
First try on internal/global cache
This commit is contained in:
parent
34ddfd9e63
commit
09972b9bb9
91
.github/workflows/cooker.yml
vendored
91
.github/workflows/cooker.yml
vendored
|
@ -15,41 +15,38 @@ on:
|
|||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
# Job1_-_Prepearing_enviornment:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
# - uses: actions/checkout@v3
|
||||
# - name: Prepearing enviornment
|
||||
# run: |
|
||||
# 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
|
||||
Job1_-_Prepearing_enviornment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it+++++++++++++++++++++++++++++++++++
|
||||
|
||||
# - name: cache-cooker
|
||||
# id: cache-cooker
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: /home/runner/work/RetroDECK
|
||||
# key: ${{ runner.os }}-cooker-cache
|
||||
- name: Get date for artifacts
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y%m%d_%H%M%S')"
|
||||
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||
id: extract_branch
|
||||
|
||||
- name: Generating build ID
|
||||
id: buildID
|
||||
run: echo "${{ steps.extract_branch.outputs.branch }}-${{ steps.date.outputs.date }}"
|
||||
|
||||
Job2_-_Downloading_Sources:
|
||||
runs-on: ubuntu-latest
|
||||
#needs: [Job1_-_Prepearing_enviornment]
|
||||
needs: [Job1_-_Prepearing_enviornment]
|
||||
steps:
|
||||
|
||||
- name: cache-cooker
|
||||
id: cache-cooker
|
||||
- name: Retrieve previous cache
|
||||
id: global-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: ${{ runner.os }}-cooker-cache
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: cooker-global-cache
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
@ -66,6 +63,13 @@ 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 --install --force-clean --repo=local retrodeck-flatpak net.retrodeck.retrodeck.yml
|
||||
|
||||
- name: Generating build specific cache
|
||||
id: intenral-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: jobs.Job1_-_Prepearing_enviornment.steps.buildID
|
||||
|
||||
# - name: Continuing with previous worklow cache
|
||||
# if: steps.cache-cooker.outputs.cache-hit == 'true'
|
||||
# run: |
|
||||
|
@ -87,11 +91,11 @@ jobs:
|
|||
#- uses: actions/checkout@v3
|
||||
|
||||
- name: cache-cooker
|
||||
id: cache-cooker
|
||||
id: internal-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: ${{ runner.os }}-cooker-cache
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: jobs.Job1_-_Prepearing_enviornment.steps.buildID
|
||||
|
||||
- name: Initializing enviornment
|
||||
#if: steps.cache-cooker.outputs.cache-hit != 'true'
|
||||
|
@ -117,11 +121,11 @@ jobs:
|
|||
#- uses: actions/checkout@v3
|
||||
|
||||
- name: cache-cooker
|
||||
id: cache-cooker
|
||||
id: internal-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: ${{ runner.os }}-cooker-cache
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: jobs.Job1_-_Prepearing_enviornment.steps.buildID
|
||||
|
||||
- name: Initializing enviornment
|
||||
#if: steps.cache-cooker.outputs.cache-hit != 'true'
|
||||
|
@ -147,11 +151,11 @@ jobs:
|
|||
#- uses: actions/checkout@v3
|
||||
|
||||
- name: cache-cooker
|
||||
id: cache-cooker
|
||||
id: internal-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: ${{ runner.os }}-cooker-cache
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: jobs.Job1_-_Prepearing_enviornment.steps.buildID
|
||||
|
||||
- name: Initializing enviornment
|
||||
#if: steps.cache-cooker.outputs.cache-hit != 'true'
|
||||
|
@ -177,11 +181,11 @@ jobs:
|
|||
#- uses: actions/checkout@v3
|
||||
|
||||
- name: cache-cooker
|
||||
id: cache-cooker
|
||||
id: internal-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: ${{ runner.os }}-cooker-cache
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: jobs.Job1_-_Prepearing_enviornment.steps.buildID
|
||||
|
||||
- name: Initializing enviornment
|
||||
#if: steps.cache-cooker.outputs.cache-hit != 'true'
|
||||
|
@ -206,11 +210,11 @@ jobs:
|
|||
steps:
|
||||
|
||||
- name: cache-cooker
|
||||
id: cache-cooker
|
||||
id: internal-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: ${{ runner.os }}-cooker-cache
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: jobs.Job1_-_Prepearing_enviornment.steps.buildID
|
||||
|
||||
- name: Get date for artifacts
|
||||
id: date
|
||||
|
@ -240,6 +244,13 @@ jobs:
|
|||
token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
||||
repo: RetroDECK-cooker
|
||||
|
||||
- name: Regenerate global cache
|
||||
id: global-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /home/runner/work/RetroDECK
|
||||
key: cooker-global-cache
|
||||
|
||||
# Job8_-_Uploading_cache:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: [Job7_-_Publishing_flatpak]
|
||||
|
|
Loading…
Reference in a new issue