Workflow refactor
This commit is contained in:
@@ -11,12 +11,15 @@ on:
|
|||||||
- devel
|
- devel
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
install_dependencies:
|
build_and_test:
|
||||||
# runs-on: ubuntu-latest # Or similar Debian/Ubuntu based runner
|
name: Build and test
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
container: rust:1.86.0 # Example using the official Rust image (Debian based)
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install FFmpeg development libraries
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: 1.86.0
|
||||||
|
name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
@@ -26,15 +29,7 @@ jobs:
|
|||||||
libswscale-dev \
|
libswscale-dev \
|
||||||
# Add other ffmpeg dev packages if needed by your specific crate
|
# Add other ffmpeg dev packages if needed by your specific crate
|
||||||
rm -rf /var/lib/apt/lists/* # Clean up
|
rm -rf /var/lib/apt/lists/* # Clean up
|
||||||
|
name: Check
|
||||||
check:
|
|
||||||
name: Check
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: 1.86.0
|
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
||||||
@@ -43,17 +38,8 @@ jobs:
|
|||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/gitlab_deploy_key
|
ssh-add -v ~/.ssh/gitlab_deploy_key
|
||||||
cargo check
|
cargo check
|
||||||
|
name: Test
|
||||||
test:
|
run: |
|
||||||
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: |
|
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
||||||
chmod 600 ~/.ssh/gitlab_deploy_key
|
chmod 600 ~/.ssh/gitlab_deploy_key
|
||||||
@@ -61,18 +47,8 @@ jobs:
|
|||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/gitlab_deploy_key
|
ssh-add -v ~/.ssh/gitlab_deploy_key
|
||||||
cargo test
|
cargo test
|
||||||
|
name: Formatting
|
||||||
fmt:
|
run: |
|
||||||
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: |
|
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
||||||
chmod 600 ~/.ssh/gitlab_deploy_key
|
chmod 600 ~/.ssh/gitlab_deploy_key
|
||||||
@@ -80,18 +56,8 @@ jobs:
|
|||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/gitlab_deploy_key
|
ssh-add -v ~/.ssh/gitlab_deploy_key
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
|
name: Clippy
|
||||||
clippy:
|
run: |
|
||||||
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: |
|
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
||||||
chmod 600 ~/.ssh/gitlab_deploy_key
|
chmod 600 ~/.ssh/gitlab_deploy_key
|
||||||
@@ -99,22 +65,12 @@ jobs:
|
|||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/gitlab_deploy_key
|
ssh-add -v ~/.ssh/gitlab_deploy_key
|
||||||
cargo clippy -- -D warnings
|
cargo clippy -- -D warnings
|
||||||
|
name: Build
|
||||||
build:
|
run: |
|
||||||
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: |
|
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/gitlab_deploy_key
|
||||||
chmod 600 ~/.ssh/gitlab_deploy_key
|
chmod 600 ~/.ssh/gitlab_deploy_key
|
||||||
ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ vars.MYHOST }} >> ~/.ssh/known_hosts
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
ssh-add -v ~/.ssh/gitlab_deploy_key
|
ssh-add -v ~/.ssh/gitlab_deploy_key
|
||||||
cargo build --release
|
cargo build --release
|
||||||
|
|
Reference in New Issue
Block a user