|
1 | 1 | version: 2.1 |
2 | 2 |
|
3 | 3 | orbs: |
4 | | - win: circleci/windows@2.4.0 |
| 4 | + win: circleci/windows@5.0.0 |
5 | 5 |
|
6 | 6 | commands: |
7 | 7 | install-cmake-on-macos: |
@@ -45,6 +45,38 @@ commands: |
45 | 45 | echo "export LZ4_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/lz4" >> $BASH_ENV |
46 | 46 | echo "export ZSTD_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/zstd" >> $BASH_ENV |
47 | 47 |
|
| 48 | + windows-build-steps: |
| 49 | + steps: |
| 50 | + - checkout |
| 51 | + - run: |
| 52 | + name: "Install thirdparty dependencies" |
| 53 | + command: | |
| 54 | + echo "Installing CMake..." |
| 55 | + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y |
| 56 | + mkdir $Env:THIRDPARTY_HOME |
| 57 | + cd $Env:THIRDPARTY_HOME |
| 58 | + echo "Building Snappy dependency..." |
| 59 | + curl https://github.com/google/snappy/archive/refs/tags/1.1.8.zip -O snappy-1.1.8.zip |
| 60 | + unzip -q snappy-1.1.8.zip |
| 61 | + cd snappy-1.1.8 |
| 62 | + mkdir build |
| 63 | + cd build |
| 64 | + & $Env:CMAKE_BIN -G "$Env:CMAKE_GENERATOR" .. |
| 65 | + msbuild.exe Snappy.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64 |
| 66 | + - run: |
| 67 | + name: "Build RocksDB" |
| 68 | + command: | |
| 69 | + mkdir build |
| 70 | + cd build |
| 71 | + & $Env:CMAKE_BIN -G "$Env:CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=Debug -DOPTDBG=1 -DPORTABLE=1 -DSNAPPY=1 -DJNI=1 .. |
| 72 | + cd .. |
| 73 | + echo "Building with VS version: $Env:CMAKE_GENERATOR" |
| 74 | + msbuild.exe build/rocksdb.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64 |
| 75 | + - run: |
| 76 | + name: "Test RocksDB" |
| 77 | + shell: powershell.exe |
| 78 | + command: | |
| 79 | + build_tools\run_ci_db_test.ps1 -SuiteRun arena_test,db_basic_test,db_test,db_test2,db_merge_operand_test,bloom_test,c_test,coding_test,crc32c_test,dynamic_bloom_test,env_basic_test,env_test,hash_test,random_test -Concurrency 16 |
48 | 80 | pre-steps-macos: |
49 | 81 | steps: |
50 | 82 | - pre-steps |
@@ -154,11 +186,6 @@ commands: |
154 | 186 | true |
155 | 187 |
|
156 | 188 | executors: |
157 | | - windows-2xlarge: |
158 | | - machine: |
159 | | - image: 'windows-server-2019-vs2019:stable' |
160 | | - resource_class: windows.2xlarge |
161 | | - shell: bash.exe |
162 | 189 | linux-docker: |
163 | 190 | docker: |
164 | 191 | # The image configuration is build_tools/ubuntu20_image/Dockerfile |
@@ -518,73 +545,35 @@ jobs: |
518 | 545 | no_output_timeout: 100m |
519 | 546 | - post-steps |
520 | 547 |
|
521 | | - build-windows: |
522 | | - executor: windows-2xlarge |
523 | | - parameters: |
524 | | - extra_cmake_opt: |
525 | | - default: "" |
526 | | - type: string |
527 | | - vs_year: |
528 | | - default: "2019" |
529 | | - type: string |
530 | | - cmake_generator: |
531 | | - default: "Visual Studio 16 2019" |
532 | | - type: string |
| 548 | + build-windows-vs2022: |
| 549 | + executor: |
| 550 | + name: win/server-2022 |
| 551 | + size: 2xlarge |
| 552 | + environment: |
| 553 | + THIRDPARTY_HOME: C:/Users/circleci/thirdparty |
| 554 | + CMAKE_HOME: C:/Program Files/CMake |
| 555 | + CMAKE_BIN: C:/Program Files/CMake/bin/cmake.exe |
| 556 | + SNAPPY_HOME: C:/Users/circleci/thirdparty/snappy-1.1.8 |
| 557 | + SNAPPY_INCLUDE: C:/Users/circleci/thirdparty/snappy-1.1.8;C:/Users/circleci/thirdparty/snappy-1.1.8/build |
| 558 | + SNAPPY_LIB_DEBUG: C:/Users/circleci/thirdparty/snappy-1.1.8/build/Debug/snappy.lib |
| 559 | + CMAKE_GENERATOR: Visual Studio 17 2022 |
| 560 | + steps: |
| 561 | + - windows-build-steps |
| 562 | + |
| 563 | + build-windows-vs2019: |
| 564 | + executor: |
| 565 | + name: win/server-2019 |
| 566 | + size: 2xlarge |
533 | 567 | environment: |
534 | 568 | THIRDPARTY_HOME: C:/Users/circleci/thirdparty |
535 | | - CMAKE_HOME: C:/Users/circleci/thirdparty/cmake-3.16.4-win64-x64 |
536 | | - CMAKE_BIN: C:/Users/circleci/thirdparty/cmake-3.16.4-win64-x64/bin/cmake.exe |
537 | | - SNAPPY_HOME: C:/Users/circleci/thirdparty/snappy-1.1.7 |
538 | | - SNAPPY_INCLUDE: C:/Users/circleci/thirdparty/snappy-1.1.7;C:/Users/circleci/thirdparty/snappy-1.1.7/build |
539 | | - SNAPPY_LIB_DEBUG: C:/Users/circleci/thirdparty/snappy-1.1.7/build/Debug/snappy.lib |
540 | | - VS_YEAR: <<parameters.vs_year>> |
541 | | - CMAKE_GENERATOR: <<parameters.cmake_generator>> |
| 569 | + CMAKE_HOME: C:/Program Files/CMake |
| 570 | + CMAKE_BIN: C:/Program Files/CMake/bin/cmake.exe |
| 571 | + SNAPPY_HOME: C:/Users/circleci/thirdparty/snappy-1.1.8 |
| 572 | + SNAPPY_INCLUDE: C:/Users/circleci/thirdparty/snappy-1.1.8;C:/Users/circleci/thirdparty/snappy-1.1.8/build |
| 573 | + SNAPPY_LIB_DEBUG: C:/Users/circleci/thirdparty/snappy-1.1.8/build/Debug/snappy.lib |
| 574 | + CMAKE_GENERATOR: Visual Studio 16 2019 |
542 | 575 | steps: |
543 | | - - checkout |
544 | | - - run: |
545 | | - name: "Setup VS" |
546 | | - command: | |
547 | | - if [[ "${VS_YEAR}" == "2019" ]]; then |
548 | | - echo "VS2019 already present." |
549 | | - elif [[ "${VS_YEAR}" == "2017" ]]; then |
550 | | - echo "Installing VS2017..." |
551 | | - powershell .circleci/vs2017_install.ps1 |
552 | | - elif [[ "${VS_YEAR}" == "2015" ]]; then |
553 | | - echo "Installing VS2015..." |
554 | | - powershell .circleci/vs2015_install.ps1 |
555 | | - fi |
556 | | - - store_artifacts: |
557 | | - path: \Users\circleci\AppData\Local\Temp\vslogs.zip |
558 | | - - run: |
559 | | - name: "Install thirdparty dependencies" |
560 | | - command: | |
561 | | - mkdir ${THIRDPARTY_HOME} |
562 | | - cd ${THIRDPARTY_HOME} |
563 | | - echo "Installing CMake..." |
564 | | - curl --fail --silent --show-error --output cmake-3.16.4-win64-x64.zip --location https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4-win64-x64.zip |
565 | | - unzip -q cmake-3.16.4-win64-x64.zip |
566 | | - echo "Building Snappy dependency..." |
567 | | - curl --fail --silent --show-error --output snappy-1.1.7.zip --location https://github.com/google/snappy/archive/1.1.7.zip |
568 | | - unzip -q snappy-1.1.7.zip |
569 | | - cd snappy-1.1.7 |
570 | | - mkdir build |
571 | | - cd build |
572 | | - ${CMAKE_BIN} -G "${CMAKE_GENERATOR}" .. |
573 | | - msbuild.exe Snappy.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64 |
574 | | - - run: |
575 | | - name: "Build RocksDB" |
576 | | - command: | |
577 | | - mkdir build |
578 | | - cd build |
579 | | - ${CMAKE_BIN} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_TYPE=Debug -DOPTDBG=1 -DPORTABLE=1 -DSNAPPY=1 -DJNI=1 << parameters.extra_cmake_opt >> .. |
580 | | - cd .. |
581 | | - echo "Building with VS version: ${CMAKE_GENERATOR}" |
582 | | - msbuild.exe build/rocksdb.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64 |
583 | | - - run: |
584 | | - name: "Test RocksDB" |
585 | | - shell: powershell.exe |
586 | | - command: | |
587 | | - build_tools\run_ci_db_test.ps1 -SuiteRun db_basic_test,db_test,db_test2,db_merge_operand_test,bloom_test,c_test,coding_test,crc32c_test,dynamic_bloom_test,env_basic_test,env_test,hash_test,random_test -Concurrency 16 |
| 576 | + - windows-build-steps |
588 | 577 |
|
589 | 578 | build-linux-java: |
590 | 579 | executor: linux-docker |
@@ -859,15 +848,8 @@ workflows: |
859 | 848 | - build-linux-mini-crashtest |
860 | 849 | jobs-windows: |
861 | 850 | jobs: |
862 | | - - build-windows: |
863 | | - name: "build-windows-vs2019" |
864 | | - - build-windows: |
865 | | - name: "build-windows-vs2019-cxx20" |
866 | | - extra_cmake_opt: -DCMAKE_CXX_STANDARD=20 |
867 | | - - build-windows: |
868 | | - name: "build-windows-vs2017" |
869 | | - vs_year: "2017" |
870 | | - cmake_generator: "Visual Studio 15 Win64" |
| 851 | + - build-windows-vs2022 |
| 852 | + - build-windows-vs2019 |
871 | 853 | - build-cmake-mingw |
872 | 854 | jobs-java: |
873 | 855 | jobs: |
|
0 commit comments