فهرست منبع

AppVeyor: Redefine set of build environments

bel2125 7 سال پیش
والد
کامیت
70a94700f9
2فایلهای تغییر یافته به همراه121 افزوده شده و 49 حذف شده
  1. 13 6
      CMakeLists.txt
  2. 108 43
      appveyor.yml

+ 13 - 6
CMakeLists.txt

@@ -275,19 +275,26 @@ if ("${CIVETWEB_C_STANDARD}" STREQUAL "auto")
 else()
   add_c_compiler_flag(-std=${CIVETWEB_C_STANDARD})
 endif()
+
+#Warnings: enable everything
 add_c_compiler_flag(-Wall)
 add_c_compiler_flag(-Wextra)
 add_c_compiler_flag(-Wshadow)
 add_c_compiler_flag(-Wconversion)
 add_c_compiler_flag(-Wmissing-prototypes)
 add_c_compiler_flag(-Weverything)
-add_c_compiler_flag(/W4)
-add_c_compiler_flag(-Wno-padded)
-add_c_compiler_flag(/Wd4820) # padding
-add_c_compiler_flag(-Wno-unused-macros)
-add_c_compiler_flag(-Wno-format-nonliteral)
-add_c_compiler_flag(-Wno-date-time)
 add_c_compiler_flag(-Wparentheses)
+add_c_compiler_flag(/W4) # VisualStudio highest warning level
+
+#Warnings: Disable some warnings
+add_c_compiler_flag(-Wno-padded) # padding in structures by compiler
+add_c_compiler_flag(-Wno-unused-macros) # so what?
+add_c_compiler_flag(-Wno-reserved-id-macros) # for system headers
+add_c_compiler_flag(-Wno-format-nonliteral) # printf(myFormatStringVar, ...)
+add_c_compiler_flag(-Wno-date-time) # using __DATE__ once
+add_c_compiler_flag(-Wno-cast-qual) # const cast
+add_c_compiler_flag(/Wd4820) # padding
+
 if (MINGW)
   add_c_compiler_flag(-Wno-format)
 endif()

+ 108 - 43
appveyor.yml

@@ -5,11 +5,6 @@ build:
 # no automatic build in script mode
 
 
-platform:
-  - x86
-  - x64
-
-
 skip_commits:
   # Builds just testing something on Travis CI don't need to be 
   # done on AppVeyor
@@ -27,47 +22,100 @@ environment:
   c_standard: auto
   cxx_standard: auto
   matrix:
-    - id: 1
-      compiler: msvc-18-seh
+    # Use default values
+    - id: Default-x86
+      compiler: msvc-19-seh
       build_shared: NO
       no_files: NO
       enable_ipv6: NO
       enable_ssl: YES
-      enable_websockets: YES
+      enable_websockets: NO
       no_cgi: NO
       no_caching: NO
       configuration: Release
-    - id: 2
-      compiler: msvc-18-seh
-      build_shared: YES
+      platform: x86
+    - id: Default-x64
+      compiler: msvc-19-seh
+      build_shared: NO
       no_files: NO
       enable_ipv6: NO
       enable_ssl: YES
+      enable_websockets: NO
+      no_cgi: NO
+      no_caching: NO
+      configuration: Release
+      platform: x64
+    # Use default values
+    - id: Full-x86
+      compiler: msvc-19-seh
+      build_shared: NO
+      no_files: NO
+      enable_ipv6: YES
+      enable_ssl: YES
       enable_websockets: YES
       no_cgi: NO
       no_caching: NO
       configuration: Release
-    - id: 3
-      compiler: msvc-18-seh
-      build_shared: YES
-      no_files: YES
-      enable_ipv6: NO
+      platform: x86
+    - id: Full-x64
+      compiler: msvc-19-seh
+      build_shared: NO
+      no_files: NO
+      enable_ipv6: YES
       enable_ssl: YES
       enable_websockets: YES
       no_cgi: NO
       no_caching: NO
       configuration: Release
-    - id: 4
-      compiler: gcc-5.1.0-posix
+      platform: x64
+    # Minimum settings
+    - id: Minimal-x86
+      compiler: msvc-19-seh
+      build_shared: NO
+      no_files: YES
+      enable_ipv6: NO
+      enable_ssl: NO
+      enable_websockets: NO
+      no_cgi: YES
+      no_caching: YeS
+      configuration: Release
+      platform: x86
+    - id: Minimal-x64
+      compiler: msvc-19-seh
       build_shared: NO
       no_files: YES
       enable_ipv6: NO
       enable_ssl: NO
       enable_websockets: NO
       no_cgi: YES
-      no_caching: YES
+      no_caching: YeS
       configuration: Release
-    - id: 5
+      platform: x64
+    # Test shared and debug build
+    - id: Shared-default-debug-x86
+      compiler: msvc-19-seh
+      build_shared: YES
+      no_files: NO
+      enable_ipv6: NO
+      enable_ssl: YES
+      enable_websockets: NO
+      no_cgi: NO
+      no_caching: NO
+      configuration: Debug
+      platform: x86
+    - id: Shared-default-debug-x64
+      compiler: msvc-19-seh
+      build_shared: YES
+      no_files: NO
+      enable_ipv6: NO
+      enable_ssl: YES
+      enable_websockets: NO
+      no_cgi: NO
+      no_caching: NO
+      configuration: Debug
+      platform: x64
+    # MinGW
+    - id: Full-GCC-x86
       compiler: gcc-5.1.0-posix
       build_shared: NO
       no_files: NO
@@ -75,39 +123,46 @@ environment:
       enable_ssl: YES
       enable_websockets: YES
       no_cgi: NO
-      no_caching: YES
+      no_caching: NO
       configuration: Release
-    - id: 6
+      platform: x86
+    - id: Full-GCC-x64
       compiler: gcc-5.1.0-posix
       build_shared: NO
       no_files: NO
-      enable_ipv6: NO
+      enable_ipv6: YES
       enable_ssl: YES
       enable_websockets: YES
       no_cgi: NO
-      no_caching: YES
+      no_caching: NO
       configuration: Release
-    - id: 7
-      compiler: gcc-5.1.0-posix
-      build_shared: YES
+      platform: x64
+    # Visual Studio 2010
+    - id: Full-VS2010-x86
+      compiler: msvc-16-seh
+      build_shared: NO
       no_files: NO
-      enable_ipv6: NO
+      enable_ipv6: YES
       enable_ssl: YES
       enable_websockets: YES
       no_cgi: NO
-      no_caching: YES
+      no_caching: NO
       configuration: Release
-    - id: 8
-      compiler: gcc-5.1.0-posix
-      build_shared: YES
-      no_files: YES
-      enable_ipv6: NO
+      platform: x86
+    # Visual Studio 2012
+    - id: Full-VS2012-x86
+      compiler: msvc-17-seh
+      build_shared: NO
+      no_files: NO
+      enable_ipv6: YES
       enable_ssl: YES
       enable_websockets: YES
       no_cgi: NO
-      no_caching: YES
+      no_caching: NO
       configuration: Release
-    - id: 9
+      platform: x86
+    # Visual Studio 2013
+    - id: Full-VS2013-x86
       compiler: msvc-18-seh
       build_shared: NO
       no_files: NO
@@ -116,9 +171,10 @@ environment:
       enable_websockets: YES
       no_cgi: NO
       no_caching: NO
-      configuration: Debug
-    - id: 10
-      compiler: msvc-16-seh
+      configuration: Release
+      platform: x86
+    - id: Full-VS2013-x64
+      compiler: msvc-18-seh
       build_shared: NO
       no_files: NO
       enable_ipv6: YES
@@ -127,8 +183,11 @@ environment:
       no_cgi: NO
       no_caching: NO
       configuration: Release
-    - id: 11
-      compiler: msvc-17-seh
+      platform: x64
+    # Visual Studio 2015 is default
+    # Visual Studio 2017 is not yet default
+    - id: Full-VS2017-x86
+      compiler: msvc-20-seh
       build_shared: NO
       no_files: NO
       enable_ipv6: YES
@@ -137,8 +196,10 @@ environment:
       no_cgi: NO
       no_caching: NO
       configuration: Release
-    - id: 12
-      compiler: msvc-19-seh
+      platform: x86
+      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+    - id: Full-VS2017-x64
+      compiler: msvc-20-seh
       build_shared: NO
       no_files: NO
       enable_ipv6: YES
@@ -147,6 +208,9 @@ environment:
       no_cgi: NO
       no_caching: NO
       configuration: Release
+      platform: x64
+      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+
 
 install:
   # Derive some extra information
@@ -205,6 +269,7 @@ before_build:
   - if "%compiler_version%"=="17" (set "vs_version=11" & set "vs_year=2012")
   - if "%compiler_version%"=="18" (set "vs_version=12" & set "vs_year=2013")
   - if "%compiler_version%"=="19" (set "vs_version=14" & set "vs_year=2015")
+  - if "%compiler_version%"=="20" (set "vs_version=15" & set "vs_year=2017")
   - if "%compiler_name%"=="msvc" (set "generator=Visual Studio %vs_version% %vs_year%")
   - if "%compiler_name%"=="msvc" (
       if "%platform%"=="x64" (