Skip to content

Commit

Permalink
ci: used shared cache for asan builds (#4313)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgerrits authored Dec 8, 2022
1 parent 23cfd7b commit 460aa3f
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true

env:
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg_binary_cache

jobs:
test_with_sanitizers:
strategy:
Expand All @@ -38,10 +41,15 @@ jobs:
if: ${{ startsWith(matrix.os, 'windows') }}
uses: ilammy/msvc-dev-cmd@v1
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@main
- run: echo "VCPKG_COMMIT=$(git rev-parse :ext_libs/vcpkg)" >> $GITHUB_ENV
shell: bash
- run: mkdir -p ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
- uses: actions/cache@v3
env:
cache-name: vcpkg-cache
with:
vcpkgDirectory: '${{ github.workspace }}/ext_libs/vcpkg'
vcpkgJsonGlob: "${{ github.workspace }}/vcpkg.json"
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}/*
key: ${{ matrix.os }}-build-${{ env.cache-name }}-${{ hashFiles('vcpkg.json') }}-${{ env.VCPKG_COMMIT }}"
- uses: lukka/run-cmake@v10
with:
cmakeListsTxtPath: "${{ github.workspace }}/CMakeLists.txt"
Expand Down Expand Up @@ -73,10 +81,15 @@ jobs:
with:
submodules: recursive
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@main
- run: echo "VCPKG_COMMIT=$(git rev-parse :ext_libs/vcpkg)" >> $GITHUB_ENV
shell: bash
- run: mkdir -p ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
- uses: actions/cache@v3
env:
cache-name: vcpkg-cache
with:
vcpkgDirectory: '${{ github.workspace }}/ext_libs/vcpkg'
vcpkgJsonGlob: "${{ github.workspace }}/vcpkg.json"
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}/*
key: ${{ matrix.os }}-build-${{ env.cache-name }}-${{ hashFiles('vcpkg.json') }}-${{ env.VCPKG_COMMIT }}"
- uses: lukka/run-cmake@v10
with:
cmakeListsTxtPath: "${{ github.workspace }}/CMakeLists.txt"
Expand Down

0 comments on commit 460aa3f

Please sign in to comment.