Skip to content

Commit e69d273

Browse files
committed
chore: optimize windows ci
1 parent e2cf82f commit e69d273

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ jobs:
7777
shell: bash
7878
run: ci/scripts/build_example.sh $(pwd)/example
7979
windows:
80-
name: AMD64 Windows 2022
81-
runs-on: windows-2022
80+
name: AMD64 Windows 2025
81+
runs-on: windows-2025
8282
timeout-minutes: 30
8383
strategy:
8484
fail-fast: false
@@ -89,11 +89,17 @@ jobs:
8989
shell: cmd
9090
run: |
9191
vcpkg install zlib:x64-windows nlohmann-json:x64-windows nanoarrow:x64-windows roaring:x64-windows cpr:x64-windows
92+
- name: Setup sccache
93+
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
94+
with:
95+
disable_annotations: true
96+
env:
97+
SCCACHE_GHA_ENABLED: "true"
9298
- name: Build Iceberg
9399
shell: cmd
94100
run: |
95101
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
96-
bash -c "ci/scripts/build_iceberg.sh $(pwd)"
102+
bash -c "ci/scripts/build_iceberg.sh $(pwd) OFF ON"
97103
- name: Build Example
98104
shell: cmd
99105
run: |

ci/scripts/build_iceberg.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ set -eux
2222
source_dir=${1}
2323
build_dir=${1}/build
2424
build_rest_integration_test=${2:-OFF}
25+
build_enable_sccache=${3:-OFF}
2526

2627
mkdir ${build_dir}
2728
pushd ${build_dir}
@@ -45,6 +46,11 @@ else
4546
CMAKE_ARGS+=("-DCMAKE_BUILD_TYPE=Debug")
4647
fi
4748

49+
if [[ "${build_enable_sccache}" == "ON" ]]; then
50+
CMAKE_ARGS+=("-DCMAKE_CXX_COMPILER_LAUNCHER=sccache")
51+
CMAKE_ARGS+=("-DCMAKE_C_COMPILER_LAUNCHER=sccache")
52+
fi
53+
4854
cmake "${CMAKE_ARGS[@]}" ${source_dir}
4955
if is_windows; then
5056
cmake --build . --config Release --target install

0 commit comments

Comments
 (0)