Skip to content

Commit

Permalink
Add build AppImage on Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
tx00100xt committed Feb 27, 2024
1 parent 0d8e322 commit 23e47f6
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 3 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 5 additions & 3 deletions build-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 23e47f6

Please sign in to comment.