From 23e47f6fdfc819c2004f9ec9c54705e917ecb114 Mon Sep 17 00:00:00 2001 From: Alexander Pavlov Date: Tue, 27 Feb 2024 05:42:04 +0300 Subject: [PATCH] Add build AppImage on Github Action --- .github/workflows/cibuild.yml | 59 +++++++++++++++++++++++++++++++++++ build-appimage.sh | 8 +++-- 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cibuild.yml b/.github/workflows/cibuild.yml index 3e6a092..27a7f07 100644 --- a/.github/workflows/cibuild.yml +++ b/.github/workflows/cibuild.yml @@ -998,3 +998,62 @@ jobs: with: name: SeriousSamClassic-${{ steps.date.outputs.time }}-lnx-s390x-bin.tar.xz path: SeriousSamClassic-${{ steps.date.outputs.time }}-lnx-s390x-bin.tar.xz + + build-appimage-x64: + name: AppImage ${{ matrix.Configuration }} ${{ matrix.Platform }} + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + Configuration: [Release] + Platform: [x64] + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + env: # Or as an environment variable + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + + - name: List keys5 + run: gpg -K + + - uses: actions/checkout@v4 + - name: Install packages + run: | + sudo apt-get update -qq + sudo apt-get install -qq -y libsdl2-dev libogg-dev libvorbis-dev && + sudo apt-get install -qq -y bison flex zlib1g-dev libxxhash-dev && + sudo apt-get install libvulkan1 libvulkan-dev libcurl4-nss-dev libopenal-dev libopenal1 + + - name: Get current date + id: date + uses: Kaven-Universe/github-action-current-date-time@v1 + with: + format: "YYYYMMDD" + + - name: Show current date + run: | + echo "${{ steps.date.outputs.time }}" + - name: Run Build + run: | + cd ${{github.workspace}} + ./build-appimage.sh + mv -f ${{github.workspace}}/SeriousSamTFE-1.10.6d-x86_64.AppImage SeriousSamTFE-${{ steps.date.outputs.time }}-1.10.6d-x86_64.AppImage + mv -f ${{github.workspace}}/SeriousSamTSE-1.10.6d-x86_64.AppImage SeriousSamTSE-${{ steps.date.outputs.time }}-1.10.6d-x86_64.AppImage + - name: Upload TFE artifact + uses: actions/upload-artifact@v4 + with: + name: SeriousSamTFE-${{ steps.date.outputs.time }}-1.10.6d-x86_64.AppImage + path: SeriousSamTFE-${{ steps.date.outputs.time }}-1.10.6d-x86_64.AppImage + + - name: Upload TSE artifact + uses: actions/upload-artifact@v4 + with: + name: SeriousSamTSE-${{ steps.date.outputs.time }}-1.10.6d-x86_64.AppImage + path: SeriousSamTSE-${{ steps.date.outputs.time }}-1.10.6d-x86_64.AppImage diff --git a/build-appimage.sh b/build-appimage.sh index a0b6b53..c3d5f7c 100755 --- a/build-appimage.sh +++ b/build-appimage.sh @@ -35,7 +35,7 @@ make -j4 make install DESTDIR=AppDir cd .. -# copr compiled stuff to main dir +# copy compiled stuff to main dir cp -ax build/AppDir AppDir cp -ax build-xplus/AppDir/usr/* AppDir/usr @@ -49,14 +49,15 @@ cp -fr appimage/serioussam/io.itch.tx00100xt.serioussam.appdata.xml AppDir/usr/s # remove unused stuff rm -fr AppDir/usr/bin/{serioussamse,serioussamse-ded,serioussamse-mkfont,serioussamse-texconv} +rm -fr AppDir/usr/bin/{serioussam-ded,serioussam-mkfont,serioussam-texconv} rm -fr AppDir/usr/lib/{serioussamse,libEngineMP.so} rm -fr AppDir/usr/share/applications/serioussam.desktop rm -fr AppDir/usr/share/applications/serioussamse.desktop rm -fr AppDir/usr/share/serioussamse # create appimage for TFE +export LD_LIBRARY_PATH=AppDir/usr/lib SIGN=1 ./linuxdeploy-x86_64.AppImage --executable AppDir/usr/bin/serioussam --desktop-file AppDir/usr/share/applications/io.itch.tx00100xt.serioussam.desktop --icon-file AppDir/usr/share/icons/hicolor/128x128/apps/serioussam.png --appdir AppDir --output appimage - # copr compiled stuff to main dir mv AppDir AppDirTFE cp -ax build/AppDir AppDir @@ -72,14 +73,15 @@ cp -fr appimage/serioussamse/io.itch.tx00100xt.serioussamse.appdata.xml AppDir/u # remove unused stuff rm -fr AppDir/usr/bin/{serioussam,serioussam-ded,serioussam-mkfont,serioussam-texconv} +rm -fr AppDir/usr/bin/{serioussamse-ded,serioussamse-mkfont,serioussamse-texconv} rm -fr AppDir/usr/lib/{serioussam,libEngine.so} rm -fr AppDir/usr/share/applications/serioussam.desktop rm -fr AppDir/usr/share/applications/serioussamse.desktop rm -fr AppDir/usr/share/serioussam # create appimage for TSE +export LD_LIBRARY_PATH=AppDir/usr/lib SIGN=1 ./linuxdeploy-x86_64.AppImage --executable AppDir/usr/bin/serioussamse --desktop-file AppDir/usr/share/applications/io.itch.tx00100xt.serioussamse.desktop --icon-file AppDir/usr/share/icons/hicolor/128x128/apps/serioussam.png --appdir AppDir --output appimage - # rename appimages mv Serious_Sam_The_First_Encounter-x86_64.AppImage SeriousSamTFE-1.10.6d-x86_64.AppImage chmod +x SeriousSamTFE-1.10.6d-x86_64.AppImage