-
-
Notifications
You must be signed in to change notification settings - Fork 127
57 lines (53 loc) · 1.87 KB
/
python-package.yml
File metadata and controls
57 lines (53 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Test Package
on:
push:
branches: [ master ]
paths-ignore:
- '**/*.md'
pull_request:
branches: [ master ]
env:
FFMPEG_VERSION: "7.1"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache ffmpeg download
uses: actions/cache@v3
id: cache-ffmpeg
with:
path: /opt/ffmpeg/ffmpeg-n${{ env.FFMPEG_VERSION }}-latest-linux64-gpl-${{ env.FFMPEG_VERSION }}.tar.xz
key: ${{ runner.os }}-ffmpeg
- name: Download ffmpeg if not cached
if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
run: |
echo "Downloading ffmpeg ${FFMPEG_VERSION}"
wget -q https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n${{ env.FFMPEG_VERSION }}-latest-linux64-gpl-${{ env.FFMPEG_VERSION }}.tar.xz -P /opt/ffmpeg
- name: Extract and install ffmpeg
run: |
echo "Extracting ffmpeg ${FFMPEG_VERSION}"
sudo mkdir -p /opt/ffmpeg/extracted
sudo tar --strip-components 1 -xf /opt/ffmpeg/ffmpeg-n${{ env.FFMPEG_VERSION }}-latest-linux64-gpl-${{ env.FFMPEG_VERSION }}.tar.xz -C /opt/ffmpeg/extracted
echo "Installing ffmpeg ${FFMPEG_VERSION}"
sudo cp /opt/ffmpeg/extracted/bin/ffmpeg /usr/bin/ffmpeg
sudo cp /opt/ffmpeg/extracted/bin/ffprobe /usr/bin/ffprobe
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements.dev.txt
pip install .
- name: Type check with mypy
run: |
mypy ffmpeg_normalize
- name: Test with pytest
run: |
pytest