Skip to content

Commit

Permalink
Only save cache on main
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbvll authored Oct 23, 2023
1 parent ff5e347 commit 6711712
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
- name: Bootstrap
uses: ./.github/actions/bootstrap

- name: Cache SDK build
uses: actions/cache@v3
- name: Cache restore SDK build
uses: actions/cache/restore@v3
with:
path: build/
key: ${{ runner.os }}-sdk-build

- name: Cache example build
uses: actions/cache@v3
- name: Cache restore example build
uses: actions/cache/restore@v3
with:
path: examples/quickstart-cpp/build/
key: ${{ runner.os }}-example-build
Expand Down Expand Up @@ -76,3 +76,16 @@ jobs:
else echo "Training had an issue" && exit 1;
fi
- name: Cache save SDK build
uses: actions/cache/save@v3
if: github.ref_name == 'main'
with:
path: build/
key: ${{ runner.os }}-sdk-build

- name: Cache save example build
uses: actions/cache/save@v3
if: github.ref_name == 'main'
with:
path: examples/quickstart-cpp/build/
key: ${{ runner.os }}-example-build

0 comments on commit 6711712

Please sign in to comment.