From db30358d0623709d6efc4914f878c1684ef34ec8 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 29 Mar 2019 05:56:11 +0300 Subject: [PATCH] travis: fix osx archive name, remove unneeded envvars on osx, try to fix windows python --- .travis.yml | 4 ++-- scripts/build_osx_engine.sh | 4 ---- scripts/travis-deploy.sh | 9 +++++---- scripts/travis_windows_deps.sh | 6 +++++- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2667644d..05e3ccb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ matrix: dist: xenial - os: osx - os: windows - python: "3.6" + env: PYTHONENCODING=UTF-8 before_script: - sh scripts/travis_common_deps.sh - sh scripts/travis_${TRAVIS_OS_NAME}_deps.sh @@ -48,5 +48,5 @@ after_script: - cd ${TRAVIS_BUILD_DIR} - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ccache --show-stats; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh scripts/travis-deploy.sh newengine Xash3DFWGS-i386.AppImage xash3d-mingw.7z; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sh scripts/travis-deploy.sh newengine xash3d-osx.7z; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sh scripts/travis-deploy.sh newengine xash3d-osx.tar.bz2; fi - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then sh scripts/travis-deploy.sh newengine xash3d-vc.7z; fi diff --git a/scripts/build_osx_engine.sh b/scripts/build_osx_engine.sh index 1876f0d3..07c16513 100755 --- a/scripts/build_osx_engine.sh +++ b/scripts/build_osx_engine.sh @@ -5,10 +5,6 @@ # Build engine cd $TRAVIS_BUILD_DIR -export CC="/usr/bin/clang" -export CXX="/usr/bin/clang++" -export CFLAGS="-m32" -export CXXFLAGS="-m32" python waf configure --sdl2=$HOME/Library/Frameworks/SDL2.framework/ --vgui=$TRAVIS_BUILD_DIR/vgui-dev --build-type=debug || die python waf build -j2 || die mkdir -p pkg/ diff --git a/scripts/travis-deploy.sh b/scripts/travis-deploy.sh index ac9ce634..0b0e5f0b 100755 --- a/scripts/travis-deploy.sh +++ b/scripts/travis-deploy.sh @@ -50,7 +50,7 @@ init_repo_and_copy_files() push_until_success() { git push travis-deploy-public $SOURCE_NAME-$TRAVIS_BRANCH - + # probably will never occur, just in case count=0 while [ $? -ne 0 ] && [ $count -lt 5 ] @@ -85,7 +85,8 @@ SOURCE_NAME=$1 shift PUSHED_COMMIT=$(curl --fail https://raw.githubusercontent.com/FWGS/xash3d-deploy/$SOURCE_NAME-$TRAVIS_BRANCH/commit.txt) -if [ $? -ne 0 ]; then +echo "Pushed commit: $PUSHED_COMMIT" +if [ ! -z "$PUSHED_COMMIT" ]; then REV_RANGE="HEAD...$PUSHED_COMMIT" else REV_RANGE="HEAD" @@ -95,13 +96,13 @@ git config --global user.name FWGS-deployer git config --global user.email FWGS-deployer@users.noreply.github.com FILES=$* - + if [ "$TRAVIS_COMMIT" != "$PUSHED_COMMIT" ]; then # Create new repo with new files init_repo_and_copy_files generate_readme commit_files - force_push + force_push else # download repo and commit new files download_repo_and_copy_files diff --git a/scripts/travis_windows_deps.sh b/scripts/travis_windows_deps.sh index 68ecbb55..8fba8e21 100644 --- a/scripts/travis_windows_deps.sh +++ b/scripts/travis_windows_deps.sh @@ -1,6 +1,10 @@ +# python 2.7 cp65001 support +python -m pip install -U pip +pip install win-unicode-console + # SDL2 for VC prebuilt curl http://libsdl.org/release/SDL2-devel-$SDL_VERSION-VC.zip -o SDL2.zip -unzip SDL2.zip +unzip SDL2.zip mv SDL2-$SDL_VERSION SDL2_VC cd $TRAVIS_BUILD_DIR