-
Notifications
You must be signed in to change notification settings - Fork 1
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
4 changed files
with
119 additions
and
45 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,107 @@ | ||
name: "Plugin Dependencies" | ||
description: "Install dependencies for the plugin" | ||
|
||
inputs: | ||
for-test: | ||
description: "Whether the plugin is being built for testing" | ||
required: false | ||
default: false | ||
type: boolean | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Retrieve gpac HEAD commit | ||
id: gpac-commit | ||
shell: bash | ||
run: | | ||
head_sha=$(git ls-remote https://github.com/gpac/gpac.git HEAD | awk '{ print $1 }') | ||
echo "gpac-commit=$head_sha" >> $GITHUB_OUTPUT | ||
- name: Cache gpac | ||
id: cache-gpac | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ runner.temp }}/gpac | ||
key: gpac-${{ steps.gpac-commit.outputs.gpac-commit }} | ||
restore-keys: | | ||
gpac- | ||
- name: Clone gpac | ||
if: steps.cache-gpac.outputs.cache-hit != 'true' | ||
shell: bash | ||
working-directory: ${{ runner.temp }} | ||
run: | | ||
if [ -d gpac ]; then | ||
cd gpac | ||
git clean -fdx | ||
git pull | ||
else | ||
git clone --depth 1 https://github.com/gpac/gpac.git | ||
- name: Compile gpac | ||
working-directory: ${{ runner.temp }}/gpac | ||
shell: bash | ||
run: ./configure && make -j | ||
|
||
- name: Install gpac | ||
working-directory: ${{ runner.temp }}/gpac | ||
shell: bash | ||
run: sudo make install | ||
|
||
- name: Install GStreamer | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev | ||
- name: Retrieve gst-plugins-rs HEAD commit | ||
if: inputs.for-test | ||
id: gst-commit | ||
shell: bash | ||
run: | | ||
head_sha=$(git ls-remote https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git HEAD | awk '{ print $1 }') | ||
echo "gst-commit=$head_sha" >> $GITHUB_OUTPUT | ||
- name: Cache gst | ||
if: inputs.for-test | ||
id: cache-gst | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ runner.temp }}/gst-plugins-rs | ||
key: gst-${{ steps.gst-commit.outputs.gst-commit }} | ||
restore-keys: | | ||
gst- | ||
- name: Install Rust | ||
if: inputs.for-test && steps.cache-gst.outputs.cache-hit != 'true' | ||
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 | ||
|
||
- name: Clone gst-plugins-rs | ||
if: inputs.for-test && steps.cache-gst.outputs.cache-hit != 'true' | ||
shell: bash | ||
working-directory: ${{ runner.temp }} | ||
run: | | ||
if [ -d gst-plugins-rs ]; then | ||
cd gst-plugins-rs | ||
git clean -fdx | ||
git pull | ||
else | ||
git clone --depth 1 https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git | ||
- name: Compile cmafmux element | ||
if: inputs.for-test && steps.cache-gst.outputs.cache-hit != 'true' | ||
shell: bash | ||
working-directory: ${{ runner.temp }}/gst-plugins-rs | ||
run: | | ||
cargo install cargo-c | ||
cargo cbuild -p gst-plugin-fmp4 | ||
cargo cinstall -p gst-plugin-fmp4 --destdir bin | ||
- name: Install cmafmux element | ||
if: inputs.for-test | ||
shell: bash | ||
working-directory: ${{ runner.temp }}/gst-plugins-rs | ||
run: | | ||
mkdir -p $HOME/.local/share/gstreamer-1.0/plugins | ||
cp bin/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/libgstfmp4.so $HOME/.local/share/gstreamer-1.0/plugins/ |
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