Browse Source

For CI - simplify build matrix for Travis Mac build environment.
Since our past assumptions of what is necessary and what is working may no longer valid now due to changes from Travis and from upgraded versions of the software we use, also due to the removal of the number of archs being included in our build, the build matrix setup is simplified without the past speed improvement and workaround scripts. We may modify our setup again depends on the need in the future CI builds.
[skip appveyor] [ci only: OSX]

Yao Wei Tjong 姚伟忠 8 years ago
parent
commit
bae678b132
1 changed files with 6 additions and 18 deletions
  1. 6 18
      .travis.yml

+ 6 - 18
.travis.yml

@@ -511,7 +511,7 @@ branch: {name: OSX-CI, active: yes}
 language: objective-c
 language: objective-c
 cache:
 cache:
   directories:
   directories:
-    # $HOME/.ccache
+    - $HOME/.ccache
     - $HOME/initial-build-tree
     - $HOME/initial-build-tree
 osx_image: xcode9.2
 osx_image: xcode9.2
 env:
 env:
@@ -540,29 +540,17 @@ before_script:
   - if [[ $XCODE ]] && ([[ $RELEASE_TAG ]] || (! [[ $TRAVIS_BRANCH =~ [^-]+-[^-]+-CI ]] && echo $COMMIT_MESSAGE |grep -cq '\[ci package\]')); then export PACKAGE_UPLOAD=1; fi
   - if [[ $XCODE ]] && ([[ $RELEASE_TAG ]] || (! [[ $TRAVIS_BRANCH =~ [^-]+-[^-]+-CI ]] && echo $COMMIT_MESSAGE |grep -cq '\[ci package\]')); then export PACKAGE_UPLOAD=1; fi
   - brew update
   - brew update
   - which cmake >/dev/null 2>&1 || cmake=cmake
   - which cmake >/dev/null 2>&1 || cmake=cmake
-  # travis_retry brew install ccache doxygen graphviz $cmake
-  - travis_retry brew install doxygen graphviz $cmake
+  - if [[ $MAKEFILE ]]; then ccache=ccache; fi
+  - travis_retry brew install doxygen graphviz $cmake $ccache
   - if [[ ! $cmake ]]; then brew outdated cmake || brew upgrade cmake; fi
   - if [[ ! $cmake ]]; then brew outdated cmake || brew upgrade cmake; fi
-  # export PATH=$(brew info ccache |grep -o '\S*lib\S*'):$PATH
-  # if [[ $XCODE ]]; then pushd $(dirname $(xcodebuild -find-executable clang)) >/dev/null && sudo cp -p $(which ccache) . && for compiler in clang clang++; do sudo mv $compiler{,.orig} && sudo ln -sf $(pwd)/clang.orig /usr/local/bin/$compiler && sudo ln -sf ccache $compiler; done && popd >/dev/null && if [[ $IOS ]]; then redundant=AppleTV,Watch; elif [[ $TVOS ]]; then redundant=iPhone,Watch; else redundant=iPhone,AppleTV,Watch; fi && eval sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/{$redundant}{OS,Simulator}.platform; fi
-  - if [[ $XCODE ]]; then if [[ $IOS ]]; then redundant=AppleTV,Watch; elif [[ $TVOS ]]; then redundant=iPhone,Watch; else redundant=iPhone,AppleTV,Watch; fi && eval sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/{$redundant}{OS,Simulator}.platform; fi
+  - if [[ $ccache ]]; then export PATH=$(brew info ccache |grep -o '\S*lib\S*'):$PATH; fi
+  - if [[ $XCODE ]]; then unset USE_CCACHE && if [[ $IOS ]]; then redundant=AppleTV,Watch; elif [[ $TVOS ]]; then redundant=iPhone,Watch; else redundant=iPhone,AppleTV,Watch; fi && eval sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/{$redundant}{OS,Simulator}.platform; fi
   - rake ci_setup_cache
   - rake ci_setup_cache
 script: rake ci && if [[ $PACKAGE_UPLOAD ]]; then rake ci_package_upload; fi && rake ci_timer
 script: rake ci && if [[ $PACKAGE_UPLOAD ]]; then rake ci_package_upload; fi && rake ci_timer
 after_script: rake ci_teardown_cache
 after_script: rake ci_teardown_cache
 matrix:
 matrix:
   fast_finish: true
   fast_finish: true
-  include:
-    - &package-stage
-      stage: package
-      condition: PACKAGE_UPLOAD
-      env: *tvOS
-    - <<: *package-stage
-      env: *iOS
-    - <<: *package-stage
-      env: *macOS-STATIC
-    - <<: *package-stage
-      env: *macOS-SHARED
-    - stage: housekeep
+  include: [stage: housekeep]
 
 
 ...
 ...