update CI scripts
This commit is contained in:
parent
99f3c22ab0
commit
e2b7062e26
16 changed files with 30 additions and 27 deletions
10
.ci/ci.sh
Executable file
10
.ci/ci.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $(git name-rev --tags --name-only $(git rev-parse HEAD)) == "undefined" ]; then export APPLICATION_VERSION=$(lua -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}${EXECUTABLE_TAG}
|
||||
if [[ ! ${PACKAGE_BUILD} ]]; then export PACKAGE_BUILD=1; fi
|
||||
export PROJECT_DIR=$(pwd)
|
||||
|
||||
.ci/${BUILD_SCRIPT}
|
|
@ -12,4 +12,4 @@ 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 PACKAGE_CODE=${PACKAGE_CODE} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .travis/debian_install.sh && .travis/debian_build.sh"
|
||||
/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 PACKAGE_CODE=${PACKAGE_CODE} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .ci/debian_install.sh && .ci/debian_build.sh"
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Install packages
|
||||
.travis/osx_install.sh && \
|
||||
.ci/osx_install.sh && \
|
||||
|
||||
# Build gta5view
|
||||
.travis/osx_build.sh && \
|
||||
.ci/osx_build.sh && \
|
||||
cd ${PROJECT_DIR}
|
|
@ -9,18 +9,18 @@ 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 QMAKE_FLAGS_QT4=${QMAKE_FLAGS_QT4} && export QMAKE_FLAGS_QT5=${QMAKE_FLAGS_QT5} && export PACKAGE_VERSION=${PACKAGE_VERSION} && export PACKAGE_BUILD=${PACKAGE_BUILD} && export PACKAGE_CODE=${PACKAGE_CODE} && 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 PACKAGE_CODE=${PACKAGE_CODE} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .ci/windows_build.sh" && \
|
||||
|
||||
# Prepare environment variable
|
||||
export GTA5VIEW_EXECUTABLE=gta5view-${EXECUTABLE_VERSION}${EXECUTABLE_ARCH}.exe && \
|
||||
|
||||
# Upload Assets to Dropbox
|
||||
if [ "${PACKAGE_CODE}" == "Dropbox" ]; then
|
||||
${PROJECT_DIR}/.travis/dropbox_uploader.sh mkdir gta5view-builds/${PACKAGE_VERSION}
|
||||
${PROJECT_DIR}/.travis/dropbox_uploader.sh upload ${PROJECT_DIR}/assets/${GTA5VIEW_EXECUTABLE} gta5view-builds/${PACKAGE_VERSION}/${GTA5VIEW_EXECUTABLE} && \
|
||||
${PROJECT_DIR}/.ci/dropbox_uploader.sh mkdir gta5view-builds/${PACKAGE_VERSION}
|
||||
${PROJECT_DIR}/.ci/dropbox_uploader.sh upload ${PROJECT_DIR}/assets/${GTA5VIEW_EXECUTABLE} gta5view-builds/${PACKAGE_VERSION}/${GTA5VIEW_EXECUTABLE} && \
|
||||
rm -rf ${GTA5VIEW_EXECUTABLE}
|
||||
elif [ "${PACKAGE_CODE}" == "gta5-mods" ]; then
|
||||
${PROJECT_DIR}/.travis/dropbox_uploader.sh mkdir gta5-mods/${PACKAGE_VERSION}
|
||||
${PROJECT_DIR}/.travis/dropbox_uploader.sh upload ${PROJECT_DIR}/assets/${GTA5VIEW_EXECUTABLE} gta5-mods/${PACKAGE_VERSION}/${GTA5VIEW_EXECUTABLE} && \
|
||||
${PROJECT_DIR}/.ci/dropbox_uploader.sh mkdir gta5-mods/${PACKAGE_VERSION}
|
||||
${PROJECT_DIR}/.ci/dropbox_uploader.sh upload ${PROJECT_DIR}/assets/${GTA5VIEW_EXECUTABLE} gta5-mods/${PACKAGE_VERSION}/${GTA5VIEW_EXECUTABLE} && \
|
||||
rm -rf ${GTA5VIEW_EXECUTABLE}
|
||||
fi
|
|
@ -15,5 +15,5 @@ qmake ${QMAKE_FLAGS} DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_BUILDCOD
|
|||
make depend && \
|
||||
make -j 4 && \
|
||||
cd ${PROJECT_DIR}/assets && \
|
||||
makensis -NOCD ${PROJECT_DIR}/.travis/gta5view.nsi && \
|
||||
makensis -NOCD ${PROJECT_DIR}/.ci/gta5view.nsi && \
|
||||
mv -f gta5view_setup.exe gta5view-${EXECUTABLE_VERSION}_setup.exe
|
|
@ -9,4 +9,4 @@ 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 QMAKE_FLAGS_QT4=${QMAKE_FLAGS_QT4} && export QMAKE_FLAGS_QT5=${QMAKE_FLAGS_QT5} && export PACKAGE_VERSION=${PACKAGE_VERSION} && export PACKAGE_BUILD=${PACKAGE_BUILD} && export PACKAGE_CODE=${PACKAGE_CODE} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .travis/wininstall_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 PACKAGE_CODE=${PACKAGE_CODE} && export EXECUTABLE_VERSION=${EXECUTABLE_VERSION} && export EXECUTABLE_ARCH=${EXECUTABLE_ARCH} && cd ${PROJECT_DIR_DOCKER} && .ci/wininstall_build.sh"
|
14
.travis.yml
14
.travis.yml
|
@ -9,37 +9,37 @@ service:
|
|||
matrix:
|
||||
include:
|
||||
- env:
|
||||
- BUILD_SCRIPT=debian_travis.sh
|
||||
- BUILD_SCRIPT=debian_ci.sh
|
||||
- RELEASE_LABEL="Debian 32-Bit Package"
|
||||
- DEBIAN_VERSION=stretch
|
||||
- DOCKER_USER=i386
|
||||
- APT_INSTALL=clang
|
||||
- env:
|
||||
- BUILD_SCRIPT=debian_travis.sh
|
||||
- BUILD_SCRIPT=debian_ci.sh
|
||||
- RELEASE_LABEL="Debian 64-Bit Package"
|
||||
- DEBIAN_VERSION=stretch
|
||||
- DOCKER_USER=amd64
|
||||
- APT_INSTALL=clang
|
||||
- env:
|
||||
- BUILD_SCRIPT=windows_travis.sh
|
||||
- BUILD_SCRIPT=windows_ci.sh
|
||||
- QT_SELECT=qt5-i686-w64-mingw32
|
||||
- RELEASE_LABEL="Windows 32-Bit Portable"
|
||||
- env:
|
||||
- BUILD_SCRIPT=windows_travis.sh
|
||||
- BUILD_SCRIPT=windows_ci.sh
|
||||
- QT_SELECT=qt5-x86_64-w64-mingw32
|
||||
- RELEASE_LABEL="Windows 64-Bit Portable"
|
||||
- EXECUTABLE_ARCH=_x64
|
||||
- env:
|
||||
- BUILD_SCRIPT=windows_travis.sh
|
||||
- BUILD_SCRIPT=windows_ci.sh
|
||||
- QT_SELECT=qt5-x86_64-w64-mingw32
|
||||
- PACKAGE_CODE=Dropbox
|
||||
- env:
|
||||
- BUILD_SCRIPT=wininstall_travis.sh
|
||||
- BUILD_SCRIPT=wininstall_ci.sh
|
||||
- QT_SELECT=qt5-x86_64-w64-mingw32
|
||||
- RELEASE_LABEL="Windows 64-Bit Installer"
|
||||
- os: osx
|
||||
env:
|
||||
- BUILD_SCRIPT=osx_travis.sh
|
||||
- BUILD_SCRIPT=osx_ci.sh
|
||||
- RELEASE_LABEL="Mac OS X 64-Bit Disk Image"
|
||||
|
||||
before_install:
|
||||
|
|
|
@ -20,11 +20,4 @@ if [ "${PACKAGE_CODE}" == "" ]; then
|
|||
export PACKAGE_CODE=GitHub
|
||||
fi
|
||||
|
||||
if [ `git name-rev --tags --name-only $(git rev-parse HEAD)` == "undefined" ]; then export APPLICATION_VERSION=`lua -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}${EXECUTABLE_TAG}
|
||||
if [[ ! ${PACKAGE_BUILD} ]]; then export PACKAGE_BUILD=1; fi
|
||||
export PROJECT_DIR=$(pwd)
|
||||
|
||||
.travis/${BUILD_SCRIPT}
|
||||
.ci/ci.sh
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Install packages
|
||||
sudo .travis/debian_install.sh && \
|
||||
sudo .ci/debian_install.sh && \
|
||||
|
||||
# Build gta5view
|
||||
sudo .travis/debian_build.sh && \
|
||||
sudo .ci/debian_build.sh && \
|
||||
cd ${PROJECT_DIR}
|
||||
|
|
Loading…
Reference in a new issue