Files
Server-scripts/.gitea/workflows/ffmpeg_handling.yaml
T
Lucas Vivo 02c53e0839
FFmpeg Handling CI / test (push) Successful in 45s
FFmpeg Handling CI / lint (push) Successful in 5s
FFmpeg Handling CI / build (push) Skipped
FFmpeg Handling CI / install (push) Skipped
Serverlibrary CI / test-serverlibrary (pull_request) Successful in 10s
Serverlibrary CI / lint-serverlibrary (pull_request) Successful in 5s
Serverlibrary CI / test-serverlibrary (push) Successful in 9s
Serverlibrary CI / lint-serverlibrary (push) Successful in 6s
Wallpaper Changer CI / test-wallpaper-changer (push) Successful in 19s
Wallpaper Changer CI / build (push) Skipped
Wallpaper Changer CI / install (push) Skipped
Wallpaper Changer CI / lint-wallpaper-changer (push) Successful in 5s
ci(ffmpeg_handling): add main restriction for build task
2026-11-20 18:05:41 +01:00

112 lines
2.9 KiB
YAML

name: FFmpeg Handling CI
permissions:
contents: read
on:
push:
branches:
- dev
- main
paths:
- "ffmpeg_handling/**"
- "serverlibrary/**"
- ".gitea/workflows/ffmpeg_handling.yaml"
pull_request:
branches:
- dev
paths:
- "ffmpeg_handling/**"
- "serverlibrary/**"
- ".gitea/workflows/ffmpeg_handling.yaml"
jobs:
test:
runs-on: ubuntu-latest
container:
image: nikolaik/python-nodejs:python3.12-nodejs20
steps:
- name: Check out the tested commit
uses: actions/checkout@v4
- name: Install FFmpeg
run: |
apt-get update
apt-get install --yes --no-install-recommends ffmpeg
- name: Install ffmpeg_handling
working-directory: ffmpeg_handling
run: |
python -m pip install --upgrade pip
python -m pip install ../serverlibrary .
- name: Run tests
working-directory: ffmpeg_handling
run: python src/ffmpeg_handling/run_test.py
lint:
runs-on: ubuntu-latest
container:
image: nikolaik/python-nodejs:python3.12-nodejs20
steps:
- name: Check out the tested commit
uses: actions/checkout@v4
- name: Install Ruff
run: python -m pip install ruff
- name: Lint ffmpeg_handling
run: ruff check ffmpeg_handling/src ffmpeg_handling/tests ffmpeg_handling/main.py
build:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
needs: [test, lint]
runs-on: ubuntu-latest
container:
image: nikolaik/python-nodejs:python3.12-nodejs20
steps:
- name: Check out the tested commit
uses: actions/checkout@v4
- name: Install build dependencies
working-directory: ffmpeg_handling
run: |
python -m pip install --upgrade pip
python -m pip install ../serverlibrary .
python -m pip install pyinstaller
- name: Build one-file executable
working-directory: ffmpeg_handling
run: python -m PyInstaller --clean --noconfirm ffmpeg_handling.spec
- name: Verify executable
run: test -x ffmpeg_handling/dist/ffmpeg_handling
- name: Upload executable
uses: https://github.com/christopherHX/gitea-upload-artifact@v4
with:
name: ffmpeg-handling-build
path: ffmpeg_handling/dist/ffmpeg_handling
if-no-files-found: error
install:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
needs: build
runs-on: [self-hosted, linux, x64]
steps:
- name: Download executable
uses: https://github.com/christopherHX/gitea-download-artifact@v4
with:
name: ffmpeg-handling-build
path: dist/
- name: Install ffmpeg_handling
run: |
set -euo pipefail
install -d -m 755 "$HOME/tools"
install -m 755 dist/ffmpeg_handling "$HOME/tools/ffmpeg_handling"