Skip to content

Commit 569a77f

Browse files
committed
Add workflow for reference resouce generation
1 parent 59af4b7 commit 569a77f

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Reference resource generation tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- test/generate_reference_resources.sh
7+
schedule:
8+
- cron: '0 0 * * 0' # on sunday
9+
10+
defaults:
11+
run:
12+
shell: bash -l -eo pipefail {0}
13+
14+
jobs:
15+
test-reference-resource-generation:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ['3.9']
21+
ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1']
22+
steps:
23+
- name: Setup conda env
24+
uses: conda-incubator/setup-miniconda@v2
25+
with:
26+
auto-update-conda: true
27+
miniconda-version: "latest"
28+
activate-environment: test
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Install ffmpeg
32+
run: |
33+
conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
34+
ffmpeg -version
35+
36+
- name: Update pip
37+
run: python -m pip install --upgrade pip
38+
39+
- name: Instal generation dependencies
40+
run: |
41+
# Note that we're installing stable - this is for running a script where we're a normal PyTorch
42+
# user, not for building TorhCodec.
43+
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
44+
python -m pip install numpy pillow
45+
46+
- name: Check out repo
47+
uses: actions/checkout@v3
48+
49+
- name: Run generation reference resources
50+
run: |
51+
test/generate_reference_resources.sh

0 commit comments

Comments
 (0)