Skip to content

Commit d729c1a

Browse files
authored
workflows: windows: Implement cache mechanism for source packages of vcpkg (#7773)
* workflows: windows: Introduce cache/restore mechanism for vcpkg sources Signed-off-by: Hiroshi Hatake <[email protected]> * workflows: windows: Use OS specific caches Signed-off-by: Hiroshi Hatake <[email protected]> * workflows: windows: Install gzip command to make caches Signed-off-by: Hiroshi Hatake <[email protected]> * workflows: windows: Use date based caches Signed-off-by: Hiroshi Hatake <[email protected]> --------- Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent dcecbef commit d729c1a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/call-build-windows.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,27 @@ jobs:
112112
with:
113113
arch: ${{ matrix.config.arch }}
114114

115+
- name: Get gzip command w/ chocolatey
116+
uses: crazy-max/ghaction-chocolatey@v2
117+
with:
118+
args: install gzip -y
119+
120+
# http://man7.org/linux/man-pages/man1/date.1.html
121+
- name: Get Date
122+
id: get-date
123+
run: |
124+
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
125+
shell: bash
126+
127+
- name: Restore cached packages of vcpkg
128+
id: cache-vcpkg-sources
129+
uses: actions/cache/restore@v3
130+
with:
131+
path: |
132+
C:\vcpkg\packages
133+
key: ${{ runner.os }}-${{ matrix.config.arch }}-vcpkg
134+
enableCrossOsArchive: false
135+
115136
- name: Build openssl with vcpkg
116137
run: |
117138
C:\vcpkg\vcpkg install --recurse openssl --triplet ${{ matrix.config.vcpkg_triplet }}
@@ -122,6 +143,15 @@ jobs:
122143
C:\vcpkg\vcpkg install --recurse libyaml --triplet ${{ matrix.config.vcpkg_triplet }}
123144
shell: cmd
124145

146+
- name: Save packages of vcpkg
147+
id: save-vcpkg-sources
148+
uses: actions/cache/save@v3
149+
with:
150+
path: |
151+
C:\vcpkg\packages
152+
key: ${{ steps.cache-vcpkg-sources.outputs.cache-primary-key }}-${{ steps.get-date.outputs.date }}
153+
enableCrossOsArchive: false
154+
125155
- name: Build Fluent Bit packages
126156
# If we are using 2.0.* or earlier we need to exclude the ARM64 build as the dependencies fail to compile.
127157
# Trying to do via an exclude for the job triggers linting errors.

0 commit comments

Comments
 (0)