| name: "Common setup for all OSes" | |
| description: "Installs common dependencies" | |
| 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" | |
| codec-svt: | |
| description: "Can take the values: OFF, LOCAL, SYSTEM" | |
| default: "OFF" | |
| oldest-cmake: | |
| description: "Can take the values: true, false. Only useful on Linux to force using the minimum required CMake" | |
| default: "false" | |
| runs: | |
| using: "composite" | |
| steps: | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.x" | |
| - name: Set up latest CMake | |
| if: ${{ runner.os != 'Linux' || inputs.oldest-cmake != 'true' }} | |
| uses: jwlawson/actions-setup-cmake@0d6a7d60b009d01c9e7523be22153ff8f19460d3 # v2.2.0 | |
| with: | |
| cmake-version: "latest" | |
| - name: Set up CMake 3.22 | |
| if: ${{ runner.os == 'Linux' && inputs.oldest-cmake == 'true' }} | |
| uses: jwlawson/actions-setup-cmake@0d6a7d60b009d01c9e7523be22153ff8f19460d3 # v2.2.0 | |
| with: | |
| # Use the minimum required version of cmake. | |
| cmake-version: "3.22.x" | |
| - name: Print CMake version | |
| run: cmake --version | |
| shell: bash | |
| - name: Set up rust | |
| if: ${{ inputs.codec-rav1e == 'LOCAL' }} | |
| uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 | |
| with: | |
| toolchain: stable | |
| - name: Set up cargo-c | |
| if: ${{ inputs.codec-rav1e == 'LOCAL' }} | |
| run: cargo install cargo-c --features=vendored-openssl | |
| shell: pwsh |