From 416e6511fdda60c0c1152ab800b6f12dad3e7585 Mon Sep 17 00:00:00 2001 From: Xargon Date: Mon, 23 May 2022 22:57:10 +0900 Subject: [PATCH] WORKFLOW: losing my time on this stuff again --- .github/workflows/cooker.yml | 61 +++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cooker.yml b/.github/workflows/cooker.yml index 15829bdf..daf93999 100644 --- a/.github/workflows/cooker.yml +++ b/.github/workflows/cooker.yml @@ -26,7 +26,7 @@ jobs: run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch - - name: Generating build ID + - name: Generate build ID id: generating_buildid run: echo "##[set-output name=build-id;]$(echo "${{ steps.extract_branch.outputs.branch }}-${{ steps.date.outputs.date }}")" @@ -41,14 +41,22 @@ jobs: search_artifacts: true continue-on-error: true + - name: DEBUG + run: | + echo "Listing folder $PWD contents" + ls -ln + echo "Checking for verson file" + find ~ -iname version + cat $(find ~ -iname version) + # not needed maybe? - - name: Extracting global cache + - name: Extract global cache run: | tar --skip-old-files -xzvf retrodeck-cooker.tar.gz rm -f retrodeck-cooker.tar.gz continue-on-error: true - - name: Initializing enviornment + - name: Initialize enviornment run: | git pull git submodule init @@ -59,16 +67,16 @@ jobs: 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 - - name: Bulding part 1 - Until melonds + - 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 - - name: Compressing cache + - name: Compress cache run: | touch retrodeck-cooker.tar.gz rm -rf .flatpak-builder/build/*-{2,3,4,5,6} find .flatpak-builder/build -xtype l -exec rm {} \; # removing dead symlinks - tar --ignore-failed-read -czvf retrodeck-cooker.tar.gz retrodeck-flatpak-cooker + tar --ignore-failed-read -czvf retrodeck-cooker.tar.gz retrodeck-flatpak-cooker .flatpak-builder/build - name: Upload build specific cache uses: actions/upload-artifact@v3 @@ -76,6 +84,22 @@ jobs: name: "${{ steps.generating_buildid.outputs.build-id }}" path: retrodeck-cooker.tar.gz + # this is done to speed up the things now, it may be removed later + - name: Compress global cache + run: | + touch retrodeck-cooker.tar.gz + rm -rf .flatpak-builder/build/*-{2,3,4,5,6} + find .flatpak-builder/build -xtype l -exec rm {} \; # removing dead symlinks + tar --ignore-failed-read -czvf retrodeck-cooker.tar.gz retrodeck-flatpak-cooker .flatpak-builder/build + continue-on-error: true + + - name: Upload global cache + uses: actions/upload-artifact@v3 + with: + name: global-cache + path: retrodeck-cooker.tar.gz RetroDECK.flatpak + continue-on-error: true + outputs: buildID: "${{ steps.generating_buildid.outputs.build-id }}" @@ -91,12 +115,20 @@ jobs: with: name: ${{ needs.Job1_-_Building_P1.outputs.buildID }} - - name: Extracting cache + - name: Extract cache run: | tar --skip-old-files -xzvf retrodeck-cooker.tar.gz rm -f retrodeck-cooker.tar.gz - - name: Initializing enviornment + - name: DEBUG + run: | + echo "Listing folder $PWD contents" + ls -ln + echo "Checking for verson file" + find ~ -iname version + cat $(find ~ -iname version) + + - name: Initialize enviornment run: | git pull git submodule init @@ -107,7 +139,7 @@ jobs: 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 - - name: Creating Bundle + - 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 @@ -145,12 +177,12 @@ jobs: repo: RetroDECK-cooker continue-on-error: true - - name: Compressing global cache + - name: Compress global cache run: | touch retrodeck-cooker.tar.gz rm -rf .flatpak-builder/build/*-{2,3,4,5,6} find .flatpak-builder/build -xtype l -exec rm {} \; # removing dead symlinks - tar --ignore-failed-read -czvf retrodeck-cooker.tar.gz retrodeck-flatpak-cooker + tar --ignore-failed-read -czvf retrodeck-cooker.tar.gz retrodeck-flatpak-cooker .flatpak-builder/build continue-on-error: true - name: Upload global cache @@ -159,3 +191,10 @@ jobs: name: global-cache path: retrodeck-cooker.tar.gz RetroDECK.flatpak continue-on-error: true + + - name: Upload RetroDECK.flatpak + uses: actions/upload-artifact@v3 + with: + name: retrodeck-flatpak + path: RetroDECK.flatpak + continue-on-error: true