@@ -21,11 +21,22 @@ jobs:
2121 - os : windows-latest
2222 triplet : x64-windows-release
2323 build_type : Release
24+ test_target : RUN_TESTS
25+ binary_cache : C:\Users\runneradmin\AppData\Local\vcpkg\archives
26+ vcpkg_path : C:/vcpkg/installed/vcpkg/info/*
27+
2428 steps :
2529 - uses : actions/checkout@v4
2630 with :
2731 submodules : true
2832
33+ - name : Restore cache dependencies
34+ uses : actions/cache/restore@v4
35+ with :
36+ path : ${{ matrix.binary_cache }}
37+ key : ${{ matrix.os }}
38+ restore-keys : ${{ matrix.os }}
39+
2940 - name : " Install dependencies"
3041 run : >
3142 vcpkg x-set-installed --triplet ${{ matrix.triplet }}
@@ -43,13 +54,33 @@ jobs:
4354 fcl
4455 pkgconf
4556
57+ - name : copy files for hash
58+ shell : bash
59+ run : |
60+ VCPKG_BASH_PATH=${VCPKG_INSTALLATION_ROOT//\\//}
61+ echo $VCPKG_BASH_PATH
62+ mkdir -p vcpkg-info
63+ find $VCPKG_BASH_PATH/installed/ -type f -name 'vcpkg_abi_info.txt' | \
64+ while read filepath; do
65+ triplet=$(echo "$filepath" | awk -F/ '{print $(NF-3)}')
66+ port=$(echo "$filepath" | awk -F/ '{print $(NF-1)}')
67+ cp "$filepath" "vcpkg-info/${triplet}_${port}.txt"
68+ done
69+
70+ - name : Save cache dependencies
71+ id : cache-save
72+ uses : actions/cache/save@v4
73+ with :
74+ path : ${{ matrix.binary_cache }}
75+ key : ${{ matrix.os }}-${{ hashFiles('vcpkg-info/*') }}
76+
4677 - name : cmake generate
4778 shell : bash
4879 run : >
4980 cmake -B build
5081 -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake
5182 -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
52- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
83+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
5384 -DOMPL_VERSIONED_INSTALL=OFF
5485 -DOMPL_BUILD_DEMOS=OFF
5586 -DOMPL_BUILD_PYBINDINGS=OFF
6495 - name : test
6596 shell : bash
6697 run : |
67- cmake --build build --config ${{ matrix.build_type }} --target RUN_TESTS
98+ cmake --build build --config ${{ matrix.build_type }} --target ${{ matrix.test_target }}
0 commit comments