Update workflow scripts #38
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Build & Test | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
if: github.event.pull_request.draft == false | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: "ubuntu-20.04" | |
python-version: "3.8" | |
use-ffmpeg: false | |
- os: "ubuntu-22.04" | |
python-version: "3.12" | |
use-ffmpeg: false | |
- os: "ubuntu-24.04" | |
python-version: "3.12" | |
use-ffmpeg: true | |
- os: "macos-12" | |
python-version: "3.11" | |
use-ffmpeg: true | |
- os: "macos-14" | |
python-version: "3.12" | |
use-ffmpeg: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install Python Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 pytest | |
python -m pip install -r requirements.txt | |
- name: Install libavutil on Ubuntu | |
if: ${{ contains(matrix.os,'ubuntu') && !matrix.use-ffmpeg }} | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y libavcodec-dev libavutil-dev libswscale-dev | |
- name: Install ffmpeg on Ubuntu | |
if: ${{ contains(matrix.os,'ubuntu') && matrix.use-ffmpeg }} | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y libavcodec-dev libavutil-dev libswscale-dev | |
- name: Install ffmpeg on OS X | |
if: ${{ contains(matrix.os,'macos') && !matrix.use-ffmpeg }} | |
run: | | |
brew update | |
brew install ffmpeg cmake | |
- name: Build And Install | |
run: | | |
python -m pip install -e . | |
- name: Test with pytest | |
run: | | |
python -m pytest test/test.py |