Skip to content

Add workflow for reference resource generation #309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/reference_resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Reference resource generation tests

on:
workflow_dispatch:
pull_request:
paths:
- test/generate_reference_resources.sh
schedule:
- cron: '0 0 * * 0' # on sunday

defaults:
run:
shell: bash -l -eo pipefail {0}

jobs:
test-reference-resource-generation:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9']
ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1']
steps:
- name: Setup conda env
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
activate-environment: test
python-version: ${{ matrix.python-version }}

- name: Install ffmpeg
run: |
conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
ffmpeg -version

- name: Update pip
run: python -m pip install --upgrade pip

- name: Instal generation dependencies
run: |
# Note that we're installing stable - this is for running a script where we're a normal PyTorch
# user, not for building TorhCodec.
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
python -m pip install numpy pillow

- name: Check out repo
uses: actions/checkout@v3

- name: Run generation reference resources
run: |
test/generate_reference_resources.sh
Loading