Skip to content

Commit

Permalink
Appimage support
Browse files Browse the repository at this point in the history
Merge pull request #579 from Murmele/appimage
  • Loading branch information
Murmele authored Nov 12, 2023
2 parents cd952a7 + 1b74bf7 commit 2394355
Showing 1 changed file with 50 additions and 3 deletions.
53 changes: 50 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ jobs:
os: ubuntu-latest
ninja_platform: linux
qt_platform: linux
qt_arch: gcc_64
openssl_arch: linux-x86_64
cmake_flags: "-DGENERATE_APPDATA=ON"
ld_library_arch: linux-x86-64
cmake_flags: "-DGENERATE_APPDATA=ON -DCMAKE_INSTALL_PREFIX=/usr -DUSE_SYSTEM_QT=ON -DENABLE_UPDATE_OVER_GUI=OFF"
pack: 0
cmake_env: {}

- name: macos
Expand Down Expand Up @@ -315,9 +318,14 @@ jobs:
if: matrix.env.pack && !matrix.qt.check_only
uses: actions/upload-artifact@v3
with:
path: build/release/VERSION.txt
path: build/release/Version.txt
name: Gittyup-VERSION

- name: Check Version file
run: |
cd build/release
cat ./Version.txt
- name: Test
if: matrix.env.ninja_platform != 'win' && matrix.env.ninja_platform != 'mac'
uses: GabrielBB/xvfb-action@v1
Expand All @@ -331,6 +339,44 @@ jobs:
cd build/release
ninja check_no_win32_offscreen
- name: Build Appimage
if: matrix.env.ninja_platform == 'linux' && !matrix.qt.check_only
run: |
cd build/release
sudo apt -y install appstream
sudo apt -y install libfuse2
sudo apt -y install libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0
sudo apt -y install libxcb-shm0 libxcb-sync1 libxcb-util1 libxcb-xinerama0 libxcb-xinput0 libxcb-xkb1 libxcb-xrm0 libxcb-xv0 libxcb-xvmc0 libxcb1
mkdir -p AppDir
DESTDIR=AppDir ninja install
export QTDIR=$RUNNER_WORKSPACE/Qt/${{ matrix.qt.version }}/${{ matrix.env.qt_arch }}
rm -rf ./AppDir/usr/include/
strip ./AppDir/usr/bin/cmark ./AppDir/usr/bin/gittyup ./AppDir/usr/bin/indexer ./AppDir/usr/bin/relauncher
wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
chmod +x appimagetool-*.AppImage
QTDIR=$QTDIR ./appimagetool-*.AppImage -s deploy ./AppDir/usr/share/applications/*.desktop --appimage-extract-and-run # Bundle EVERYTHING
# Modify the AppDir: move ld-linux into the same directory as the payload application
# and change AppRun accordingly; so that, e.g., Qt qApp->applicationDirPath() works
mv ./AppDir/lib64/ld-${{ matrix.env.ld_library_arch }}.so.2 ./AppDir/usr/bin/
sed -i -e 's@^LD_LINUX.*@LD_LINUX=$(find "$HERE/usr/bin" -name "ld-*.so.*" | head -n 1)@g' ./AppDir/AppRun
rm ./AppDir/usr/share/metainfo/gittyup.appdata.xml
VERSION=$(cat ./Version.txt)
VERSION="$VERSION" ./appimagetool-*.AppImage ./AppDir # turn AppDir into AppImage
#ls -lh Gittyup-*
- name: Publish Appimage
if: matrix.env.ninja_platform == 'linux' && !matrix.qt.check_only
uses: actions/upload-artifact@v3
with:
path: build/release/*.AppImage
name: Gittyup Appimage

publish:
# https://github.com/marvinpinto/actions/issues/177
needs: [flatpak, build]
Expand Down Expand Up @@ -361,7 +407,7 @@ jobs:
# version is exported from cmake to file
- name: Retrieve version
run: |
echo "::set-output name=VERSION::$(cat artifacts/Gittyup-VERSION/VERSION.txt)"
echo "::set-output name=VERSION::$(cat artifacts/Gittyup-VERSION/Version.txt)"
id: version

- name: Update GitHub release (latest tag)
Expand Down Expand Up @@ -392,6 +438,7 @@ jobs:
**/artifacts/Gittyup macos/Gittyup*.dmg
**/artifacts/Gittyup Flatpak/com.github.Murmele.Gittyup.yml
**/Gittyup-x86_64/*.flatpak
**/artifacts/Gittyup Appimage/*
# needed otherwise the docs folder is not available
- name: Checkout repository
Expand Down

0 comments on commit 2394355

Please sign in to comment.