Skip to content

Commit

Permalink
Skip caching of target_ws
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Apr 11, 2021
1 parent 8267854 commit b9ef678
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# The target directory cache doesn't include the source directory because
# that comes from the checkout. See "prepare target_ws for cache" task below
- name: Cache target_ws
uses: pat-s/[email protected]
with:
path: ${{ env.BASEDIR }}/target_ws
key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }}
restore-keys: |
target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}

- name: Cache ccache
uses: pat-s/[email protected]
with:
Expand All @@ -51,6 +43,7 @@ jobs:
restore-keys: |
ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
ccache-${{ env.CACHE_PREFIX }}
- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand All @@ -71,14 +64,10 @@ jobs:
if: ${{ always() && env.DOCKER_COMMIT }}
run: |
docker push ${{ env.DOCKER_COMMIT }} || true
- name: Upload test artifacts (on failure)
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
- name: Prepare target_ws for cache
if: ${{ always() && ! matrix.env.CCOV }}
run: |
sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete
sudo rm -rf ${{ env.BASEDIR }}/target_ws/src

0 comments on commit b9ef678

Please sign in to comment.