64
64
inputs :
65
65
filename : icu4c/source/samples/all/samplecheck.bat
66
66
arguments : ' $(arch) $(config)'
67
- # -------------------------------------------------------------------------
67
+ # -------------------------------------------------------------------------
68
+
69
+ # -------------------------------------------------------------------------
70
+ # Other C tests
71
+ # -------------------------------------------------------------------------
72
+
73
+ - job : ICU4C_Cygwin_GCC_x86_64_Release
74
+ displayName : ' C: Cygwin GCC x86_64 Release'
75
+ timeoutInMinutes : 50
76
+ pool :
77
+ vmImage : ' windows-2019'
78
+ variables :
79
+ ICU_CI_CACHE : c:\icu-ci-cache
80
+ CYG_URL : https://cygwin.com/setup-x86_64.exe
81
+ CYG_MIRROR : http://mirrors.kernel.org/sourceware/cygwin/
82
+ CYG_PACKAGES : automake,gcc-core,gcc-g++,make,pkg-config,perl,python3
83
+ CYG_ROOT : c:\cygwin-root
84
+ CYG_CACHE : ' $(ICU_CI_CACHE)\cygwin64-v3'
85
+ CYG_CACHED_SETUP : ' $(CYG_CACHE)\setup.exe'
86
+ CYG_VERSION_KEY : cygwin-3.2
87
+ steps :
88
+ # Use 'autocrlf input' since checked-in files may already be using CRLF.
89
+ - script : |
90
+ git config --global core.autocrlf input
91
+ displayName: 'Configure Git to checkout with Unix line endings (LF)'
92
+ - checkout : self
93
+ lfs : true
94
+ fetchDepth : 10
95
+ # Cache expires after 7 days of no activity.
96
+ - task : Cache@2
97
+ displayName : ' Restore Cygwin cache'
98
+ inputs :
99
+ # Use the contents of the file ".azure-pipelines-icu4c.yml" as part of the key, as that contains the list of CYG_PACKAGES.
100
+ # Also include the Cygwin version as part of the key. If we want to use a newer version of Cygwin, we can update CYG_VERSION_KEY.
101
+ # Note: CYG_VERSION_KEY may become out of sync with (older than) the version we actually use if we update this file
102
+ # without updating CYG_VERSION_KEY. Any updates to this file guarantees that we're using the latest version.
103
+ key : ' "$(CYG_VERSION_KEY)" | .ci-builds/.azure-pipelines-icu4c.yml'
104
+ path : " $(CYG_CACHE)"
105
+ - task : PowerShell@2
106
+ displayName : ' Download Cygwin setup'
107
+ inputs :
108
+ targetType : inline
109
+ script : |
110
+ if ( !(Test-Path "${env:CYG_CACHED_SETUP}" -NewerThan (Get-Date).AddDays(-7)) )
111
+ {
112
+ Write-Host "Cached Cygwin setup does not exist or is older than 7 days, downloading from external site."
113
+
114
+ New-Item -Force -Type Directory $env:CYG_CACHE
115
+ Write-Host "Downloading Cygwin setup..."
116
+
117
+ $start_time = Get-Date
118
+ (New-Object System.Net.WebClient).DownloadFile($env:CYG_URL, $env:CYG_CACHED_SETUP)
119
+
120
+ Write-Output "Download took: $((Get-Date).Subtract($start_time).Seconds) second(s)."
121
+ }
122
+ - script : |
123
+ %CYG_CACHED_SETUP% --no-verify --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%"
124
+ displayName: 'Install Cygwin'
125
+ - script : |
126
+ %CYG_ROOT%\\bin\\sh -lc 'echo Hello' && %CYG_ROOT%\\bin\\sh -lc 'uname -a'
127
+ displayName: 'Check Cygwin environment'
128
+ - script : |
129
+ %CYG_ROOT%\\bin\\bash -lc "cd $(cygpath \"$(Build.SourcesDirectory)\") && cd icu4c/source && ./runConfigureICU Cygwin && make tests -j -l2.5"
130
+ displayName: 'Build ICU (source and test)'
131
+ env:
132
+ CC: gcc
133
+ CXX: g++
134
+ - script : |
135
+ %CYG_ROOT%\\bin\\bash -lc "cd $(cygpath \"$(Build.SourcesDirectory)\") && cd icu4c/source && make -j -l2.5 check"
136
+ displayName: 'Run Tests'
137
+ env:
138
+ CC: gcc
139
+ CXX: g++
0 commit comments