|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: C++ Windows MSVC Reusable |
| 19 | + |
| 20 | +on: |
| 21 | + workflow_call: |
| 22 | + inputs: |
| 23 | + arch: |
| 24 | + description: "The architecture to build for" |
| 25 | + required: true |
| 26 | + type: string |
| 27 | + os: |
| 28 | + description: "The runner label to run the job on" |
| 29 | + required: true |
| 30 | + type: string |
| 31 | + simd-level: |
| 32 | + description: "The Arrow SIMD level to build with" |
| 33 | + required: true |
| 34 | + type: string |
| 35 | + |
| 36 | +jobs: |
| 37 | + windows: |
| 38 | + runs-on: ${{ inputs.os }} |
| 39 | + timeout-minutes: 60 |
| 40 | + env: |
| 41 | + ARROW_BOOST_USE_SHARED: OFF |
| 42 | + ARROW_BUILD_BENCHMARKS: ON |
| 43 | + ARROW_BUILD_SHARED: ON |
| 44 | + ARROW_BUILD_STATIC: OFF |
| 45 | + ARROW_BUILD_TESTS: ON |
| 46 | + ARROW_DATASET: ON |
| 47 | + ARROW_FLIGHT: OFF |
| 48 | + ARROW_HDFS: ON |
| 49 | + ARROW_HOME: /usr |
| 50 | + ARROW_JEMALLOC: OFF |
| 51 | + ARROW_MIMALLOC: ON |
| 52 | + ARROW_ORC: ON |
| 53 | + ARROW_PARQUET: ON |
| 54 | + ARROW_SIMD_LEVEL: ${{ inputs.simd-level }} |
| 55 | + ARROW_SUBSTRAIT: ON |
| 56 | + ARROW_USE_GLOG: OFF |
| 57 | + ARROW_VERBOSE_THIRDPARTY_BUILD: OFF |
| 58 | + ARROW_WITH_BROTLI: OFF |
| 59 | + ARROW_WITH_BZ2: OFF |
| 60 | + ARROW_WITH_LZ4: OFF |
| 61 | + ARROW_WITH_OPENTELEMETRY: OFF |
| 62 | + ARROW_WITH_SNAPPY: ON |
| 63 | + ARROW_WITH_ZLIB: ON |
| 64 | + ARROW_WITH_ZSTD: ON |
| 65 | + BOOST_SOURCE: BUNDLED |
| 66 | + CMAKE_CXX_STANDARD: "17" |
| 67 | + CMAKE_GENERATOR: Ninja |
| 68 | + CMAKE_INSTALL_PREFIX: /usr |
| 69 | + CMAKE_UNITY_BUILD: ON |
| 70 | + steps: |
| 71 | + - name: Disable Crash Dialogs |
| 72 | + run: | |
| 73 | + reg add ` |
| 74 | + "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" ` |
| 75 | + /v DontShowUI ` |
| 76 | + /t REG_DWORD ` |
| 77 | + /d 1 ` |
| 78 | + /f |
| 79 | + - name: Checkout Arrow |
| 80 | + uses: actions/checkout@v5 |
| 81 | + with: |
| 82 | + fetch-depth: 0 |
| 83 | + submodules: recursive |
| 84 | + - name: Download Timezone Database |
| 85 | + shell: bash |
| 86 | + run: ci/scripts/download_tz_database.sh |
| 87 | + - name: Install msys2 (for tzdata for ORC tests) |
| 88 | + uses: msys2/setup-msys2@v2 |
| 89 | + id: setup-msys2 |
| 90 | + - name: Install cmake |
| 91 | + shell: bash |
| 92 | + run: | |
| 93 | + ci/scripts/install_cmake.sh 4.1.2 /usr |
| 94 | + - name: Install ccache |
| 95 | + shell: bash |
| 96 | + run: | |
| 97 | + ci/scripts/install_ccache.sh 4.12.1 /usr |
| 98 | + - name: Setup ccache |
| 99 | + shell: bash |
| 100 | + run: | |
| 101 | + ci/scripts/ccache_setup.sh |
| 102 | + - name: ccache info |
| 103 | + id: ccache-info |
| 104 | + shell: bash |
| 105 | + run: | |
| 106 | + echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT |
| 107 | + - name: Cache ccache |
| 108 | + uses: actions/cache@v4 |
| 109 | + with: |
| 110 | + path: ${{ steps.ccache-info.outputs.cache-dir }} |
| 111 | + key: cpp-ccache-windows-${{ inputs.arch }}-${{ hashFiles('cpp/**') }} |
| 112 | + restore-keys: cpp-ccache-windows-${{ inputs.arch }}- |
| 113 | + - name: Build |
| 114 | + shell: cmd |
| 115 | + run: | |
| 116 | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ inputs.arch }} |
| 117 | + bash -c "ci/scripts/cpp_build.sh $(pwd) $(pwd)/build" |
| 118 | + - name: Test |
| 119 | + shell: cmd |
| 120 | + run: | |
| 121 | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ inputs.arch }} |
| 122 | + # For ORC |
| 123 | + set TZDIR=${{ steps.setup-msys2.outputs.msys2-location }}\usr\share\zoneinfo |
| 124 | + bash -c "ci/scripts/cpp_test.sh $(pwd) $(pwd)/build" |
0 commit comments