forked from teamnwah/openmw-tes3coop
Merge pull request #1222 from OpenMW/macos-nightly
Setup macOS nightly builds on Travis
This commit is contained in:
commit
70841ea3b7
7 changed files with 42 additions and 20 deletions
13
.travis.yml
13
.travis.yml
|
@ -15,6 +15,10 @@ env:
|
||||||
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
|
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
|
||||||
# via the "travis encrypt" command using the project repo's public key
|
# via the "travis encrypt" command using the project repo's public key
|
||||||
- secure: "jybGzAdUbqt9vWR/GEnRd96BgAi/7Zd1+2HK68j/i/8+/1YH2XxLOy4Jv/DUBhBlJIkxs/Xv8dRcUlFOclZDHX1d/9Qnsqd3oUVkD7k1y7cTOWy9TBQaE/v/kZo3LpzA3xPwwthrb0BvqIbOfIELi5fS5s8ba85WFRg3AX70wWE="
|
- secure: "jybGzAdUbqt9vWR/GEnRd96BgAi/7Zd1+2HK68j/i/8+/1YH2XxLOy4Jv/DUBhBlJIkxs/Xv8dRcUlFOclZDHX1d/9Qnsqd3oUVkD7k1y7cTOWy9TBQaE/v/kZo3LpzA3xPwwthrb0BvqIbOfIELi5fS5s8ba85WFRg3AX70wWE="
|
||||||
|
# macOS builds FTP upload login
|
||||||
|
- secure: "MegynKyJpyL7XDwdWVEbypQh7CLjqOqOi9lGF97G7Fq0HosVZTmnwjHhmIPZspTP7ES4UbxM3rs/f3ce7sp9JN2ShRJpduD6UEFc8egQXBte9J3obUBIdUxPTRdhnht7VJ+u+pksK1S/Bm1Cs6l0eEluP3vmcaXWMykVQcZsPhY="
|
||||||
|
# macOS builds FTP upload password
|
||||||
|
- secure: "jQcAaWAdDy0+vlNu4POMX8322HanCOQEUTdpviWTAUjWQTjMa0UTM4+zVVgrtEaHMpBaVYYbTT3Rg5BQ9oG+2SiVLJBQQ2XoMcos/YrjPVT6inB02Gs0vFjP29LdPAQVrB8CkAcfQr6u+Z2C+RqAtwhE09LsBUMXjRDzPAtr1CM="
|
||||||
- macos_qt_formula=qt@5.5
|
- macos_qt_formula=qt@5.5
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
|
@ -62,6 +66,15 @@ script:
|
||||||
- if [ "$COVERITY_SCAN_BRANCH" != 1 ] && [ "${TRAVIS_OS_NAME}" = "osx" ]; then make package; fi
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ] && [ "${TRAVIS_OS_NAME}" = "osx" ]; then make package; fi
|
||||||
- if [ "$COVERITY_SCAN_BRANCH" != 1 ] && [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./openmw_test_suite; fi
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ] && [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./openmw_test_suite; fi
|
||||||
- if [ "$COVERITY_SCAN_BRANCH" != 1 ] && [ "${TRAVIS_OS_NAME}" = "linux" ]; then cd .. && ./CI/check_tabs.sh; fi
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ] && [ "${TRAVIS_OS_NAME}" = "linux" ]; then cd .. && ./CI/check_tabs.sh; fi
|
||||||
|
- cd "${TRAVIS_BUILD_DIR}"
|
||||||
|
deploy:
|
||||||
|
provider: script
|
||||||
|
script: ./CI/deploy.osx.sh
|
||||||
|
skip_cleanup: true
|
||||||
|
on:
|
||||||
|
branch: master
|
||||||
|
condition: "$TRAVIS_EVENT_TYPE = cron && $TRAVIS_OS_NAME = osx"
|
||||||
|
repo: OpenMW/openmw
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
recipients:
|
recipients:
|
||||||
|
|
|
@ -7,5 +7,5 @@ brew rm pkgconfig || true
|
||||||
brew rm qt5 || true
|
brew rm qt5 || true
|
||||||
brew install cmake pkgconfig $macos_qt_formula
|
brew install cmake pkgconfig $macos_qt_formula
|
||||||
|
|
||||||
curl https://downloads.openmw.org/osx/dependencies/openmw-deps-0ecece4.zip -o ~/openmw-deps.zip
|
curl https://downloads.openmw.org/osx/dependencies/openmw-deps-c79172d.zip -o ~/openmw-deps.zip
|
||||||
unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null
|
unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null
|
||||||
|
|
|
@ -13,7 +13,7 @@ cmake \
|
||||||
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \
|
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \
|
||||||
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.8" \
|
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.8" \
|
||||||
-D CMAKE_OSX_SYSROOT="macosx10.12" \
|
-D CMAKE_OSX_SYSROOT="macosx10.12" \
|
||||||
-D CMAKE_BUILD_TYPE=Debug \
|
-D CMAKE_BUILD_TYPE=Release \
|
||||||
-D OPENMW_OSX_DEPLOYMENT=TRUE \
|
-D OPENMW_OSX_DEPLOYMENT=TRUE \
|
||||||
-D DESIRED_QT_VERSION=5 \
|
-D DESIRED_QT_VERSION=5 \
|
||||||
-D BUILD_ESMTOOL=FALSE \
|
-D BUILD_ESMTOOL=FALSE \
|
||||||
|
|
9
CI/deploy.osx.sh
Executable file
9
CI/deploy.osx.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd build
|
||||||
|
|
||||||
|
DATE=`date +'%d%m%Y'`
|
||||||
|
SHORT_COMMIT=`git rev-parse --short ${TRAVIS_COMMIT}`
|
||||||
|
TARGET_FILENAME="OpenMW-${DATE}-${SHORT_COMMIT}.dmg"
|
||||||
|
|
||||||
|
curl --ssl --ftp-create-dirs -T *.dmg -u $OSX_FTP_USER:$OSX_FTP_PASSWORD "ftp://s3.mydevil.net:21/nightly/${TARGET_FILENAME}"
|
|
@ -35,18 +35,14 @@ set(OPENMW_VERSION "${OPENMW_VERSION_MAJOR}.${OPENMW_VERSION_MINOR}.${OPENMW_VER
|
||||||
|
|
||||||
set(GIT_CHECKOUT FALSE)
|
set(GIT_CHECKOUT FALSE)
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
|
||||||
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow)
|
find_package(Git)
|
||||||
find_package(Git)
|
|
||||||
|
|
||||||
if(GIT_FOUND)
|
if(GIT_FOUND)
|
||||||
set(GIT_CHECKOUT TRUE)
|
set(GIT_CHECKOUT TRUE)
|
||||||
else(GIT_FOUND)
|
else(GIT_FOUND)
|
||||||
message(WARNING "Git executable not found")
|
message(WARNING "Git executable not found")
|
||||||
endif(GIT_FOUND)
|
endif(GIT_FOUND)
|
||||||
else(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow)
|
endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
|
||||||
message(STATUS "Shallow Git clone detected, not attempting to retrieve version info")
|
|
||||||
endif(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow)
|
|
||||||
endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
|
|
||||||
|
|
||||||
# Macros
|
# Macros
|
||||||
include(OpenMWMacros)
|
include(OpenMWMacros)
|
||||||
|
|
|
@ -3,7 +3,8 @@ execute_process (
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
RESULT_VARIABLE EXITCODE1
|
RESULT_VARIABLE EXITCODE1
|
||||||
OUTPUT_VARIABLE TAGHASH
|
OUTPUT_VARIABLE TAGHASH
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
ERROR_QUIET)
|
||||||
|
|
||||||
execute_process (
|
execute_process (
|
||||||
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
|
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
|
||||||
|
@ -12,13 +13,17 @@ execute_process (
|
||||||
OUTPUT_VARIABLE COMMITHASH
|
OUTPUT_VARIABLE COMMITHASH
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
string (COMPARE EQUAL "${EXITCODE1}:${EXITCODE2}" "0:0" SUCCESS)
|
string (COMPARE EQUAL "${EXITCODE1}:${EXITCODE2}" "0:0" FULL_SUCCESS)
|
||||||
if (SUCCESS)
|
string (COMPARE EQUAL "${EXITCODE2}" "0" COMMIT_SUCCESS)
|
||||||
|
if (FULL_SUCCESS)
|
||||||
set(OPENMW_VERSION_COMMITHASH "${COMMITHASH}")
|
set(OPENMW_VERSION_COMMITHASH "${COMMITHASH}")
|
||||||
set(OPENMW_VERSION_TAGHASH "${TAGHASH}")
|
set(OPENMW_VERSION_TAGHASH "${TAGHASH}")
|
||||||
message(STATUS "OpenMW version ${OPENMW_VERSION}")
|
message(STATUS "OpenMW version ${OPENMW_VERSION}")
|
||||||
else (SUCCESS)
|
elseif (COMMIT_SUCCESS)
|
||||||
|
set(OPENMW_VERSION_COMMITHASH "${COMMITHASH}")
|
||||||
|
message(STATUS "OpenMW version ${OPENMW_VERSION}")
|
||||||
|
else ()
|
||||||
message(WARNING "Failed to get valid version information from Git")
|
message(WARNING "Failed to get valid version information from Git")
|
||||||
endif (SUCCESS)
|
endif ()
|
||||||
|
|
||||||
configure_file(${VERSION_IN_FILE} ${VERSION_FILE})
|
configure_file(${VERSION_IN_FILE} ${VERSION_FILE})
|
||||||
|
|
|
@ -23,8 +23,7 @@ std::string Version::describe()
|
||||||
{
|
{
|
||||||
std::string str = "OpenMW version " + mVersion;
|
std::string str = "OpenMW version " + mVersion;
|
||||||
std::string rev = mCommitHash;
|
std::string rev = mCommitHash;
|
||||||
std::string tag = mTagHash;
|
if (!rev.empty())
|
||||||
if (!rev.empty() && !tag.empty())
|
|
||||||
{
|
{
|
||||||
rev = rev.substr(0, 10);
|
rev = rev.substr(0, 10);
|
||||||
str += "\nRevision: " + rev;
|
str += "\nRevision: " + rev;
|
||||||
|
|
Loading…
Reference in a new issue