Skip to content

Commit

Permalink
adding commit to hashFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
glhewett committed Oct 19, 2023
1 parent 7690d25 commit c9d8cfd
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ jobs:
with:
submodules: recursive
fetch-depth: 0

# write the commit hash of vcpkg to a text file
- run: |
git -C vcpkg rev-parse HEAD > vcpkg-commit.txt
- name: Dependencies (Ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
Expand All @@ -63,7 +68,7 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/build/cache
key: VCPKG-BinaryCache-${{ runner.os }}-v1-${{ hashFiles('vcpkg.json', 'alternatives/openssl_3/vcpkg.json') }}
key: VCPKG-BinaryCache-${{ runner.os }}-v1-${{ hashFiles('vcpkg-commit.txt', 'vcpkg.json', 'alternatives/openssl_3/vcpkg.json') }}
restore-keys: |
VCPKG-BinaryCache-${{ runner.os }}-v1
VCPKG-BinaryCache-${{ runner.os }}
Expand Down Expand Up @@ -135,6 +140,10 @@ jobs:
submodules: recursive
fetch-depth: 0

# write the commit hash of vcpkg to a text file
- run: |
git -C vcpkg rev-parse HEAD > vcpkg-commit.txt
- name: Dependencies (macOs)
if: ${{ matrix.os == 'macos-latest' }}
run: |
Expand All @@ -151,7 +160,7 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/build/cache
key: VCPKG-BinaryCache-${{ runner.os }}-v1-${{ hashFiles('vcpkg.json', 'alternatives/openssl_3/vcpkg.json') }}
key: VCPKG-BinaryCache-${{ runner.os }}-v1-${{ hashFiles('vcpkg-commit.txt', 'vcpkg.json', 'alternatives/openssl_3/vcpkg.json') }}
restore-keys: |
VCPKG-BinaryCache-${{ runner.os }}-v1
VCPKG-BinaryCache-${{ runner.os }}
Expand Down Expand Up @@ -192,6 +201,10 @@ jobs:
submodules: recursive
fetch-depth: 0

# write the commit hash of vcpkg to a text file
- run: |
git -C vcpkg rev-parse HEAD > vcpkg-commit.txt
- name: dependencies
run: |
brew install llvm pkg-config
Expand All @@ -202,7 +215,7 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/build/cache
key: VCPKG-BinaryCache-${{ runner.os }}-v1-${{ hashFiles('vcpkg.json', 'alternatives/openssl_3/vcpkg.json') }}
key: VCPKG-BinaryCache-${{ runner.os }}-v1-${{ hashFiles('vcpkg-commit.txt', 'vcpkg.json', 'alternatives/openssl_3/vcpkg.json') }}
restore-keys: |
VCPKG-BinaryCache-${{ runner.os }}-v1
VCPKG-BinaryCache-${{ runner.os }}
Expand Down

0 comments on commit c9d8cfd

Please sign in to comment.