Trigger workflows more selectively #6
Workflow file for this run
This file contains hidden or 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
| name: Reference resource generation tests | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - test/generate_reference_resources.sh | |
| - .github/workflows/reference_resources.yaml # self reference | |
| 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 |