Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
For CI - misc. post-mortem fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
weitjong committed Aug 20, 2017
1 parent 50dd3fd commit be87f31
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
22 changes: 18 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ data:
<<: *base
cache:
env:
before_script: export TAG=$(git describe --exact-match $TRAVIS_COMMIT~ 2>/dev/null); if [[ $TAG =~ [[:digit:]]+\.[[:digit:]]+ ]]; then export RELEASE_TAG=$TAG; fi
script: rake ci_delete_mirror

matrix:
Expand Down Expand Up @@ -133,6 +134,18 @@ matrix:
env: WIN32=1 URHO3D_LIB_TYPE=STATIC URHO3D_64BIT=0 URHO3D_OPENGL=0
- <<: *MinGW-32bit
env: WIN32=1 URHO3D_LIB_TYPE=SHARED URHO3D_64BIT=0 URHO3D_OPENGL=0
- stage: debug build
<<: *Linux-64bit
env: &STATIC-DEBUG LINUX=1 URHO3D_LIB_TYPE=STATIC CMAKE_BUILD_TYPE=DEBUG
- stage: debug build
<<: *Linux-64bit
env: &SHARED-DEBUG LINUX=1 URHO3D_LIB_TYPE=SHARED CMAKE_BUILD_TYPE=DEBUG
- stage: debug build
<<: *Linux-64bit-clang
env: *STATIC-DEBUG
- stage: debug build
<<: *Linux-64bit-clang
env: *SHARED-DEBUG
# TODO - if/when Travis-CI later supports conditional build stages then move the 'scan' and 'annotate' stages here
- stage: lint (to be implemented)
<<: *base
Expand Down Expand Up @@ -482,7 +495,7 @@ before_script:
- git clone --depth 1 --branch $BRANCH https://github.com/urho3d/emscripten-sdk.git && emscripten-sdk/emsdk activate --build=Release sdk-${BRANCH}-64bit $BINARYEN && source emscripten-sdk/emsdk_env.sh
- for compiler in $EMSCRIPTEN/{emcc,em++}; do touch -d "2017-01-01 00:00:00 +0800" $compiler; done
- rake ci_setup_cache
script: rake ci && if [[ "$TRAVIS_BRANCH" == "Web-CI" ]] && [[ ! $EMSCRIPTEN_WASM ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ "$URHO3D_LIB_TYPE" == "SHARED" ]]; then rake ci_emscripten_samples_update; fi && if [ $PACKAGE_UPLOAD ]; then rake ci_package_upload; fi && rake ci_timer
script: rake ci && if [ $PACKAGE_UPLOAD ]; then rake ci_package_upload; fi && if [[ "$TRAVIS_BRANCH" == "Web-CI" ]] && [[ ! $EMSCRIPTEN_WASM ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ "$URHO3D_LIB_TYPE" == "SHARED" ]]; then rake ci_emscripten_samples_update; fi && rake ci_timer
after_script: rake ci_teardown_cache
matrix:
fast_finish: true
Expand Down Expand Up @@ -536,9 +549,10 @@ matrix:
before_script:
- *before_script
- export PACKAGE_UPLOAD=1
- whitelist='brew-cask ccache cmake doxygen graphviz libpng libyaml md5deep openssl pkg-config readline'
- for f in $(brew list); do [[ $whitelist =~ $f ]] || brew uninstall --force $f; done
- for f in $(brew cask list |grep -v Uninstalling); do [[ $whitelist =~ $f ]] || brew cask uninstall --force $f; done
# Uncomment/readjust below when the packaging build is running out of disk space again
# whitelist='brew-cask ccache cmake doxygen graphviz libpng libyaml md5deep openssl pkg-config readline'
# for f in $(brew list); do [[ $whitelist =~ $f ]] || brew uninstall --force $f; done
# for f in $(brew cask list |grep -v Uninstalling); do [[ $whitelist =~ $f ]] || brew cask uninstall --force $f; done
- travis_retry brew cleanup
- travis_retry brew install doxygen graphviz
- <<: *package-stage
Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ task :ci do
puts; $stdout.flush
# Using out-of-source build tree when using Travis-CI; 'build_tree' environment variable is already set when on AppVeyor
ENV['build_tree'] = '../Build' unless ENV['APPVEYOR']
# Always use a same build configuration to keep ccache's cache size small; single-config generator needs the option when configuring, while multi-config when building
ENV[ENV['XCODE'] ? 'config' : 'CMAKE_BUILD_TYPE'] = 'Release' if ENV['USE_CCACHE']
# Always use a same build configuration per build job to keep ccache's cache size small; default to RELEASE unless specifically defined
ENV['config'] = 'Release' if ENV['XCODE']
# Currently we don't have the infra to test run all the platforms; also skip when doing packaging build due to time constraint
ENV['URHO3D_TESTING'] = '1' if (((ENV['LINUX'] && !ENV['URHO3D_64BIT']) || (ENV['OSX'] && !ENV['IOS'] && !ENV['TVOS']) || ENV['APPVEYOR']) && !ENV['PACKAGE_UPLOAD']) || ENV['WEB']
# When not explicitly specified then use generic generator
Expand Down Expand Up @@ -693,7 +693,7 @@ task :ci_timer do
end

# Always call this function last in the multiple conditional check so that the checkpoint message does not being echoed unnecessarily
def timeup quiet = false, cutoff_time = 40.0
def timeup quiet = false, cutoff_time = ENV['RELEASE_TAG'] ? 60.0 : 40.0
unless File.exists?('start_time.log')
system 'touch start_time.log split_time.log'
return nil
Expand Down

0 comments on commit be87f31

Please sign in to comment.