nightly-Windows #879
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |