4848 uses : actions/cache/restore@v3
4949 with :
5050 path : ${{ matrix.binary_cache }}
51- key : ${{ matrix.os }}
52- restore-keys : ${{ matrix.os }}
51+ key : ${{ matrix.os }}-${{ hashFiles('vcpkg.json') }}
52+ restore-keys : ${{ matrix.os }}-${{ hashFiles('vcpkg.json') }}
5353
5454 - name : Setup msbuild
5555 if : runner.os == 'Windows'
6161 - name : Install sccache
6262 uses : mozilla-actions/sccache-action@v0.0.9
6363
64- - name : Use sccache
65- shell : bash
66- run : |
67- echo "SCCACHE_GHA_ENABLED=ON" >> "$GITHUB_ENV"
68- echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> "$GITHUB_ENV"
69- echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> "$GITHUB_ENV"
70-
7164 - name : cl version
7265 if : runner.os == 'Windows'
7366 shell : cmd
8578 run : |
8679 brew install autoconf autoconf-archive automake libtool
8780
88- - name : Set vcpkg installtion root env
89- shell : bash
90- run : |
91- VCPKG_BASH_PATH=${VCPKG_INSTALLATION_ROOT//\\//}
92- echo "VCPKG_INSTALLATION_ROOT=$VCPKG_BASH_PATH" >> "$GITHUB_ENV"
93-
9481 - name : " Install dependencies"
95- run : >
96- vcpkg x-set-installed --triplet ${{ matrix.triplet }} --host-triplet ${{ matrix.triplet }}
97- boost-assign
98- boost-bimap
99- boost-chrono
100- boost-date-time
101- boost-filesystem
102- boost-format
103- boost-graph
104- boost-math
105- boost-program-options
106- boost-regex
107- boost-serialization
108- boost-system
109- boost-thread
110- boost-timer
111- tbb
112- pybind11
113- geographiclib
114- eigen3
115- ${{ matrix.additional_vcpkg_ports }}
82+ run : vcpkg install --triplet ${{ matrix.triplet }} --host-triplet ${{ matrix.triplet }}
11683
11784 - name : On Failure, upload vcpkg logs
11885 if : failure()
12592 - name : copy files for hash
12693 shell : bash
12794 run : |
128- echo $VCPKG_INSTALLATION_ROOT
12995 mkdir -p vcpkg-info
130- find $VCPKG_INSTALLATION_ROOT/installed / -type f -name 'vcpkg_abi_info.txt' | \
96+ find vcpkg_installed / -type f -name 'vcpkg_abi_info.txt' | \
13197 while read filepath; do
13298 triplet=$(echo "$filepath" | awk -F/ '{print $(NF-3)}')
13399 port=$(echo "$filepath" | awk -F/ '{print $(NF-1)}')
@@ -136,17 +102,17 @@ jobs:
136102
137103 - name : Save cache dependencies
138104 # Don't save if it's the exact same
139- if : steps.cache-restore.outputs.cache-matched-key != format('{0}-{1}', matrix.os, hashFiles('vcpkg-info/*'))
105+ if : steps.cache-restore.outputs.cache-matched-key != format('{0}-{1}-{2} ', matrix.os, hashFiles('vcpkg.json') , hashFiles('vcpkg-info/*'))
140106 uses : actions/cache/save@v4
141107 with :
142108 path : ${{ matrix.binary_cache }}
143- key : ${{ matrix.os }}-${{ hashFiles('vcpkg-info/*') }}
109+ key : ${{ matrix.os }}-${{ hashFiles('vcpkg.json') }}-${{ hashFiles('vcpkg -info/*') }}
144110
145111 - name : Install python packages
146112 shell : bash
147113 run : |
148- $VCPKG_INSTALLATION_ROOT/installed /${{ matrix.triplet }}/tools/python3/${{ matrix.python }} -m ensurepip --upgrade
149- $VCPKG_INSTALLATION_ROOT/installed /${{ matrix.triplet }}/tools/python3/${{ matrix.python }} -m pip install -r python/dev_requirements.txt
114+ vcpkg_installed /${{ matrix.triplet }}/tools/python3/${{ matrix.python }} -m ensurepip --upgrade
115+ vcpkg_installed /${{ matrix.triplet }}/tools/python3/${{ matrix.python }} -m pip install -r python/dev_requirements.txt
150116
151117 - name : Set Swap Space (Linux)
152118 if : runner.os == 'Linux'
@@ -162,7 +128,7 @@ jobs:
162128
163129 cmake . -B build -G Ninja \
164130 -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake \
165- -DVCPKG_INSTALLED_DIR=$VCPKG_INSTALLATION_ROOT/installed \
131+ -DVCPKG_INSTALLED_DIR=$RUNNER_WORKSPACE/vcpkg_installed \
166132 -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \
167133 -DVCPKG_HOST_TRIPLET=${{ matrix.triplet }} \
168134 -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
@@ -183,6 +149,10 @@ jobs:
183149 -DGTSAM_WITH_EIGEN_MKL_OPENMP=ON \
184150 -DCTEST_EXTRA_ARGS='${{ matrix.ctest_extra_flags }}' \
185151 -DPYTEST_EXTRA_ARGS='${{ matrix.pytest_extra_flags }}'
152+ env :
153+ SCCACHE_GHA_ENABLED : ON
154+ CMAKE_C_COMPILER_LAUNCHER : sccache
155+ CMAKE_CXX_COMPILER_LAUNCHER : sccache
186156
187157 - name : cmake build
188158 shell : bash
0 commit comments