File: action.yml

package info (click to toggle)
libavif 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 21,488 kB
  • sloc: ansic: 30,721; cpp: 14,588; xml: 1,507; sh: 1,258; java: 307; makefile: 51
file content (72 lines) | stat: -rw-r--r-- 2,983 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: "Cache for all OSes"
description: "Needs to be called before any call to ext/.cmd|sh or cmake"
inputs:
  extra-key:
    description: "Extra cache key to use in the cache name. Useful when several caches are used in one workflow."
    default: ""
  use-meson:
    description: "Whether meson is used"
    default: false
  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: Find workflow path
      env:
        WORKFLOW_REF: ${{ github.workflow_ref }}
      id: workflow-info
      run: |
        # Remove repository path.
        END=(${WORKFLOW_REF/*.github/.github})
        # Remove branch reference starting with @.
        MIDDLE=(${END/%@*/})
        echo "Current workflow path is: ${MIDDLE}"
        echo "path=${MIDDLE}" >> "$GITHUB_OUTPUT"
      shell: bash
    - name: Generate meson cache key
      if: ${{ inputs.use-meson == 'true' }}
      run: |
        echo "MESON_KEY=meson-`meson --version`" >> $GITHUB_ENV
      shell: bash
    - name: Generate empty meson cache key
      if: ${{ inputs.use-meson != 'true' }}
      run: |
        echo "MESON_KEY=meson-none" >> $GITHUB_ENV
      shell: bash
    - name: Generate cargo cache key
      if: ${{ inputs.use-rust == 'true' }}
      run: |
        echo "CARGO_KEY=cargo-`cargo --version|cut -d' ' -f2`-${{ hashFiles('.github/actions/setup-common/action.yml', steps.workflow-info.outputs.path, 'cmake/Modules/Findrav1e.cmake', 'cmake/Modules/LocalRav1e.cmake', 'ext/rav1e.cmd') }}" >> $GITHUB_ENV
      shell: bash
    - name: Generate empty cargo cache key
      if: ${{ inputs.use-rust != 'true' }}
      run: |
        echo "CARGO_KEY=cargo-none" >> $GITHUB_ENV
      shell: bash
    - name: Cache all of cargo
      if: ${{ inputs.use-rust == 'true' }}
      uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
      continue-on-error: true
      with:
        path: |
          ~/.cargo
          build/cargo
          cargo*
          corrosion
        key: ${{ env.CARGO_KEY }}-${{ runner.os }}-${{ runner.arch }}
    - name: Cache external dependencies in ext
      id: cache-ext
      uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
      with:
        path: ext
        key: ext-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ inputs.extra-key }}-${{ env.CARGO_KEY }}-${{ env.MESON_KEY }}-${{ hashFiles('.github/actions/**/*', steps.workflow-info.outputs.path, 'ext/*.cmd', 'ext/*.sh') }}
    - name: Cache external dependencies in build/_deps
      uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
      with:
        path: build/_deps
        key: deps-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ inputs.extra-key }}-${{ env.CARGO_KEY }}-${{ env.MESON_KEY }}-${{ hashFiles('.github/actions/**/*', steps.workflow-info.outputs.path, 'CMakeLists.txt', 'cmake/Modules/*') }}