Skip to content

Commit

Permalink
Separate Python and C++ tests in different CI jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed Jun 14, 2024
1 parent 0888963 commit b690601
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/unit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defaults:
shell: bash -l -eo pipefail {0}

jobs:
unit_tests:
python:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -60,10 +60,33 @@ jobs:
- name: Run Python tests
run: |
pytest test
Cpp:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1']
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Setup conda env
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
activate-environment: test
python-version: '3.12'
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install dependencies
run: |
python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
- name: Install ffmpeg and pkg-config
run: |
conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" pkg-config -c conda-forge
ffmpeg -version
- name: Build and run C++ tests
run: |
conda install pkg-config -c conda-forge
export BUILD_AGAINST_INSTALLED_FFMPEG=1
# Why we need BUILD_AGAINST_INSTALLED_FFMPEG and pkg-config:
Expand Down

0 comments on commit b690601

Please sign in to comment.