diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 89c4a80223..9d6e0edbeb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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/always-upload-cache@v2.1.3 - 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/always-upload-cache@v2.1.3 with: @@ -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: @@ -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