File: action.yml

package info (click to toggle)
libavif 1.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,956 kB
  • sloc: ansic: 29,303; cpp: 13,260; sh: 1,145; xml: 1,040; java: 307; makefile: 51
file content (78 lines) | stat: -rw-r--r-- 2,707 bytes parent folder | download
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
73
74
75
76
77
78
name: "Setup on Windows"
description: "Installs dependencies specific to Windows"
inputs:
  codec-aom:
    description: "Can take the values: OFF, LOCAL, SYSTEM"
    default: "OFF"
  codec-dav1d:
    description: "Can take the values: OFF, LOCAL, SYSTEM"
    default: "OFF"
  codec-rav1e:
    description: "Can take the values: OFF, LOCAL, SYSTEM"
    default: "OFF"
  extra-cache-key:
    description: "Extra cache key to use in the cache name. Useful when several caches are used in one workflow."
    default: ""
  libxml2:
    description: "Can take the values: OFF, LOCAL, SYSTEM"
    default: "OFF"
  libyuv:
    description: "Can take the values: OFF, LOCAL, SYSTEM"
    default: "OFF"
outputs:
  ext-cache-hit:
    value: ${{ steps.cache.outputs.ext-cache-hit }}
  vcpkg-cmake-config:
    value: ${{ steps.vcpkg.outputs.vcpkg-cmake-config }}
runs:
  using: "composite"
  steps:
    - name: Setup Developer Command Prompt for Microsoft Visual C++
      uses: ilammy/msvc-dev-cmd@v1
    - name: Set up meson
      if: ${{ inputs.codec-dav1d == 'LOCAL' }}
      run: pip install meson
      shell: bash

    - name: Install libaom library
      id: aom
      if: ${{ inputs.codec-aom == 'SYSTEM' }}
      run: echo "WIN_LIBRARIES=aom" >> "$GITHUB_OUTPUT"
      shell: bash
    - name: Install libdav1d library
      id: dav1d
      if: ${{ inputs.codec-dav1d == 'SYSTEM' }}
      run: echo "WIN_LIBRARIES=dav1d" >> "$GITHUB_OUTPUT"
      shell: bash
    - name: Install libxml2 library
      id: libxml2
      if: ${{ inputs.libxml2 == 'SYSTEM' }}
      run: echo "WIN_LIBRARIES=libxml2" >> "$GITHUB_OUTPUT"
      shell: bash
    - name: Install libyuv library
      id: libyuv
      if: ${{ inputs.libyuv == 'SYSTEM' }}
      run: echo "WIN_LIBRARIES=libyuv" >> "$GITHUB_OUTPUT"
      shell: bash

    - name: Install libraries
      uses: johnwason/vcpkg-action@v6
      id: vcpkg
      with:
        pkgs: libjpeg-turbo libpng zlib ${{ steps.aom.outputs.WIN_LIBRARIES }} ${{ steps.dav1d.outputs.WIN_LIBRARIES }} ${{ steps.libxml2.outputs.WIN_LIBRARIES }} ${{ steps.libyuv.outputs.WIN_LIBRARIES }}
        triplet: x64-windows-release
        token: ${{ github.token }}
        github-binarycache: true
        cache-key: ${{ hashFiles('cmake/Modules/*', 'ext/*.cmd', 'ext/*.sh') }}

    - uses: ./.github/actions/setup-common
      with:
        codec-aom: ${{ inputs.codec-aom }}
        codec-dav1d: ${{ inputs.codec-dav1d }}
        codec-rav1e: ${{ inputs.codec-rav1e }}
    - uses: ./.github/actions/cache
      id: cache
      with:
        extra-key: ${{ inputs.extra-cache-key }}
        use-meson: ${{ inputs.codec-dav1d == 'LOCAL' }}
        use-rust: ${{ inputs.codec-rav1e == 'LOCAL' }}