Skip to content

Commit

Permalink
build appimage
Browse files Browse the repository at this point in the history
  • Loading branch information
Murmele committed Jul 10, 2023
1 parent db545a2 commit 776649c
Showing 1 changed file with 53 additions and 1 deletion.
54 changes: 53 additions & 1 deletion .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"
pack: 1
cmake_env: {}

- name: macos
Expand Down Expand Up @@ -318,6 +321,11 @@ jobs:
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,49 @@ jobs:
cd build/release
ninja check_no_win32_offscreen
- name: Install
if: matrix.env.ninja_platform == 'linux' && !matrix.qt.check_only
run: |
cd build/release
mkdir -p AppDir
DESTDIR=AppDir ninja install
- name: Build Appimage
if: matrix.env.ninja_platform == 'linux'
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
export QTDIR=$RUNNER_WORKSPACE/Qt/${{ matrix.qt.version }}/${{ matrix.env.qt_arch }}
export LD_LIBRARY_PATH=$QTDIR/lib
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 LD_LIBRARY_PATH=$QTDIR/lib/ ./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'
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 @@ -392,6 +443,7 @@ jobs:
**/artifacts/Gittyup macos/Gittyup*.dmg
**/artifacts/Gittyup Flatpak/com.github.Murmele.Gittyup.yml
**/Gittyup-x86_64/*.flatpak
**/artifacts/Gittyup Appimage/Gittyup-*
# needed otherwise the docs folder is not available
- name: Checkout repository
Expand Down

0 comments on commit 776649c

Please sign in to comment.