appimage example

master
HybridDog 2021-11-08 17:22:15 +01:00
parent bea27399e4
commit 6ba3c42155
2 changed files with 87 additions and 0 deletions

47
.github/workflows/schism.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: main
on:
push:
branches:
- master
tags:
- '*'
jobs:
build:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- name: Get CI functions
run: |
source ci_script.sh
- name: download_schismtracker_and_depends
run: |
download_schismtracker_and_depends
- name: build_schismtracker_appimage
run: |
build_schismtracker_appimage
- uses: actions/upload-artifact@v2
with:
name: "executable"
path: schismtracker/build_appimage/Schism_Tracker-*.AppImage
upload:
name: Make Release and upload Artifacts
needs:
- build
runs-on: ubuntu-16.04
steps:
- uses: actions/download-artifact@v2
- name: Show artifact files
run: |
ls -alFR
- name: Make Release and upload Artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
chmod +x pyuploadtool-x86_64.AppImage
./pyuploadtool-x86_64.AppImage **/Schism_Tracker-*.AppImage

40
ci_script.sh Normal file
View File

@ -0,0 +1,40 @@
download_schismtracker_and_depends() {
# Build instructions from
# https://github.com/schismtracker/schismtracker/blob/6e9f1207015cae0fe1b829fff7bb867e02ec6dea/docs/building_on_linux.md
# Download SchismTracker
git clone --depth=1 https://github.com/schismtracker/schismtracker.git
# Install dependencies with apt
apt-get install build-essential automake autoconf autoconf-archive \
libx11-dev libxext-dev libxv-dev libxxf86misc-dev \
libxxf86vm-dev libsdl1.2-dev libasound2-dev mercurial \
libtool
}
build_schismtracker_appimage() {
cd schismtracker
# Download linuxdeploy
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
autoreconf -i
mkdir -p build_appimage && cd build_appimage
export CFLAGS="-Os -pipe"
../configure --prefix /usr
make -j$(nproc)
# Install Schism Tracker into ./AppDir
mkdir -p AppDir && make install DESTDIR=AppDir
# Modify the .desktop file so that linuxdeploy works
sed -i '/\[Desktop Action Render WAV\]/,$ s:^:# :' ./AppDir/usr/share/applications/schism.desktop
# Create the AppImage with linuxdeploy
export NO_APPSTREAM=1
./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage
# Update Information:
# https://github.com/AppImage/AppImageSpec/blob/master/draft.md#github-releases
# https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/blob/master/README.md#optional-variables
cd ../..
}