Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

Commit

Permalink
Travis Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
anupam-git committed Jun 22, 2018
1 parent 338263d commit 022d4bb
Show file tree
Hide file tree
Showing 5 changed files with 292 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
language: cpp
compiler: gcc
dist: trusty
sudo: required

notifications:
email: false

addons:
apt:
sources:
- sourceline: 'ppa:beineri/opt-qt-5.10.1-trusty'

packages:
- wget
- git
- cmake
- qt510base
- qt510declarative

before_install:
- wget "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
- git clone https://github.com/KDE/extra-cmake-modules.git
- chmod a+x linuxdeployqt-continuous-x86_64.AppImage

install:
- cd extra-cmake-modules/ && cmake . && make -j$(nproc) && sudo make -j$(nproc) install && cd ..
- sudo update-alternatives --install /usr/bin/qmake qmake /opt/qt510/bin/qmake 1

script:
- /opt/qt510/bin/qt510-env.sh
- export QT_SELECT=qt5
- export PATH=$PATH:/opt/qt510/bin/
- export QML_MODULES_FIND_DIRS="/opt/qt510/qml /usr/lib/x86_64-linux-gnu/qml"
- export VERSION=$(git rev-parse --short HEAD)
- sudo ldconfig -c /opt/qt510/lib/ /usr/lib/x86_64-linux-gnu/
- cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH="/opt/qt510/"
- make -j$(nproc)
- make -j$(nproc) DESTDIR=appdir install
- ARCH=x86_64 ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs
- ARCH=x86_64 ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage

after_success:
- mkdir out
- mv ./paper*.AppImage ./out/
- md5sum ./out/paper*.AppImage > ./out/MD5-$VERSION.txt
- curl --upload-file ./out/paper*.AppImage https://transfer.sh/

branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)$/

before_deploy:
- if [ -z "$TRAVIS_TAG" ]; then export TRAVIS_TAG="continuous"; git tag -f $TRAVIS_TAG; fi

deploy:
provider: releases
api_key: "$GITHUB_TOKEN"
file_glob: true
file: out/*
skip_cleanup: true
prerelease: true
overwrite: true
on:
repo: anupam-git/paper
branch: master
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_INSTALL_PREFIX /usr)

include(FeatureSummary)

Expand All @@ -18,4 +19,7 @@ add_definitions(-DPROJECT_VERSION="${PROJECT_VERSION}")
add_definitions(-DPROJECT_DESCRIPTION="\\nPaper - A Random Wallpaper Application\\nA CLI Tool to set a random wallpaper from Unsplash.com")
add_subdirectory(src)

install(FILES "paper.desktop" DESTINATION share/applications)
install(FILES "paper.svg" DESTINATION share/icons)

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
8 changes: 8 additions & 0 deletions paper.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=paper
Exec=paper
Icon=paper
Comment=A CLI Tool to set a random wallpaper from Unsplash.com
Terminal=true
Categories=Utility;
211 changes: 211 additions & 0 deletions paper.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ target_link_libraries(
Qt5::Network
)

install(TARGETS ${PROJECT_NAME} DESTINATION bin)

0 comments on commit 022d4bb

Please sign in to comment.