@@ -76,27 +76,24 @@ jobs:
76
76
run : |
77
77
tar --xz -xf *-source.tar.xz --strip-components=1
78
78
79
- - name : Prepare cache key
80
- id : key
81
- shell : powershell
82
- run : |
83
- # Work around caching failure with GNU tar
84
- New-Item -Type Junction -Path vcpkg -Target c:\vcpkg
79
+ - name : Setup vcpkg caching
80
+ uses : actions/github-script@v7
81
+ with :
82
+ script : |
83
+ core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
84
+ core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
85
+ core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
85
86
86
- Write-Output "image=$env:ImageOS-$env:ImageVersion" >> $env:GITHUB_OUTPUT
87
+ - name : Install vcpkg
88
+ run : |
89
+ git clone https://github.com/microsoft/vcpkg
90
+ .\vcpkg\bootstrap-vcpkg.bat -disableMetrics
87
91
88
- - name : Enable vcpkg cache
89
- uses : actions/cache@v4
90
- with :
91
- path : vcpkg/installed
92
- key : ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-1 # Increase the number whenever dependencies are modified
93
- restore-keys : |
94
- ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}
95
92
96
93
- name : Prepare vcpkg
97
94
shell : bash
98
95
run : |
99
- vcpkg install --triplet=${{ matrix.arch }}-windows-static \
96
+ ./vcpkg/ vcpkg install --triplet=${{ matrix.arch }}-windows-static \
100
97
boost-bimap \
101
98
boost-date-time \
102
99
boost-foreach \
@@ -120,7 +117,7 @@ jobs:
120
117
cmake .. \
121
118
-GNinja \
122
119
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
123
- -DCMAKE_TOOLCHAIN_FILE="c: \vcpkg\scripts\buildsystems\vcpkg.cmake" \
120
+ -DCMAKE_TOOLCHAIN_FILE="${GITHUB_WORKSPACE} \vcpkg\scripts\buildsystems\vcpkg.cmake" \
124
121
-DCMAKE_BUILD_TYPE=Release \
125
122
# EOF
126
123
echo "::endgroup::"
0 commit comments