Skip to content

Windows Distribution #212

Windows Distribution

Windows Distribution #212

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:
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.9"]
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 Dependencies
run: |
python -m pip install --upgrade pip build wheel virtualenv setuptools
pip install -r dist/requirements_windows.txt
- name: Download FFMPEG
uses: dsaltares/[email protected]
with:
repo: 'GyanD/codexffmpeg'
version: 'tags/6.0'
file: 'ffmpeg-6.0-full_build.7z'
- name: Unit Test
run: |
7z e ffmpeg-6.0-full_build.7z ffmpeg.exe -r
python -m pytest tests/
- name: Build DVR-Scan
run: |
python dist/pre_release.py
pyinstaller dist/dvr-scan.spec
python dist/post_release.py
- name: Assemble Distribution
run: |
7z e -odist/ffmpeg ffmpeg-6.0-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: Test Distribution
run: |
./dist/dvr-scan/dvr-scan -i tests/resources/simple_movement.mp4 -et 5s -df 3
- 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