| 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' }} |