From 9d5f3fb07d947f139216d11dd6309be476bf13cd Mon Sep 17 00:00:00 2001 From: phoenix Date: Sat, 12 Apr 2025 14:11:00 -0400 Subject: [PATCH] Adding ffmpeg library install in steps --- .gitea/workflows/workflow.yml | 133 +++++++++++++++++++++++++++++++--- 1 file changed, 121 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/workflow.yml b/.gitea/workflows/workflow.yml index 727cdf7..7cc4fe4 100644 --- a/.gitea/workflows/workflow.yml +++ b/.gitea/workflows/workflow.yml @@ -14,18 +14,10 @@ jobs: install_dependencies: # runs-on: ubuntu-latest # Or similar Debian/Ubuntu based runner runs-on: ubuntu-24.04 - # container: rust:1.86.0 # Example using the official Rust image (Debian based) + container: rust:1.86.0 # Example using the official Rust image (Debian based) steps: - name: Install FFmpeg development libraries run: | - apt-get update -y - apt-get install -y --no-install-recommends \ - libavutil-dev \ - libavformat-dev \ - libavcodec-dev \ - libswscale-dev \ - # Add other ffmpeg dev packages if needed by your specific crate - rm -rf /var/lib/apt/lists/* # Clean up check: name: Check @@ -35,8 +27,8 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: 1.86.0 - name: Install dependencies - run: | + - run: | + echo "Installing ffmpeg dev libraries" apt-get update -y apt-get install -y --no-install-recommends \ libavutil-dev \ @@ -44,4 +36,121 @@ jobs: libavcodec-dev \ libswscale-dev \ # Add other ffmpeg dev packages if needed by your specific crate - rm -rf /var/lib/apt/lists/* # Clean up \ No newline at end of file + rm -rf /var/lib/apt/lists/* # Clean up + mkdir -p ~/.ssh + echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key + chmod 600 ~/.ssh/gitlab_deploy_key + ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts + eval $(ssh-agent -s) + ssh-add -v ~/.ssh/gitlab_deploy_key + cargo check + + test: + name: Test Suite + runs-on: ubuntu-24.04 + needs: setup_ssh + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.86.0 + - run: | + echo "Installing ffmpeg dev libraries" + apt-get update -y + apt-get install -y --no-install-recommends \ + libavutil-dev \ + libavformat-dev \ + libavcodec-dev \ + libswscale-dev \ + # Add other ffmpeg dev packages if needed by your specific crate + rm -rf /var/lib/apt/lists/* # Clean up + mkdir -p ~/.ssh + echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key + chmod 600 ~/.ssh/gitlab_deploy_key + ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts + eval $(ssh-agent -s) + ssh-add -v ~/.ssh/gitlab_deploy_key + cargo test + + fmt: + name: Rustfmt + runs-on: ubuntu-24.04 + needs: setup_ssh + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.86.0 + - run: rustup component add rustfmt + - run: | + echo "Installing ffmpeg dev libraries" + apt-get update -y + apt-get install -y --no-install-recommends \ + libavutil-dev \ + libavformat-dev \ + libavcodec-dev \ + libswscale-dev \ + # Add other ffmpeg dev packages if needed by your specific crate + rm -rf /var/lib/apt/lists/* # Clean up + mkdir -p ~/.ssh + echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key + chmod 600 ~/.ssh/gitlab_deploy_key + ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts + eval $(ssh-agent -s) + ssh-add -v ~/.ssh/gitlab_deploy_key + cargo fmt --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-24.04 + needs: setup_ssh + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.86.0 + - run: rustup component add clippy + - run: | + echo "Installing ffmpeg dev libraries" + apt-get update -y + apt-get install -y --no-install-recommends \ + libavutil-dev \ + libavformat-dev \ + libavcodec-dev \ + libswscale-dev \ + # Add other ffmpeg dev packages if needed by your specific crate + rm -rf /var/lib/apt/lists/* # Clean up + mkdir -p ~/.ssh + echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key + chmod 600 ~/.ssh/gitlab_deploy_key + ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts + eval $(ssh-agent -s) + ssh-add -v ~/.ssh/gitlab_deploy_key + cargo clippy -- -D warnings + + build: + name: build + runs-on: ubuntu-24.04 + needs: setup_ssh + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.86.0 + - run: | + echo "Installing ffmpeg dev libraries" + apt-get update -y + apt-get install -y --no-install-recommends \ + libavutil-dev \ + libavformat-dev \ + libavcodec-dev \ + libswscale-dev \ + # Add other ffmpeg dev packages if needed by your specific crate + rm -rf /var/lib/apt/lists/* # Clean up + mkdir -p ~/.ssh + echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key + chmod 600 ~/.ssh/gitlab_deploy_key + ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts + eval $(ssh-agent -s) + ssh-add -v ~/.ssh/gitlab_deploy_key + cargo build --release \ No newline at end of file