travis script update
This commit is contained in:
parent
a44ee9ea44
commit
d3ce20a710
11 changed files with 79 additions and 41 deletions
10
.travis.yml
10
.travis.yml
|
@ -3,13 +3,21 @@ sudo: required
|
||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
|
compiler: clang
|
||||||
|
|
||||||
service:
|
service:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- env:
|
- env:
|
||||||
- BUILD_SCRIPT=linux_travis.sh
|
- BUILD_SCRIPT=debian32_travis.sh
|
||||||
|
- QMAKE_FLAGS_QT4=QMAKE_CXXFLAGS+=-Wno-missing-field-initializers
|
||||||
|
- APT_INSTALL=clang
|
||||||
|
- env:
|
||||||
|
- BUILD_SCRIPT=debian64_travis.sh
|
||||||
|
- QMAKE_FLAGS_QT4=QMAKE_CXXFLAGS+=-Wno-missing-field-initializers
|
||||||
|
- APT_INSTALL=clang
|
||||||
- env:
|
- env:
|
||||||
- BUILD_SCRIPT=windows_travis.sh
|
- BUILD_SCRIPT=windows_travis.sh
|
||||||
- QT_SELECT=qt5-i686-w64-mingw32
|
- QT_SELECT=qt5-i686-w64-mingw32
|
||||||
|
|
11
.travis/debian32_travis.sh
Executable file
11
.travis/debian32_travis.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DOCKER_IMAGE=i386/debian:jessie
|
||||||
|
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 APT_INSTALL=${APT_INSTALL} && export QMAKE_FLAGS_QT4=${QMAKE_FLAGS_QT4} && export QMAKE_FLAGS_QT5=${QMAKE_FLAGS_QT5} && 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/debian_install.sh && .travis/debian_build.sh"
|
11
.travis/debian64_travis.sh
Executable file
11
.travis/debian64_travis.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DOCKER_IMAGE=debian:jessie
|
||||||
|
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 APT_INSTALL=${APT_INSTALL} && export QMAKE_FLAGS_QT4=${QMAKE_FLAGS_QT4} && export QMAKE_FLAGS_QT5=${QMAKE_FLAGS_QT5} && 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/debian_install.sh && .travis/debian_build.sh"
|
31
.travis/debian_build.sh
Executable file
31
.travis/debian_build.sh
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/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 .. && \
|
||||||
|
|
||||||
|
# Prepare checkinstall step
|
||||||
|
mkdir -p /usr/share/gta5view && \
|
||||||
|
|
||||||
|
# Starting build
|
||||||
|
cd qt5 && \
|
||||||
|
qmake -qt=5 -spec linux-clang GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=gnu++11 $QMAKE_FLAGS_QT5 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$APPLICATION_VERSION\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro && \
|
||||||
|
make -j 4 && \
|
||||||
|
checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt5 --pkgversion=$PACKAGE_VERSION --pkgrelease=$PACKAGE_BUILD --pkggroup=utility --maintainer="Syping \<dpkg@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=gnu++11 $QMAKE_FLAGS_QT4 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$APPLICATION_VERSION\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro && \
|
||||||
|
make -j 4 && \
|
||||||
|
checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt4 --pkgversion=$PACKAGE_VERSION --pkgrelease=$PACKAGE_BUILD --pkggroup=utility --maintainer="Syping \<dpkg@syping.de\>" --requires=libqtcore4,libqtgui4,libqt4-network,qtcore4-l10n --conflicts=gta5view,gta5view-qt5 --replaces=gta5view,gta5view-qt5 --pakdir=$PROJECT_DIR/assets
|
5
.travis/debian_install.sh
Executable file
5
.travis/debian_install.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
apt-get update -qq && \
|
||||||
|
apt-get install -qq $APT_INSTALL checkinstall dpkg-dev fakeroot g++ gcc qtbase5-dev qt5-qmake qttranslations5-l10n libqt4-dev
|
|
@ -1,28 +0,0 @@
|
||||||
#!/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
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/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
|
|
|
@ -7,7 +7,7 @@ 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
|
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_VERSION=$(grep -oE '^[^\-]*' <<< $APPLICATION_VERSION)
|
||||||
export PACKAGE_BUILD=$(grep -oP '\-\K.+' <<< $APPLICATION_VERSION)
|
export PACKAGE_BUILD=$(grep -oP '\-\K.+' <<< $APPLICATION_VERSION)
|
||||||
export EXECUTABLE_VERSION=$PACKAGE_VERSION$PACKAGE_BUILD
|
export EXECUTABLE_VERSION=${PACKAGE_VERSION}${PACKAGE_BUILD}
|
||||||
if [ "$PACKAGE_BUILD" == "" ]; then export PACKAGE_BUILD=$TRAVIS_BUILD_NUMBER; fi
|
if [ "$PACKAGE_BUILD" == "" ]; then export PACKAGE_BUILD=$TRAVIS_BUILD_NUMBER; fi
|
||||||
export PROJECT_DIR=$(pwd)
|
export PROJECT_DIR=$(pwd)
|
||||||
|
|
||||||
|
|
8
.travis/ubuntu64_travis.sh
Executable file
8
.travis/ubuntu64_travis.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
sudo .travis/debian_install.sh && \
|
||||||
|
|
||||||
|
# Build gta5view
|
||||||
|
sudo .travis/debian_build.sh && \
|
||||||
|
cd $PROJECT_DIR
|
|
@ -11,7 +11,7 @@ mkdir assets && \
|
||||||
|
|
||||||
# Starting build
|
# Starting build
|
||||||
cd build && \
|
cd build && \
|
||||||
qmake-static DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$APPLICATION_VERSION\\\\\\\"" ../gta5view.pro && \
|
qmake-static $QMAKE_FLAGS DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$APPLICATION_VERSION\\\\\\\"" ../gta5view.pro && \
|
||||||
make -j 4 && \
|
make -j 4 && \
|
||||||
cp -Rf release/*.exe $PROJECT_DIR/assets/$GTA5VIEW_EXECUTABLE && \
|
cp -Rf release/*.exe $PROJECT_DIR/assets/$GTA5VIEW_EXECUTABLE && \
|
||||||
cd $PROJECT_DIR/assets && \
|
cd $PROJECT_DIR/assets && \
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
QT_VERSION=5.6.3
|
QT_VERSION=5.6.3
|
||||||
DOCKER_IMAGE=syping/qt5-static-mingw:$QT_VERSION
|
DOCKER_IMAGE=syping/qt5-static-mingw:$QT_VERSION
|
||||||
PROJECT_DIR_DOCKER=/gta5view/
|
PROJECT_DIR_DOCKER=/gta5view
|
||||||
|
|
||||||
cd $PROJECT_DIR && \
|
cd $PROJECT_DIR && \
|
||||||
docker pull $DOCKER_IMAGE && \
|
docker pull $DOCKER_IMAGE && \
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v "${PROJECT_DIR}:${PROJECT_DIR_DOCKER}" \
|
-v "${PROJECT_DIR}:${PROJECT_DIR_DOCKER}" \
|
||||||
$DOCKER_IMAGE \
|
$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"
|
/bin/bash -c "export PROJECT_DIR=${PROJECT_DIR_DOCKER} && export QT_SELECT=${QT_SELECT} && export APPLICATION_VERSION=${APPLICATION_VERSION} && export QMAKE_FLAGS_QT4=${QMAKE_FLAGS_QT4} && export QMAKE_FLAGS_QT5=${QMAKE_FLAGS_QT5} && 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