-
Notifications
You must be signed in to change notification settings - Fork 46
219 lines (202 loc) · 8.87 KB
/
nightly-windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
name: nightly-Windows
on:
workflow_dispatch:
inputs:
run_tests:
type: boolean
description: Enable/Disable test stage
default: true
schedule:
- cron: '0 2 * * *'
jobs:
nightly-Windows:
strategy:
fail-fast: false
matrix:
vc_boost:
- name: msvc-2019_boost_1730
image: 'windows-2019'
boost_url: 'https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.gz'
boost_archive_name: 'boost_1_73_0.tar.gz'
boost_folder_name: 'boost_1_73_0'
boost_include_folder: 'C:\Boost\include\boost-1_73'
- name: msvc-2019_boost_1800
image: 'windows-2019'
boost_url: 'https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.gz'
boost_archive_name: 'boost_1_80_0.tar.gz'
boost_folder_name: 'boost_1_80_0'
boost_include_folder: 'C:\Boost\include\boost-1_80'
- name: msvc-2022_boost_1780
image: 'windows-2022'
boost_url: 'https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz'
boost_archive_name: 'boost_1_78_0.tar.gz'
boost_folder_name: 'boost_1_78_0'
boost_include_folder: 'C:\Boost\include\boost-1_78'
- name: msvc-2022_boost_1800
image: 'windows-2022'
boost_url: 'https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.gz'
boost_archive_name: 'boost_1_80_0.tar.gz'
boost_folder_name: 'boost_1_80_0'
boost_include_folder: 'C:\Boost\include\boost-1_80'
- name: msvc-latest_boost_1800
image: 'windows-latest'
boost_url: 'https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.gz'
boost_archive_name: 'boost_1_80_0.tar.gz'
boost_folder_name: 'boost_1_80_0'
boost_include_folder: 'C:\Boost\include\boost-1_80'
arch:
- cmake: Win32
choco_options: '--forceX86 --x86 --version 1.1.1.2100 -y'
address_model: 32
- cmake: x64
choco_options: ''
address_model: 64
build_type:
- Debug
- Release
shared_libs:
- toggle: OFF
name: Static
- toggle: ON
name: Shared
with_openssl:
- toggle: OFF
name: 'noSSL'
- toggle: ON
name: 'SSL'
runs-on: ${{ matrix.vc_boost.image }}
env:
JOB_NAME: Windows_(${{ matrix.vc_boost.name }},${{ matrix.arch.address_model }},${{ matrix.build_type }},${{ matrix.shared_libs.name }}, ${{ matrix.with_openssl.name }})
name: >-
Windows
(${{ matrix.vc_boost.name }}, ${{ matrix.arch.address_model }}, ${{ matrix.build_type }}, ${{ matrix.shared_libs.name }}, ${{ matrix.with_openssl.name }})
steps:
- uses: actions/checkout@v2
- name: Download hazelcast-enterprise-tests.jar
shell: pwsh
run: |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest https://raw.githubusercontent.com/hazelcast/private-test-artifacts/data/certs.jar -Headers @{"Authorization"="token ${{ secrets.GH_TOKEN }}"} -OutFile hazelcast-enterprise-5.3.0-SNAPSHOT-tests.jar
- name: Install SysInternals
run: |
Invoke-WebRequest `
"https://download.sysinternals.com/files/SysinternalsSuite.zip" `
-OutFile "sys-internals.zip" `
-UserAgent "''"
Expand-Archive sys-internals.zip -DestinationPath sys-internals
ls sys-internals
- uses: nick-fields/retry@v2
name: Install OpenSSL
if: matrix.with_openssl.toggle == 'ON'
with:
timeout_minutes: 10
max_attempts : 4
retry_on: error
command: |
choco install openssl ${{ matrix.arch.choco_options }}
Invoke-WebRequest `
"https://curl.se/ca/cacert.pem" `
-OutFile "C:\cacert.pem"
- name: Cache Boost Version
id: cache-boost
uses: actions/cache@v3
with:
path: C:\Boost
key: ${{ matrix.vc_boost.name }}-${{ matrix.arch.address_model }}-${{ matrix.build_type }}
restore-keys: |
${{ matrix.vc_boost.name }}-${{ matrix.arch.address_model }}-${{ matrix.build_type }}
- if: ${{ steps.cache-boost.outputs.cache-hit != 'true' }}
name: Install Boost
run: |
Invoke-WebRequest `
"${{ matrix.vc_boost.boost_url }}" `
-OutFile "${{ matrix.vc_boost.boost_archive_name }}" `
-UserAgent "''"
tar xzf ${{ matrix.vc_boost.boost_archive_name }}
rm ${{ matrix.vc_boost.boost_archive_name }}
cd ${{ matrix.vc_boost.boost_folder_name }}
.\bootstrap.bat
.\b2 address-model=${{ matrix.arch.address_model }} --with-atomic --with-thread --with-chrono install
cd ..
Remove-Item ${{ matrix.vc_boost.boost_folder_name }} -Recurse -Force
- name: Cache Thrift Version
id: cache-thrift
uses: actions/cache@v3
with:
path: C:\Thrift
key: ${{ matrix.vc_boost.image }}-${{ matrix.arch.address_model }}-thrift-0.13-${{ matrix.build_type }}
restore-keys: |
${{ matrix.vc_boost.image }}-${{ matrix.arch.address_model }}-thrift-0.13-${{ matrix.build_type }}
- if: ${{ steps.cache-thrift.outputs.cache-hit != 'true' }}
name: Install Thrift
run: |
Invoke-WebRequest `
"https://archive.apache.org/dist/thrift/0.13.0/thrift-0.13.0.tar.gz" `
-OutFile "thrift-0.13.0.tar.gz"
tar xzf thrift-0.13.0.tar.gz
rm thrift-0.13.0.tar.gz
cd thrift-0.13.0\build
cmake .. -A ${{ matrix.arch.cmake }} `
-DBUILD_COMPILER=OFF -DBUILD_TESTING=OFF -DBUILD_TUTORIALS=OFF -DBUILD_LIBRARIES=ON `
-DBUILD_CPP=ON -DBUILD_AS3=OFF -DBUILD_C_GLIB=OFF -DBUILD_JAVA=OFF -DBUILD_PYTHON=OFF `
-DBUILD_HASKELL=OFF -DWITH_OPENSSL=OFF -DWITH_LIBEVENT=OFF -DWITH_ZLIB=OFF `
-DWITH_QT5=OFF -DBoost_INCLUDE_DIR=${{ matrix.vc_boost.boost_include_folder }} -DCMAKE_INSTALL_PREFIX=C:\Thrift
cmake --build . --target install --config ${{ matrix.build_type }}
mkdir C:\Thrift\bin
cd ../..
Remove-Item thrift-0.13.0 -Recurse -Force
- name: Build & Install
env:
BUILD_DIR: build
BUILD_CONFIGURATION: ${{ matrix.build_type }}
BIT_VERSION: ${{ matrix.arch.address_model }}
INSTALL: ON
CXXFLAGS: '/I C:\Thrift\include\'
run: |
.\scripts\build-windows.bat `
-DCMAKE_PREFIX_PATH="C:\Boost;C:\Thrift" `
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\destination `
-DBUILD_SHARED_LIBS=${{ matrix.shared_libs.toggle }} `
-DWITH_OPENSSL=${{ matrix.with_openssl.toggle }} `
-DBUILD_TESTS=ON `
-DBUILD_EXAMPLES=OFF
- name: Test
if: ${{ inputs.run_tests || github.event_name == 'schedule' }}
env:
BUILD_DIR: build
BUILD_CONFIGURATION: ${{ matrix.build_type }}
HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
HZ_TEST_AWS_INSTANCE_PRIVATE_IP: ${{ secrets.HZ_TEST_AWS_INSTANCE_PRIVATE_IP }}
SSL_CERT_FILE: 'C:\cacert.pem'
run: |
$dump = start-process -NoNewWindow sys-internals\procdump.exe {-accepteula -e -ma -w client_test.exe crash.dmp}
.\scripts\test-windows.bat
$dump | wait-process
- uses: actions/upload-artifact@v3
if: failure()
with:
name: dump-${{ env.JOB_NAME }}
path: |
**/*.pdb
*.dmp
- name: Verify Installation
run: |
cmake -S .\examples -B build-examples `
-A ${{ matrix.arch.cmake }} `
-DCMAKE_CONFIGURATION_TYPES=${{ matrix.build_type }} `
-DCMAKE_PREFIX_PATH="C:\Boost;${{ github.workspace }}\destination" `
-DWITH_OPENSSL=${{ matrix.with_openssl.toggle }}
cd build-examples
Get-ChildItem -Recurse *.vcxproj |
Where-Object {
$_.FullName -notmatch "CMakeFile|ZERO_CHECK|ALL_BUILD"
} |
ForEach-Object {
$_.Name.Replace('.vcxproj', '')
} |
ForEach-Object {
cmake --build . --config ${{ matrix.build_type }} --target $_
cmake --build . --config ${{ matrix.build_type }} --target clean
}