travis script update
This commit is contained in:
parent
30b2dce0bf
commit
a44ee9ea44
6 changed files with 95 additions and 36 deletions
51
.travis.yml
51
.travis.yml
|
@ -3,51 +3,30 @@ sudo: required
|
||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
env:
|
service:
|
||||||
- PACKAGE_VERSION="1.5.0"
|
- docker
|
||||||
|
|
||||||
before_install:
|
matrix:
|
||||||
- test -n $CC && unset CC
|
include:
|
||||||
- test -n $CXX && unset CXX
|
- env:
|
||||||
|
- BUILD_SCRIPT=linux_travis.sh
|
||||||
install:
|
- env:
|
||||||
- sudo apt-get update -qq
|
- BUILD_SCRIPT=windows_travis.sh
|
||||||
- sudo apt-get install -qq checkinstall dpkg-dev g++ gcc qtbase5-dev qt5-qmake qttranslations5-l10n libqt4-dev
|
- QT_SELECT=qt5-i686-w64-mingw32
|
||||||
|
- env:
|
||||||
before_script:
|
- BUILD_SCRIPT=windows_travis.sh
|
||||||
- if [ `git name-rev --tags --name-only $(git rev-parse HEAD)` == "undefined" ]; then export APPLICATION_VERSION="$PACKAGE_VERSION.$TRAVIS_BUILD_NUMBER"; else export APPLICATION_VERSION=`git name-rev --tags --name-only $(git rev-parse HEAD)`; fi
|
- QT_SELECT=qt5-x86_64-w64-mingw32
|
||||||
- echo "gta5view build version is $APPLICATION_VERSION"
|
- EXECUTABLE_ARCH=_x64
|
||||||
- mkdir build
|
|
||||||
- mkdir package
|
|
||||||
- chmod -x res/gta5sync_*.qm res/gta5view.desktop res/gta5view.png
|
|
||||||
- cd build
|
|
||||||
- mkdir qt4
|
|
||||||
- cd qt4
|
|
||||||
- echo "Grand Theft Auto V Snapmatic and Savegame viewer" > ./description-pak
|
|
||||||
- cd ..
|
|
||||||
- mkdir qt5
|
|
||||||
- cd qt5
|
|
||||||
- echo "Grand Theft Auto V Snapmatic and Savegame viewer" > ./description-pak
|
|
||||||
- cd ..
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cd qt5
|
- .travis/travis.sh
|
||||||
- qmake -qt=5 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=c++11 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$PACKAGE_VERSION-dev7\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro
|
|
||||||
- make -j 4
|
|
||||||
- sudo checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt5 --pkgversion=$PACKAGE_VERSION --pkgrelease=dev7 --pkggroup=utility --maintainer="Syping on Travis \<travisci@syping.de\>" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5widgets5,qttranslations5-l10n --conflicts=gta5view,gta5view-qt4 --replaces=gta5view,gta5view-qt4 --pakdir=../../package
|
|
||||||
- cd ..
|
|
||||||
- cd qt4
|
|
||||||
- qmake -qt=4 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=c++11 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$PACKAGE_VERSION-dev7\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro
|
|
||||||
- make -j 4
|
|
||||||
- sudo checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt4 --pkgversion=$PACKAGE_VERSION --pkgrelease=dev7 --pkggroup=utility --maintainer="Syping on Travis \<travisci@syping.de\>" --requires=libqtcore4,libqtgui4,libqt4-network,qtcore4-l10n --conflicts=gta5view,gta5view-qt5 --replaces=gta5view,gta5view-qt5 --pakdir=../../package
|
|
||||||
- cd ..
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
api_key:
|
api_key:
|
||||||
secure: "o7VneEz1aHfdVwZvOZLfopf6uJWNrFsZaBvunTmXFzpmNFhlNS1qwqgMUkIA2yBRbZ3wIzVs4vfwIHv7W9yE/PqK+AYL+R8+AwKGrwlgT4HqJNuk6VM/LNJ6GwT/qkQuaoOVw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h8tLzWp+UjpWHuWfcpvZgOskjfwU0iDMCayMJ7tDpOhXHcAhDRnd6XRIiOJ5YZCzflj2nEwmt3YUd7DwXS/AU+WHOmcNQBjXBxF/FJa35XXcy3HKJM5TTKqtph3medo30us5yXHeG6NNg="
|
||||||
file_glob: true
|
file_glob: true
|
||||||
file: "../package/gta5view*.deb"
|
file: "assets/*"
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
on:
|
on:
|
||||||
tags: true
|
tags: true
|
||||||
|
|
28
.travis/linux_build.sh
Executable file
28
.travis/linux_build.sh
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Creating folders
|
||||||
|
cd $PROJECT_DIR && \
|
||||||
|
echo "gta5view build version is $APPLICATION_VERSION" && \
|
||||||
|
mkdir build && \
|
||||||
|
mkdir assets && \
|
||||||
|
chmod -x res/gta5sync_*.qm res/gta5view.desktop res/gta5view.png && \
|
||||||
|
cd build && \
|
||||||
|
mkdir qt4 && \
|
||||||
|
cd qt4 && \
|
||||||
|
echo "Grand Theft Auto V Snapmatic and Savegame viewer" > ./description-pak && \
|
||||||
|
cd .. && \
|
||||||
|
mkdir qt5 && \
|
||||||
|
cd qt5 && \
|
||||||
|
echo "Grand Theft Auto V Snapmatic and Savegame viewer" > ./description-pak && \
|
||||||
|
cd .. && \
|
||||||
|
|
||||||
|
# Starting build
|
||||||
|
cd qt5 && \
|
||||||
|
qmake -qt=5 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=c++11 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$APPLICATION_VERSION\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro && \
|
||||||
|
make -j 4 && \
|
||||||
|
sudo checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt5 --pkgversion=$PACKAGE_VERSION --pkgrelease=$PACKAGE_BUILD --pkggroup=utility --maintainer="Syping on Travis \<travisci@syping.de\>" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5widgets5,qttranslations5-l10n --conflicts=gta5view,gta5view-qt4 --replaces=gta5view,gta5view-qt4 --pakdir=$PROJECT_DIR/assets && \
|
||||||
|
cd .. && \
|
||||||
|
cd qt4 && \
|
||||||
|
qmake -qt=4 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=c++11 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$APPLICATION_VERSION\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro && \
|
||||||
|
make -j 4 && \
|
||||||
|
sudo checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt4 --pkgversion=$PACKAGE_VERSION --pkgrelease=$PACKAGE_BUILD --pkggroup=utility --maintainer="Syping on Travis \<travisci@syping.de\>" --requires=libqtcore4,libqtgui4,libqt4-network,qtcore4-l10n --conflicts=gta5view,gta5view-qt5 --replaces=gta5view,gta5view-qt5 --pakdir=$PROJECT_DIR/assets
|
8
.travis/linux_travis.sh
Executable file
8
.travis/linux_travis.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
sudo apt-get update -qq && \
|
||||||
|
sudo apt-get install -qq checkinstall dpkg-dev g++ gcc qtbase5-dev qt5-qmake qttranslations5-l10n libqt4-dev && \
|
||||||
|
|
||||||
|
.travis/linux_build.sh && \
|
||||||
|
cd $PROJECT_DIR
|
14
.travis/travis.sh
Executable file
14
.travis/travis.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Install lua
|
||||||
|
sudo apt-get update -qq && \
|
||||||
|
sudo apt-get install -qq lua5.2
|
||||||
|
|
||||||
|
if [ `git name-rev --tags --name-only $(git rev-parse HEAD)` == "undefined" ]; then export APPLICATION_VERSION=`lua5.2 -e 'for line in io.lines("config.h") do local m = string.match(line, "#define GTA5SYNC_APPVER \"(.+)\"$"); if m then print(m); os.exit(0) end end'`; else export APPLICATION_VERSION=`git name-rev --tags --name-only $(git rev-parse HEAD)`; fi
|
||||||
|
export PACKAGE_VERSION=$(grep -oE '^[^\-]*' <<< $APPLICATION_VERSION)
|
||||||
|
export PACKAGE_BUILD=$(grep -oP '\-\K.+' <<< $APPLICATION_VERSION)
|
||||||
|
export EXECUTABLE_VERSION=$PACKAGE_VERSION$PACKAGE_BUILD
|
||||||
|
if [ "$PACKAGE_BUILD" == "" ]; then export PACKAGE_BUILD=$TRAVIS_BUILD_NUMBER; fi
|
||||||
|
export PROJECT_DIR=$(pwd)
|
||||||
|
|
||||||
|
.travis/$BUILD_SCRIPT
|
18
.travis/windows_build.sh
Executable file
18
.travis/windows_build.sh
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export GTA5VIEW_EXECUTABLE=gta5view-${EXECUTABLE_VERSION}${EXECUTABLE_ARCH}.exe
|
||||||
|
|
||||||
|
# Creating folders
|
||||||
|
cd $PROJECT_DIR && \
|
||||||
|
echo "gta5view build version is $APPLICATION_VERSION" && \
|
||||||
|
echo "gta5view executable is $GTA5VIEW_EXECUTABLE" && \
|
||||||
|
mkdir build && \
|
||||||
|
mkdir assets && \
|
||||||
|
|
||||||
|
# Starting build
|
||||||
|
cd build && \
|
||||||
|
qmake-static DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$APPLICATION_VERSION\\\\\\\"" ../gta5view.pro && \
|
||||||
|
make -j 4 && \
|
||||||
|
cp -Rf release/*.exe $PROJECT_DIR/assets/$GTA5VIEW_EXECUTABLE && \
|
||||||
|
cd $PROJECT_DIR/assets && \
|
||||||
|
upx --best $GTA5VIEW_EXECUTABLE
|
12
.travis/windows_travis.sh
Executable file
12
.travis/windows_travis.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
QT_VERSION=5.6.3
|
||||||
|
DOCKER_IMAGE=syping/qt5-static-mingw:$QT_VERSION
|
||||||
|
PROJECT_DIR_DOCKER=/gta5view/
|
||||||
|
|
||||||
|
cd $PROJECT_DIR && \
|
||||||
|
docker pull $DOCKER_IMAGE && \
|
||||||
|
docker run --rm \
|
||||||
|
-v "${PROJECT_DIR}:${PROJECT_DIR_DOCKER}" \
|
||||||
|
$DOCKER_IMAGE \
|
||||||
|
/bin/bash -c "export PROJECT_DIR=${PROJECT_DIR_DOCKER} && export QT_SELECT=${QT_SELECT} && export APPLICATION_VERSION=${APPLICATION_VERSION} && export PACKAGE_VERSION=${PACKAGE_VERSION} && export PACKAGE_BUILD=${PACKAGE_BUILD} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .travis/windows_build.sh"
|
Loading…
Reference in a new issue