Browse Source

For CI - separate MinGW build tree from VS build tree.
Test [cache clear].

Yao Wei Tjong 姚伟忠 8 years ago
parent
commit
f77939e7ae
2 changed files with 6 additions and 6 deletions
  1. 3 3
      .travis.yml
  2. 3 3
      CMake/Modules/Urho3D-CMake-common.cmake

+ 3 - 3
.travis.yml

@@ -135,7 +135,7 @@ clone_depth: 50
 cache:
 cache:
   - C:\tools\mingw32 -> .appveyor.yml
   - C:\tools\mingw32 -> .appveyor.yml
   - C:\tools\mingw64 -> .appveyor.yml
   - C:\tools\mingw64 -> .appveyor.yml
-  - Build
+  - mingw-Build
 environment:
 environment:
   GIT_NAME:
   GIT_NAME:
     secure: onlJNy/nGFT1GXNdusL4jokojSPZ732EFaXwdhPnpM0=
     secure: onlJNy/nGFT1GXNdusL4jokojSPZ732EFaXwdhPnpM0=
@@ -148,7 +148,7 @@ environment:
   SF_API:
   SF_API:
     secure: cc1q9CXo5BwIYqtgigHpkCGG90zEVM45xx/YzXTOjVp512oQNUzTJq0AmxEYXP78
     secure: cc1q9CXo5BwIYqtgigHpkCGG90zEVM45xx/YzXTOjVp512oQNUzTJq0AmxEYXP78
 # Using neither-in-nor-out-of-source (Urho3D-legacy) build tree when on AppVeyor; using out-of-source (and in-the-source) build tree when on Travis-CI for test coverage
 # Using neither-in-nor-out-of-source (Urho3D-legacy) build tree when on AppVeyor; using out-of-source (and in-the-source) build tree when on Travis-CI for test coverage
-  build_tree: Build
+  build_tree: mingw-Build
   config: Release
   config: Release
 # We cannot afford to have a large matrix on AppVeyor at the moment
 # We cannot afford to have a large matrix on AppVeyor at the moment
   URHO3D_D3D11: 1
   URHO3D_D3D11: 1
@@ -179,7 +179,7 @@ before_build:
   - ps: $env:COMMIT_MESSAGE = $(git log --format=%B -n 1 $env:APPVEYOR_REPO_COMMIT)
   - ps: $env:COMMIT_MESSAGE = $(git log --format=%B -n 1 $env:APPVEYOR_REPO_COMMIT)
   - rake ci_setup_cache
   - rake ci_setup_cache
 build_script:
 build_script:
-  - rake ci && if "%PACKAGE_UPLOAD%" == "1" rake ci_package_upload && move Build\*.zip . && rd /S /Q Build\_CPack_Packages
+  - rake ci && if "%PACKAGE_UPLOAD%" == "1" rake ci_package_upload && move %build_tree%\*.zip . && rd /S /Q %build_tree%\_CPack_Packages
   - rake ci_timer
   - rake ci_timer
 after_build: rake ci_teardown_cache
 after_build: rake ci_teardown_cache
 test: off
 test: off

+ 3 - 3
CMake/Modules/Urho3D-CMake-common.cmake

@@ -1832,11 +1832,11 @@ elseif (WEB)
         endif ()
         endif ()
     endif ()
     endif ()
 else ()
 else ()
-    # Ensure the output directory exist before creating the symlinks
-    file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
     # Create symbolic links in the build tree
     # Create symbolic links in the build tree
     foreach (I Autoload CoreData Data)
     foreach (I Autoload CoreData Data)
-        if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/${I})
+        if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/${I} AND EXISTS ${CMAKE_SOURCE_DIR}/bin/${I})
+            # Ensure the output directory exist before creating the symlinks
+            file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
             create_symlink (${CMAKE_SOURCE_DIR}/bin/${I} ${CMAKE_BINARY_DIR}/bin/${I} FALLBACK_TO_COPY)
             create_symlink (${CMAKE_SOURCE_DIR}/bin/${I} ${CMAKE_BINARY_DIR}/bin/${I} FALLBACK_TO_COPY)
         endif ()
         endif ()
     endforeach ()
     endforeach ()