Skip to content

Commit afc20b8

Browse files
authored
Add workflow for reference resource generation (#309)
1 parent 6ecf3a8 commit afc20b8

File tree

1 file changed

+52
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)