WORKFLOWS: updated from cooker-0.8.0b

This commit is contained in:
XargonWan 2024-02-05 15:01:56 +01:00
parent 5c034c1aef
commit 71475db952
7 changed files with 45 additions and 58 deletions

View file

@ -64,7 +64,7 @@ jobs:
- name: "Build flatpak: download only"
id: "flatpak-download"
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only_persistent.sh"
continue-on-error: true
# Sometimes flatpak download fails, in this case it tries a second time
@ -76,10 +76,10 @@ jobs:
rm -f "{GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml"
cp "${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml.bak" "${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml"
"${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh"
"${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
"${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only_persistent.sh"
- name: Build flatpak
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_only.sh"
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_only_persistent.sh"
- name: Create Artifact for flathub
run: |
@ -90,7 +90,7 @@ jobs:
continue-on-error: true
- name: Create Bundle
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_bundle.sh"
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_bundle_persistent.sh"
- name: Set environment variable with current branch name
run: echo "GITHUB_REF_SLUG=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV

View file

@ -1,23 +1,28 @@
name: "Build cooker"
on:
push:
branches:
- cooker*
- feat*
paths:
- '.github/workflows/**'
- 'automation_tools/**'
- 'emu-configs/**'
- 'es-configs/**'
- 'functions/**'
- 'rd-submodules/**'
- '*.sh'
- 'net.retrodeck.retrodeck.yml'
- 'net.retrodeck.retrodeck.appdata.xml'
pull_request:
branches:
- cooker*
# push:
# branches:
# - cooker*
# - feat*
# paths:
# - '.github/workflows/**'
# - 'automation_tools/**'
# - 'emu-configs/**'
# - 'es-configs/**'
# - 'functions/**'
# - 'rd-submodules/**'
# - '*.sh'
# - 'net.retrodeck.retrodeck.yml'
# - 'net.retrodeck.retrodeck.appdata.xml'
# pull_request:
# branches:
# - cooker*
# Italy (CET): 11:00 PM
# Japan (JST): 7:00 AM
schedule:
- cron: '0 22 * * *'
workflow_dispatch:
@ -42,15 +47,11 @@ jobs:
run: "automation_tools/install_dependencies.sh"
- name: Generate cooker build ID
run: |
word1=$(shuf -n 1 ${GITHUB_WORKSPACE}/automation_tools/codename_wordlist.txt)
capitalized_word1="$(tr '[:lower:]' '[:upper:]' <<< ${word1:0:1})${word1:1}"
word2=$(shuf -n 1 ${GITHUB_WORKSPACE}/automation_tools/codename_wordlist.txt)
capitalized_word2="$(tr '[:lower:]' '[:upper:]' <<< ${word2:0:1})${word2:1}"
result=$capitalized_word1$capitalized_word2
echo $result > ${GITHUB_WORKSPACE}/buildid
echo "buildid=$result" >> $GITHUB_ENV
echo "VersionID is $result"
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/cooker_build_id.sh"
# backing up manifest in case download fails and hashes must be recalculated
- name: Manifest backup
run: "cp ${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml ${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml.bak"
- name: Run pre-build automation tasks
run : "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh"
@ -74,10 +75,11 @@ jobs:
if: steps.flatpak-download.outcome == 'failure'
run: |
echo "Download failed, maybe some hash changed since the build start."
git checkout -- net.retrodeck.retrodeck.yml
echo "Recalculating hashes and retrying download..."
"/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh"
"/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
rm -f "{GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml"
cp "${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml.bak" "${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml"
"${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh"
"${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
- name: Build flatpak
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_only.sh"
@ -151,3 +153,4 @@ jobs:
name: retrodeck-flatpak
path: RetroDECK-cooker.flatpak
continue-on-error: true

View file

@ -58,10 +58,6 @@ jobs:
id: check_version_string
run: "automation_tools/main_version_checker.sh"
- name: Validate Manifest (main only)
id: validate_manifest
run: "automation_tools/manifest_validation.sh"
- name: "[DEBUG] Outputting manifest"
run: cat net.retrodeck.retrodeck.yml
@ -125,4 +121,4 @@ jobs:
with:
name: retrodeck-flatpak
path: RetroDECK.flatpak
continue-on-error: true
continue-on-error: true

View file

@ -68,7 +68,7 @@ jobs:
- name: Buld part 1 - Until melonds
run: |
sudo flatpak-builder --build-only --stop-at=melonds --user --force-clean --repo=${GITHUB_WORKSPACE}/local retrodeck-flatpak-cooker net.retrodeck.retrodeck.yml
sudo flatpak-builder --build-only --stop-at=melonds --user --force-clean --repo=${GITHUB_WORKSPACE}/.local retrodeck-flatpak-cooker net.retrodeck.retrodeck.yml
- name: Compress cache
run: |
@ -140,8 +140,8 @@ jobs:
- name: Create Bundle
run: |
sudo flatpak-builder --user --force-clean --repo=${GITHUB_WORKSPACE}/local retrodeck-flatpak-cooker net.retrodeck.retrodeck.yml
sudo flatpak build-bundle $GITHUB_WORKSPACE/local RetroDECK.flatpak net.retrodeck.retrodeck
sudo flatpak-builder --user --force-clean --repo=${GITHUB_WORKSPACE}/.local retrodeck-flatpak-cooker net.retrodeck.retrodeck.yml
sudo flatpak build-bundle $GITHUB_WORKSPACE/.local RetroDECK.flatpak net.retrodeck.retrodeck
- name: Get date for artifacts
id: date

View file

@ -69,7 +69,7 @@ jobs:
- name: Buld part 1 - Until melonds
run: |
sudo flatpak-builder --build-only --stop-at=melonds --user --force-clean --repo=${GITHUB_WORKSPACE}/local retrodeck-flatpak-main net.retrodeck.retrodeck.yml
sudo flatpak-builder --build-only --stop-at=melonds --user --force-clean --repo=${GITHUB_WORKSPACE}/.local retrodeck-flatpak-main net.retrodeck.retrodeck.yml
- name: Compress cache
run: |
@ -141,8 +141,8 @@ jobs:
- name: Create Bundle
run: |
sudo flatpak-builder --user --force-clean --repo=${GITHUB_WORKSPACE}/local retrodeck-flatpak-main net.retrodeck.retrodeck.yml
sudo flatpak build-bundle $GITHUB_WORKSPACE/local RetroDECK.flatpak net.retrodeck.retrodeck
sudo flatpak-builder --user --force-clean --repo=${GITHUB_WORKSPACE}/.local retrodeck-flatpak-main net.retrodeck.retrodeck.yml
sudo flatpak build-bundle $GITHUB_WORKSPACE/.local RetroDECK.flatpak net.retrodeck.retrodeck
- name: Read version from version file
id: version

View file

@ -1,12 +0,0 @@
name: "Runner Cleanup"
on:
workflow_dispatch:
jobs:
Cleanup:
runs-on: self-hosted
steps:
- name: Self Hosted Runner Post Job Cleanup Action
uses: TooMuch4U/actions-clean@v2.1

View file

@ -2,8 +2,8 @@ name: Sunday Submodule Update
on:
# At 4:00 (CET)
#schedule:
# - cron: '0 2 * * 0'
# schedule:
# - cron: '0 2 * * 0'
workflow_dispatch:
jobs: