Skip to content

Commit

Permalink
workflow: fix cache restore across branches
Browse files Browse the repository at this point in the history
  • Loading branch information
clementperon committed Jul 21, 2024
1 parent 8841a3d commit 55ac394
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ jobs:
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ matrix.image }}-ccache
key: ${{ matrix.image }}-ccache-${{ github.run_id }}
restore-keys: |
${{ matrix.image }}-ccache
- name: Configure PcapPlusPlus
run: cmake -DLIGHT_PCAPNG_ZSTD=${{ matrix.config-zstd }} -DPCAPPP_BUILD_COVERAGE=ON ${{ matrix.additional-flags }} -S . -B "$BUILD_DIR"
Expand Down Expand Up @@ -173,7 +175,9 @@ jobs:
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ matrix.image }}-ccache
key: ${{ matrix.image }}-ccache-${{ github.run_id }}
restore-keys: |
${{ matrix.image }}-ccache
- name: Configure PcapPlusPlus
run: cmake -DPCAPPP_USE_DPDK=ON ${{ matrix.additional-flags }} -S . -B "$BUILD_DIR"
Expand Down Expand Up @@ -231,7 +235,9 @@ jobs:
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ matrix.image }}-ccache
key: ${{ matrix.image }}-ccache-${{ github.run_id }}
restore-keys: |
${{ matrix.image }}-ccache
- name: Configure PcapPlusPlus
run: ${{ matrix.configure }}
Expand Down Expand Up @@ -317,7 +323,9 @@ jobs:
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ matrix.os-version }}-ccache
key: ${{ matrix.os-version }}-ccache-${{ github.run_id }}
restore-keys: |
${{ matrix.os-version }}-ccache
- name: Configure PcapPlusPlus
# Ensure user have access to network devices instead of giving super-user right
Expand Down Expand Up @@ -678,7 +686,9 @@ jobs:
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ matrix.image }}-ccache
key: ${{ matrix.image }}-ccache-${{ github.run_id }}
restore-keys: |
${{ matrix.image }}-ccache
- name: Configure PcapPlusPlus
run: cmake -DPCAPPP_USE_XDP=ON -DPCAPPP_BUILD_COVERAGE=ON -S . -B $BUILD_DIR
Expand Down Expand Up @@ -740,7 +750,9 @@ jobs:
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ matrix.engine }}-${{ matrix.sanitizer }}-ccache
key: ${{ matrix.engine }}-${{ matrix.sanitizer }}-ccache-${{ github.run_id }}
restore-keys: |
${{ matrix.engine }}-${{ matrix.sanitizer }}-ccache
- name: Compile PcapPlusPlus Fuzzer application
run: |
Expand Down

0 comments on commit 55ac394

Please sign in to comment.