From f76f68aeaad638c0f8438a17f4ad2e34de239f5b Mon Sep 17 00:00:00 2001 From: Jeff Genovy <29107334+jefgen@users.noreply.github.com> Date: Fri, 26 Oct 2018 11:18:35 -0700 Subject: [PATCH] ICU-20221 Add support for building with Cygwin/GCC to the AppVeyor CI builds. --- .appveyor.yml | 65 +++++++++++++++++++++++++++++---- icu4c/source/config/mh-cygwin | 2 +- icu4c/source/config/mh-cygwin64 | 2 +- 3 files changed, 59 insertions(+), 10 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 56fbbe1c4fb..2d233b5aa37 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,8 +1,57 @@ -image: Visual Studio 2017 -platform: x64 -configuration: Release -build: - project: icu4c/source/allinone/allinone.sln - -test_script: - - icu4c/source/allinone/icucheck.bat x64 Release +# AppVeyor configuration for CI Builds of ICU4C. + +image: Visual Studio 2017 +platform: x64 + +# Don't clone the entire repo. +clone_depth: 3 + +# Cache the Cygwin downloaded setup packages between builds to speed things up. +cache: + - c:\cygwin-setup-cache + +environment: + CYG_URL: https://cygwin.com/setup-x86_64.exe + CYG_MIRROR: http://cygwin.mirror.constant.com + CYG_PACKAGES: automake,gcc-core,gcc-g++,make,pkg-config,perl,python3-devel + CYG_ROOT: c:\cygwin-root + CYG_CACHE: c:\cygwin-setup-cache + + matrix: + - BUILDSYSTEM: VS2017 + configuration: Release + APPVEYOR_CACHE_SKIP_RESTORE: true + APPVEYOR_CACHE_SKIP_SAVE: true + + - BUILDSYSTEM: cygwin64-gcc + CC: gcc + CXX: g++ + +for: + - + matrix: + only: + - BUILDSYSTEM: cygwin64-gcc + + install: + - ps: Invoke-WebRequest $env:CYG_URL -OutFile c:\cygwin-setup.exe + - c:\cygwin-setup.exe --quiet-mode --no-shortcuts --no-startmenu --no-desktop --upgrade-also --only-site --site "%CYG_MIRROR%" --root "%CYG_ROOT%" --local-package-dir "%CYG_CACHE%" --packages "%CYG_PACKAGES%" + + # Check that we have a working Cygwin environment before building. + before_build: + - "%CYG_ROOT%\\bin\\sh -lc 'echo Hello'" + - "%CYG_ROOT%\\bin\\sh -lc 'uname -a'" + + build_script: + - '%CYG_ROOT%\\bin\\bash -lc "cd $(cygpath ${APPVEYOR_BUILD_FOLDER}) && cd icu4c/source && ./runConfigureICU Cygwin && make check"' + + - + matrix: + only: + - BUILDSYSTEM: VS2017 + + build: + project: icu4c/source/allinone/allinone.sln + + test_script: + - icu4c/source/allinone/icucheck.bat x64 Release diff --git a/icu4c/source/config/mh-cygwin b/icu4c/source/config/mh-cygwin index c5a37179cab..efba5511dd7 100644 --- a/icu4c/source/config/mh-cygwin +++ b/icu4c/source/config/mh-cygwin @@ -7,7 +7,7 @@ ## Commands to generate dependency files GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) -GEN_DEPS.cc= $(CXX) -E -MM -std=c++11 $(DEFS) $(CPPFLAGS) +GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS) ## Flags to create/use a static library ifneq ($(ENABLE_SHARED),YES) diff --git a/icu4c/source/config/mh-cygwin64 b/icu4c/source/config/mh-cygwin64 index dc9d1a1ab01..6be8db77026 100644 --- a/icu4c/source/config/mh-cygwin64 +++ b/icu4c/source/config/mh-cygwin64 @@ -7,7 +7,7 @@ ## Commands to generate dependency files GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) -GEN_DEPS.cc= $(CXX) -E -MM -std=c++11 $(DEFS) $(CPPFLAGS) +GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS) ## Flags to create/use a static library ifneq ($(ENABLE_SHARED),YES) -- 2.40.0