| name: 'Cache for all OSes' |
| description: 'Needs to be called before any call to ext/.cmd|sh or cmake' |
| inputs: |
| use-rust: |
| description: 'Whether rust is used' |
| default: false |
| outputs: |
| ext-cache-hit: |
| value: ${{ steps.cache-ext.outputs.cache-hit }} |
| runs: |
| using: "composite" |
| steps: |
| - name: Cache all of cargo |
| if: ${{ inputs.use-rust == 'true' }} |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 |
| continue-on-error: true |
| with: |
| path: ~/.cargo |
| key: cargo-registry-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('CMakeLists.txt', 'cmake/Modules/Findrav1e.cmake', 'cmake/Modules/LocalRav1e.cmake', 'ext/rav1e.cmd') }}-${{ github.job }} |
| - name: Cache external dependencies in ext |
| id: cache-ext |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 |
| with: |
| path: ext |
| key: ext-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/workflows/*', 'ext/*.cmd', 'ext/*.sh') }}-${{ github.job }} |
| - name: Cache external dependencies in build/_deps |
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 |
| with: |
| path: build/_deps |
| key: deps-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/workflows/*', 'CMakeLists.txt', 'cmake/Modules/*') }}-${{ github.job }} |