Skip to content

Commit

Permalink
workflows: windows: Implement cache mechanism for source packages of …
Browse files Browse the repository at this point in the history
…vcpkg (fluent#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]>
  • Loading branch information
cosmo0920 authored and Victor Cabezas committed Aug 7, 2023
1 parent 978c1ef commit beae237
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/call-build-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,27 @@ jobs:
with:
arch: ${{ matrix.config.arch }}

- name: Get gzip command w/ chocolatey
uses: crazy-max/ghaction-chocolatey@v2
with:
args: install gzip -y

# http://man7.org/linux/man-pages/man1/date.1.html
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
shell: bash

- name: Restore cached packages of vcpkg
id: cache-vcpkg-sources
uses: actions/cache/restore@v3
with:
path: |
C:\vcpkg\packages
key: ${{ runner.os }}-${{ matrix.config.arch }}-vcpkg
enableCrossOsArchive: false

- name: Build openssl with vcpkg
run: |
C:\vcpkg\vcpkg install --recurse openssl --triplet ${{ matrix.config.vcpkg_triplet }}
Expand All @@ -122,6 +143,15 @@ jobs:
C:\vcpkg\vcpkg install --recurse libyaml --triplet ${{ matrix.config.vcpkg_triplet }}
shell: cmd

- name: Save packages of vcpkg
id: save-vcpkg-sources
uses: actions/cache/save@v3
with:
path: |
C:\vcpkg\packages
key: ${{ steps.cache-vcpkg-sources.outputs.cache-primary-key }}-${{ steps.get-date.outputs.date }}
enableCrossOsArchive: false

- name: Build Fluent Bit packages
# If we are using 2.0.* or earlier we need to exclude the ARM64 build as the dependencies fail to compile.
# Trying to do via an exclude for the job triggers linting errors.
Expand Down

0 comments on commit beae237

Please sign in to comment.