|
| 1 | +name: Build Windows |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + |
| 6 | +jobs: |
| 7 | + build: |
| 8 | + runs-on: ${{ matrix.os }} |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + os: [windows-2022] |
| 12 | + architecture: ["x64"] |
| 13 | + |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v3 |
| 16 | + - uses: microsoft/setup-msbuild@v1.1 |
| 17 | + - name: Install Visual C++ 2010 |
| 18 | + run: | |
| 19 | + MsiExec.exe /passive '/X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}' |
| 20 | + MsiExec.exe /passive '/X{1D8E6291-B0D5-35EC-8441-6616F567A0F7}' |
| 21 | + choco install windows-sdk-7.1 -f -y --version 7.1.7600.20220204 |
| 22 | + choco install KB2519277 -f -y |
| 23 | + - name: Add VC2010 path |
| 24 | + # https://stackoverflow.com/questions/24775363/how-to-build-with-v90-platform-toolset-in-vs2012-without-vs2008-using-windows-s/25671529#25671529 |
| 25 | + run: echo "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
| 26 | + - name: Put ammintrin.h |
| 27 | + # https://stackoverflow.com/questions/30485525/missing-ammintrin-h-when-compiling-hadoop-on-windows |
| 28 | + # Usually VS2010 -> Windows7.1SDK -> VS2010SP1 -> KB2519277 installation, but skipping VS2010 might have issues... |
| 29 | + run: curl -L -o "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ammintrin.h" http://www.mathworks.com/matlabcentral/answers/uploaded_files/735/ammintrin.m |
| 30 | + - name: Install RapidJSON |
| 31 | + run: | |
| 32 | + git clone https://github.com/Tencent/rapidjson.git && mkdir rapidjson\build |
| 33 | + cd rapidjson\build |
| 34 | + # there are no stable version available |
| 35 | + # but take the last version without -targets.cmake |
| 36 | + git checkout 516d0473949fdcf0a6dc9fbb40fa92b3b85db184 |
| 37 | + cmake .. -G 'Visual Studio 17 2022' -A x64 -T Windows7.1SDK -DRAPIDJSON_HAS_STDSTRING=ON -DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF |
| 38 | + msbuild ALL_BUILD.vcxproj /p:Configuration=Release |
| 39 | + cd ..\.. |
| 40 | + - name: Install libzmq |
| 41 | + run: | |
| 42 | + git clone https://github.com/zeromq/libzmq.git && mkdir libzmq\build |
| 43 | + cd libzmq\build |
| 44 | + git checkout v4.3.5 |
| 45 | + cmake .. -G 'Visual Studio 17 2022' -A x64 -T Windows7.1SDK -DBUILD_TESTS=OFF |
| 46 | + msbuild ALL_BUILD.vcxproj /p:Configuration=Release |
| 47 | + cd ..\.. |
| 48 | + - name: Install |
| 49 | + run: | |
| 50 | + mkdir -p build |
| 51 | + cd build |
| 52 | + cmake .. -G 'Visual Studio 17 2022' -A x64 -T Windows7.1SDK -DCMAKE_CXX_STANDARD=11 "-DZeroMQ_DIR=${PWD}\..\libzmq\build" -DCMAKE_CONFIGURATION_TYPES=Release -DOPT_SAMPLES=OFF -DOPT_BUILD_TESTS=OFF |
| 53 | + msbuild ALL_BUILD.vcxproj /p:Configuration=Release |
| 54 | + cd .. |
0 commit comments