Explorar o código

For Appveyor - first attempt to enable 32-bit CI jobs on Windows host.

Yao Wei Tjong 姚伟忠 %!s(int64=10) %!d(string=hai) anos
pai
achega
95580f6ba0
Modificáronse 4 ficheiros con 59 adicións e 15 borrados
  1. 50 0
      .appveyor.yml
  2. 4 11
      CMake/Modules/Urho3D-CMake-common.cmake
  3. 4 3
      Rakefile
  4. 1 1
      Source/Urho3D/CMakeLists.txt

+ 50 - 0
.appveyor.yml

@@ -0,0 +1,50 @@
+#
+# Copyright (c) 2008-2015 the Urho3D project.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+
+version: '{build}'
+branches:
+  only: [master]
+skip_tags: true
+skip_commits:
+  message: /(?:\[ci skip\]|API documentation update)/
+os:
+  - Visual Studio 2015
+  - MinGW
+shallow_clone: true
+environment:
+  NUMJOBS: 4
+  matrix:
+    - URHO3D_LIB_TYPE: STATIC
+    - URHO3D_LIB_TYPE: SHARED
+platform: x86
+matrix:
+  fast_finish: true
+install:
+  - gem update --system
+  - gem install rake
+build_script:
+  - rake cmake URHO3D_LIB_TYPE=%URHO3D_LIB_TYPE% URHO3D_LUAJIT=1 URHO3D_LUAJIT_AMALG=1 URHO3D_EXTRAS=1 URHO3D_TESTING=1
+  - rake make target=test
+test: off
+deploy: off
+
+# vi: set ts=2 sw=2 expandtab:

+ 4 - 11
CMake/Modules/Urho3D-CMake-common.cmake

@@ -607,11 +607,6 @@ else ()
             endif ()
             set (CMAKE_C_FLAGS_RELEASE "-Oz -DNDEBUG")
             set (CMAKE_CXX_FLAGS_RELEASE "-Oz -DNDEBUG")
-            if (DEFINED ENV{CI})
-                # Our CI server is slow, so do not optimize and discard all debug info when test building in Debug configuration
-                set (CMAKE_C_FLAGS_DEBUG "-g0")
-                set (CMAKE_CXX_FLAGS_DEBUG "-g0")
-            endif ()
             # CMake does not treat Emscripten as a valid platform yet, certain platform-specific variables cannot be set in the
             # toolchain file as they get overwritten by CMake internally as per Linux platform default, so set them here for now
             set (CMAKE_EXECUTABLE_SUFFIX .html)
@@ -626,7 +621,7 @@ else ()
                     set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mstackrealign")
                     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstackrealign")
                 else ()
-                    if (DEFINED ENV{CI})
+                    if (DEFINED ENV{TRAVIS})
                         # TODO: Remove this workaround when Travis CI VM has been migrated to Ubuntu 14.04 LTS
                         set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-tree-slp-vectorize -fno-tree-vectorize")
                         set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-tree-slp-vectorize -fno-tree-vectorize")
@@ -652,7 +647,7 @@ else ()
         endif ()
         # Temporary workaround for Travis CI VM as Ubuntu 12.04 LTS still uses old glibc header files that do not have the necessary patch for Clang to work correctly
         # TODO: Remove this workaround when Travis CI VM has been migrated to Ubuntu 14.04 LTS
-        if (DEFINED ENV{CI} AND "$ENV{LINUX}")
+        if (DEFINED ENV{TRAVIS} AND "$ENV{LINUX}")
             add_definitions (-D__extern_always_inline=inline)
         endif ()
     endif ()
@@ -1094,9 +1089,7 @@ macro (setup_emscripten_linker_flags LINKER_FLAGS)
     endif ()
     set (${LINKER_FLAGS} "${${LINKER_FLAGS}} ${MEMORY_LINKER_FLAGS} -s USE_SDL=2 -s NO_EXIT_RUNTIME=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1")
     set (${LINKER_FLAGS}_RELEASE "${${LINKER_FLAGS}_RELEASE} -O3 -s AGGRESSIVE_VARIABLE_ELIMINATION=1")     # Remove variables to make the -O3 regalloc easier
-    if (NOT DEFINED ENV{CI})
-        set (${LINKER_FLAGS}_DEBUG "${${LINKER_FLAGS}_DEBUG} -g4")     # Preserve LLVM debug information, show line number debug comments, and generate source maps
-    endif ()
+    set (${LINKER_FLAGS}_DEBUG "${${LINKER_FLAGS}_DEBUG} -g4")     # Preserve LLVM debug information, show line number debug comments, and generate source maps
     if (URHO3D_TESTING)
         set (${LINKER_FLAGS} "${${LINKER_FLAGS}} --emrun")  # Inject code into the generated Module object to enable capture of stdout, stderr and exit()
     endif ()
@@ -1385,7 +1378,7 @@ macro (setup_test)
         list (APPEND ARG_OPTIONS -timeout ${URHO3D_TEST_TIMEOUT})
         if (EMSCRIPTEN)
             if (DEFINED ENV{CI})
-                # The latency on Travis CI server could be very high at time, so add some adjustment
+                # The latency on CI server could be very high at time, so add some adjustment
                 # If it is not enough causing a test case failure then so be it because it is better that than wait for it and still ends up in build error due to time limit
                 set (EMRUN_TIMEOUT_ADJUSTMENT + 8 * \\${URHO3D_TEST_TIMEOUT})
                 set (EMRUN_TIMEOUT_RETURNCODE --timeout_returncode 0)

+ 4 - 3
Rakefile

@@ -134,6 +134,7 @@ task :make do
     numjobs = ":#{numjobs}" unless numjobs.empty?
     build_options = "/maxcpucount#{numjobs}#{build_options}"
     filter = unfilter ? '' : '/nologo /verbosity:minimal'
+    filter = filter  + ' /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"' if ENV['APPVEYOR']
   elsif !Dir.glob("#{build_tree}/*.ninja").empty?
     # ninja
     if !numjobs.empty?
@@ -528,8 +529,8 @@ EOF
 end
 
 def makefile_ci
-  if (ENV['WINDOWS'] && ENV['CI']) || (ENV['ANDROID'] && ENV['ABI'] == 'arm64-v8a') || ENV['HTML5']
-    # LuaJIT on MinGW build is not possible on Ubuntu 12.04 LTS as its GCC cross-compiler version is too old
+  if (ENV['WINDOWS'] && ENV['TRAVIS']) || (ENV['ANDROID'] && ENV['ABI'] == 'arm64-v8a') || ENV['HTML5']
+    # LuaJIT on MinGW build is not possible on Travis-CI with Ubuntu 12.04 LTS as its GCC cross-compiler version is too old
     # The upstream LuaJIT library does not support Android arm64-v8a ABI at the moment
     # LuaJIT on Emscripten is not possible
     # Fallback to use Lua library instead
@@ -549,7 +550,7 @@ def makefile_ci
     system 'rake ci_push_bindings' or abort
     return 0
   end
-  # For Emscripten CI build, skip make test and/or scaffolding test if Travis-CI VM took too long to get here, as otherwise overall build time may exceed 50 minutes time limit
+  # For Emscripten CI build, skip make test and/or scaffolding test if CI VM took too long to get here, as otherwise overall build time may exceed 50 minutes time limit
   test = $testing == 1 ? '&& make test' : ''
   system "cd ../Build && make -j$NUMJOBS #{test}" or abort 'Failed to build or test Urho3D library'
   unless ENV['CI'] && ENV['HTML5'] && ENV['PACKAGE_UPLOAD']  # For Emscripten, skip scaffolding test when packaging

+ 1 - 1
Source/Urho3D/CMakeLists.txt

@@ -35,7 +35,7 @@ if (URHO3D_CLANG_TOOLS OR URHO3D_BINDINGS)
     execute_process (COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/tool/lib/clang/${LLVM_VERSION})
     create_symlink (${LLVM_LIBDIR}/clang/${LLVM_VERSION}/include ${CMAKE_BINARY_DIR}/bin/tool/lib/clang/${LLVM_VERSION}/include FALLBACK_TO_COPY)
     # TODO: Remove this workaround when Travis CI VM has been migrated to Ubuntu 14.04 LTS (ancient glibc header has incorrect defines)
-    if (DEFINED ENV{CI})
+    if (DEFINED ENV{TRAVIS})
         add_definitions (-D__extern_always_inline=inline)
     endif ()
 endif ()