Skip to content

[app] Create new DVR-Scan application for GUI #178 #357

[app] Create new DVR-Scan application for GUI #178

[app] Create new DVR-Scan application for GUI #178 #357

Workflow file for this run

# Build Portable Windows EXE (x64) Distribution for DVR-Scan
name: Windows Distribution
on:
schedule:
- cron: '0 0 * * *'
pull_request:
paths:
- dist/**
- dvr_scan/**
- tests/**
push:
paths:
- dist/**
- dvr_scan/**
- tests/**
tags:
- v*-release
workflow_dispatch:
env:
ffmpeg_version: "7.1"
UV_SYSTEM_PYTHON: 1
UV_LINK_MODE: "symlink"
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v4
with:
version: "0.5.11"
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
uv pip install --upgrade pip build wheel virtualenv setuptools
uv pip install -r dist/requirements_windows.txt -r docs/requirements.txt
- name: Download FFMPEG
uses: dsaltares/[email protected]
with:
repo: 'GyanD/codexffmpeg'
version: 'tags/${{ env.ffmpeg_version }}'
file: 'ffmpeg-${{ env.ffmpeg_version }}-full_build.7z'
- name: Unit Test
run: |
7z e ffmpeg-${{ env.ffmpeg_version }}-full_build.7z ffmpeg.exe -r
python -m pytest tests/
- name: Build DVR-Scan
run: |
python dist/pre_release.py --use-local-images
pyinstaller dist/dvr-scan.spec
python dist/post_release.py
- name: Assemble Distribution
run: |
7z e -odist/ffmpeg ffmpeg-${{ env.ffmpeg_version }}-full_build.7z LICENSE -r
Move-Item -Path ffmpeg.exe -Destination dist/dvr-scan/ffmpeg.exe
Move-Item -Path dist/ffmpeg/LICENSE -Destination dist/dvr-scan/LICENSE-FFMPEG -Force
- name: Upload
uses: actions/upload-artifact@v4
with:
name: DVR-Scan-win64_portable
path: dist/dvr-scan
test:
runs-on: windows-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
name: DVR-Scan-win64_portable
path: build
- name: Test Artifact
run: |
./build/dvr-scan --version
./build/dvr-scan --license
./build/dvr-scan -i tests/resources/simple_movement.mp4 -so -et 5s -df 3
./build/dvr-scan -i tests/resources/simple_movement.mp4 -et 5s -df 3 -m copy