[cli] Move output command state out of CliContext #487
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build Portable Windows EXE (x64) Distribution for PySceneDetect | |
name: Windows Distribution | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
pull_request: | |
paths: | |
- dist/** | |
- scenedetect/** | |
- tests/** | |
push: | |
paths: | |
- dist/** | |
- scenedetect/** | |
- tests/** | |
branches: | |
- main | |
- 'releases/**' | |
tags: | |
- v*-release | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python-version: ["3.9"] | |
env: | |
ffmpeg-version: "7.0" | |
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 | |
pip install -r docs/requirements.txt | |
- name: Download Resources | |
run: | | |
git fetch --depth=1 https://github.com/Breakthrough/PySceneDetect.git refs/heads/resources:refs/remotes/origin/resources | |
git checkout refs/remotes/origin/resources -- tests/resources/ | |
- name: Download FFMPEG ${{ env.ffmpeg-version }} | |
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 -vv | |
- name: Build PySceneDetect | |
run: | | |
python dist/pre_release.py --ignore-installer | |
pyinstaller dist/scenedetect.spec | |
- name: Build Documentation | |
run: | | |
sphinx-build -b singlehtml docs dist/scenedetect/docs | |
rm -r dist/scenedetect/docs/.doctrees | |
- name: Assemble Portable Distribution | |
run: | | |
Move-Item -Path LICENSE -Destination dist/scenedetect/ | |
New-Item -Path dist/scenedetect/ -Name thirdparty -ItemType Directory | |
Move-Item -Path dist/windows/README* -Destination dist/scenedetect/ | |
Move-Item -Path dist/windows/LICENSE* -Destination dist/scenedetect/thirdparty/ | |
Move-Item -Path scenedetect/_thirdparty/LICENSE* -Destination dist/scenedetect/thirdparty/ | |
7z e -odist/ffmpeg ffmpeg-${{ env.ffmpeg-version }}-full_build.7z LICENSE -r | |
Move-Item -Path ffmpeg.exe -Destination dist/scenedetect/ffmpeg.exe | |
Move-Item -Path dist/ffmpeg/LICENSE -Destination dist/scenedetect/thirdparty/LICENSE-FFMPEG | |
- name: Test Portable Distribution | |
run: | | |
./dist/scenedetect/scenedetect -i tests/resources/goldeneye.mp4 detect-content time -e 2s | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: PySceneDetect-win64_portable | |
path: dist/scenedetect | |
include-hidden-files: true | |
test: | |
runs-on: windows-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: resources | |
- uses: actions/[email protected] | |
with: | |
name: PySceneDetect-win64_portable | |
path: build | |
- name: Test | |
run: | | |
./build/scenedetect version | |
./build/scenedetect -i tests/resources/goldeneye.mp4 -b opencv detect-content time --end 00:10:00 | |
./build/scenedetect -i tests/resources/goldeneye.mp4 -b pyav detect-content time --end 00:10:00 | |
./build/scenedetect -i tests/resources/goldeneye.mp4 detect-content time --end 00:10:00 split-video |