Add AppImage build

This commit is contained in:
Zhymabek Roman 2022-10-20 10:02:46 +06:00 committed by Nicolas Werner
parent f7b3c895ef
commit 719c357659
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -223,6 +223,73 @@ build-flatpak-arm64:
paths: ['build-flatpak/nheko-arm64.flatpak']
name: flatpak-${CI_COMMIT_REF_NAME}-${VERSION}-arm64
appimage-amd64:
stage: build
image: ubuntu:22.04
tags: [docker]
before_script:
# Installing the packages needed to download and install third-party tools
- apt-get update && apt-get install -y software-properties-common git wget curl
# Installing the packages needed to compile nheko and third-party tools
- apt-get -y install --no-install-suggests --no-install-recommends ca-certificates build-essential ninja-build cmake gcc make automake ccache liblmdb-dev
libssl-dev libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediaquick5 libqt5svg5-dev
qtmultimedia5-dev qtquickcontrols2-5-dev qttools5-dev qttools5-dev-tools qtdeclarative5-dev
qml-module-qtmultimedia qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qt-labs-platform
qt5keychain-dev ccache clazy libcurl4-openssl-dev libevent-dev libspdlog-dev nlohmann-json3-dev libcmark-dev asciidoc libre2-dev libgtest-dev libgl1-mesa-dev python3 python3-pip python3-setuptools
# Installing the packages needed to build AppImage
- apt-get -yq install breeze-icon-theme desktop-file-utils elfutils fakeroot file gnupg2 gtk-update-icon-cache libgdk-pixbuf2.0-dev libgdk-pixbuf2.0-0 libglib2.0-bin librsvg2-dev libyaml-dev strace zsync squashfs-tools
- wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool && \
- chmod +x /usr/local/bin/appimagetool
- python3 -m pip install --upgrade pip
- pip3 install appimage-builder
- /usr/sbin/update-ccache-symlinks
- rm -rf ../.hunter && mv .hunter ../.hunter || true
script:
- export PATH="/usr/local/bin/:/usr/lib/ccache:${PATH}"
- cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -GNinja
-DHUNTER_ROOT=".hunter"
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF
-DVOIP=OFF
-DMAN=OFF
-DCI_BUILD=ON
-DHUNTER_CONFIGURATION_TYPES=Release
-DUSE_BUNDLED_SPDLOG=ON
-DUSE_BUNDLED_OLM=ON
-DUSE_BUNDLED_GTEST=OFF
-DUSE_BUNDLED_CMARK=ON
-DUSE_BUNDLED_JSON=ON
-DUSE_BUNDLED_OPENSSL=ON
-DUSE_BUNDLED_MTXCLIENT=ON
-DUSE_BUNDLED_LMDB=OFF
-DUSE_BUNDLED_LMDBXX=ON
-DUSE_BUNDLED_QTKEYCHAIN=OFF
-DUSE_BUNDLED_LIBEVENT=ON
-DUSE_BUNDLED_LIBCURL=ON
-DUSE_BUNDLED_COEURL=ON
-DJSON_ImplicitConversions=OFF
- DESTDIR=`pwd`/AppDir ninja -C build install/local
- DESTDIR=`pwd`/AppDir ninja -C build _deps/cmark-build/src/install
- mkdir -p AppDir/usr/lib/x86_64-linux-gnu AppDir/lib/x86_64-linux-gnu
- appimage-builder --skip-test
after_script:
- bash ./.ci/upload-nightly-gitlab.sh nheko-latest-x86_64.AppImage
artifacts:
paths:
- 'nheko-latest-x86_64.AppImage'
expire_in: 1 week
expose_as: 'appimage-amd64'
cache:
key: "$CI_JOB_NAME"
paths:
- .hunter/
- .ccache
linting:
stage: build
image: alpine:latest