Commit 204b13e4 authored by azubieta's avatar azubieta

Merge branch 'build_appimage_on_gitlab' into 'master'

Build AppImage on gitlab-ci

See merge request azubieta/appimage-cli-tool!21
parents 6f592b75 9007454b
Pipeline #459 canceled with stages
in 7 minutes and 58 seconds
......@@ -2,6 +2,44 @@ stages:
- build
- test
## AppImage
build:AppImage:
image: conanio/gcc48
stage: build
script:
- sudo apt-get -y -qq update && sudo apt-get -y -qq install python-pip realpath wget
- pip install conan --upgrade
- pip install conan_package_tools
- conan user
- conan remote add appimage-community https://api.bintray.com/conan/appimage-conan-community/public-conan --insert=0
- conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
- conan remote add azubieta https://api.bintray.com/conan/azubieta/AppImage
- mkdir build && cd build
- conan install .. --build missing -s cppstd=11 -s compiler.libcxx=libstdc++11
- cmake -DUSE_CONAN=ON .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
- make install -j`nproc` DESTDIR=AppDir
- . activate_run.sh
- INSTALL_PREFIX=" " ../.travis/build_appimage.sh
artifacts:
paths:
- build/appimage-cli-tool*.AppImage*
cache:
key: conan_cache
paths:
- /home/conan/.conan/*
test:AppImage:
image: ubuntu:trusty
stage: test
dependencies:
- build:AppImage
script:
- sudo apt-get -y -qq update && sudo apt-get -y -qq install libglib2.0-0
- build/appimage-cli-tool*.AppImage --appimage-extract
- squashfs-root/AppRun --help
## Debian Buster Package
build:debian_buster_pkg:
image: azubieta90/appimage-user-tool-build:debian-buster
......
......@@ -16,9 +16,13 @@ SOURCES_DIR=`dirname ${SOURCES_DIR}`
wget -nc https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget -nc https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-*
for FILE in linuxdeploy*; do
chmod +x $FILE
./$FILE --appimage-extract
done
export LD_LIBRARY_PATH=${QT_INSTALL_PREFIX}/lib:${INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH}
export QT_SELECT=5
./linuxdeploy-x86_64.AppImage --appdir=AppDir --plugin qt --output appimage --desktop-file=AppDir/usr/share/applications/org.appimage.user-tool.desktop
squashfs-root/usr/bin/linuxdeploy --appdir=AppDir --plugin qt --output appimage --desktop-file=AppDir/usr/share/applications/org.appimage.user-tool.desktop
......@@ -11,20 +11,27 @@ include(cmake/versioning.cmake)
include(GNUInstallDirs)
## Config
option(USE_CONAN "Use conan as source of dependencies" OFF)
option(BUILD_SETTINGS_DIALOG "Build the settings dialog componetns" ON)
option(INSTALL_LIBAPPIMAGE "Install libAppImage as part of this project" OFF)
option(INSTALL_ATTICA "Install KF5 Attica as part of this project" OFF)
# Dependencies
if(USE_CONAN)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(NO_OUTPUT_DIRS)
endif()
# avoid collissions with existing libappimage target when used from other projects
if(NOT TARGET libappimage)
find_package(libappimage REQUIRED)
endif()
find_package(Qt5 COMPONENTS Core Widgets Network XmlPatterns Gui REQUIRED)
find_package(Qt5 COMPONENTS Core Widgets Network Gui REQUIRED)
find_package(XdgUtils COMPONENTS DesktopEntry REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(KF5Attica)
## Config
option(BUILD_SETTINGS_DIALOG "Build the settings dialog componetns" ON)
option(INSTALL_LIBAPPIMAGE "Install libAppImage as part of this project" OFF)
option(INSTALL_ATTICA "Install KF5 Attica as part of this project" OFF)
find_package(KF5Attica REQUIRED)
# Source
add_subdirectory(src)
......
[requires]
qt/5.12.2@bincrafters/stable
yaml-cpp/0.6.2@bincrafters/stable
kf5-attica/5.57.0@appimage-conan-community/stable
libappimage/1.0.0@appimage-conan-community/stable
xdg-utils-cxx/0.1.1@appimage-conan-community/stable
[build_requires]
cmake_installer/3.10.0@conan/stable
[generators]
cmake
cmake_paths
virtualrunenv
qt
[options]
qt:qttools=True
qt:qtnetworkauth=True
qt:widgets=True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment