-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
314 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: 'Cache setup ' | ||
description: 'Caches cargo and external dependencies.' | ||
inputs: | ||
codec-rav1e: | ||
description: 'Can take the values: OFF, LOCAL, SYSTEM' | ||
default: 'OFF' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Cache cargo registry | ||
if: ${{ inputs.codec-rav1e == 'LOCAL' }} | ||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | ||
continue-on-error: true | ||
with: | ||
path: ~/.cargo/registry/cache | ||
key: cargo-registry-${{ runner.os }}-${{ hashFiles('CMakeLists.txt', 'cmake/Modules/*', 'ext/*.cmd', 'ext/*.sh') }}-${{ github.job }} | ||
restore-keys: | | ||
cargo-registry-${{ runner.os }}-${{ hashFiles('CMakeLists.txt', 'cmake/Modules/*', 'ext/*.cmd', 'ext/*.sh') }}- | ||
cargo-registry-${{ runner.os }}- | ||
- name: Cache external dependencies | ||
id: cache-ext | ||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | ||
with: | ||
path: ext, build/_deps | ||
key: ext-${{ runner.os }}-${{ hashFiles('CMakeLists.txt', 'cmake/Modules/*', 'ext/*.cmd', 'ext/*.sh') }}-${{ github.job }} | ||
restore-keys: | | ||
ext-${{ runner.os }}-${{ hashFiles('CMakeLists.txt', 'cmake/Modules/*', 'ext/*.cmd', 'ext/*.sh') }}- | ||
ext-${{ runner.os }}- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: 'Setup for all OSes' | ||
description: 'Installs dependencies for all OSes' | ||
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' | ||
recent-cmake: | ||
description: 'Can take the values: true, false. Only useful on Linux' | ||
default: false | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | ||
with: | ||
python-version: '3.x' | ||
- name: Set up CMake < 3.18 | ||
if: ${{ runner.os == 'Linux' && !inputs.recent-cmake }} | ||
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2 | ||
with: | ||
cmake-version: '3.13.x' | ||
- name: Set up CMake >= 3.18 | ||
if: ${{ runner.os == 'Linux' && inputs.recent-cmake }} | ||
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2 | ||
with: | ||
cmake-version: '3.18.x' | ||
- name: Print CMake version | ||
run: cmake --version | ||
shell: bash | ||
- name: Set up ninja | ||
uses: seanmiddleditch/gha-setup-ninja@8b297075da4cd2a5f1fd21fe011b499edf06e9d2 # v4 | ||
|
||
- name: Set up nasm | ||
if: ${{ inputs.codec-aom == 'LOCAL' }} | ||
uses: ilammy/setup-nasm@13cbeb366c45c4379d3478cdcbadd8295feb5028 # v1.5.1 | ||
- name: Set up meson | ||
if: ${{ inputs.codec-dav1d == 'LOCAL' }} | ||
run: pip install meson | ||
shell: bash | ||
- name: Set up rust | ||
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 | ||
if: ${{ inputs.codec-rav1e == 'LOCAL' }} | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: 'Setup on Linux' | ||
description: 'Installs dependencies and sets up env variables' | ||
inputs: | ||
codec-aom: | ||
description: 'Can take the values: OFF, LOCAL, SYSTEM' | ||
default: 'OFF' | ||
codec-dav1d: | ||
description: 'Can take the values: OFF, LOCAL, SYSTEM' | ||
edfault: 'OFF' | ||
codec-rav1e: | ||
description: 'Can take the values: OFF, LOCAL, SYSTEM' | ||
default: 'OFF' | ||
gcc-version: | ||
description: 'Can be empty, in which case CC and CXX are not overriden' | ||
default: '' | ||
libxml2: | ||
default: 'OFF' | ||
libyuv: | ||
default: 'OFF' | ||
recent-cmake: | ||
description: 'Can take the values: true, false' | ||
default: false | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install non-library dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install imagemagick libjpeg-turbo8-dev libpng-dev | ||
shell: bash | ||
- name: Install libaom library | ||
if: ${{ inputs.codec-aom == 'SYSTEM' }} | ||
run: | ||
sudo apt install libaom-dev | ||
shell: bash | ||
- name: Install libdav1d library | ||
if: ${{ inputs.codec-dav1d == 'SYSTEM' }} | ||
run: | ||
sudo apt install libdav1d-dev | ||
shell: bash | ||
- name: Install rav1e library | ||
if: ${{ inputs.codec-rav1e == 'SYSTEM' }} | ||
run: | ||
sudo apt install librav1e-dev | ||
shell: bash | ||
- name: Install libxml2 library | ||
if: ${{ inputs.libxml2 == 'SYSTEM' }} | ||
run: | ||
sudo apt install libxml2 | ||
shell: bash | ||
- name: Install libyuv library | ||
if: ${{ inputs.libyuv == 'SYSTEM' }} | ||
run: | ||
sudo apt install libyuv-dev | ||
shell: bash | ||
|
||
- name: Install cargo-c | ||
if: ${{ inputs.codec-rav1e == 'LOCAL' }} | ||
env: | ||
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download | ||
CARGO_C_FILE: cargo-c-x86_64-unknown-linux-musl.tar.gz | ||
run: | | ||
curl -L $LINK/$CARGO_C_FILE | tar xz -C ~/.cargo/bin | ||
shell: bash | ||
|
||
- uses: ./.github/actions/setup-common | ||
with: | ||
codec-aom: ${{ inputs.codec-aom }} | ||
codec-dav1d: ${{ inputs.codec-dav1d }} | ||
codec-rav1e: ${{ inputs.codec-rav1e }} | ||
recent-cmake: ${{ inputs.recent-cmake }} | ||
|
||
- name: Set GCC & G++ compiler | ||
if: ${{ inputs.gcc-version != '' }} | ||
run: echo "CC=gcc-${{ inputs.gcc-version }}" >> $GITHUB_ENV && echo "CXX=g++-${{ inputs.gcc-version }}" >> $GITHUB_ENV | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: 'Setup on Linux' | ||
description: 'Installs dependencies and sets up env variables' | ||
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' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install non-library dependencies | ||
run: brew install imagemagick | ||
shell: bash | ||
- name: Install AOM library | ||
if: ${{ inputs.codec-aom == 'SYSTEM' }} | ||
run: brew install aom | ||
shell: bash | ||
- name: Install dav1d library | ||
if: ${{ inputs.codec-dav1d == 'SYSTEM' }} | ||
run: brew install dav1d | ||
shell: bash | ||
|
||
- name: Install cargo-c | ||
if: ${{ inputs.codec-rav1e == 'LOCAL' }} | ||
env: | ||
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download | ||
CARGO_C_FILE: cargo-c-macos.zip | ||
run: | | ||
curl -sLo $CARGO_C_FILE $LINK/$CARGO_C_FILE | ||
unzip -o $CARGO_C_FILE -d ~/.cargo/bin | ||
rm $CARGO_C_FILE | ||
shell: bash | ||
|
||
- uses: ./.github/actions/setup-common | ||
with: | ||
codec-aom: ${{ inputs.codec-aom }} | ||
codec-dav1d: ${{ inputs.codec-dav1d }} | ||
codec-rav1e: ${{ inputs.codec-rav1e }} | ||
recent-cmake: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.