Skip to content

Commit

Permalink
Split test
Browse files Browse the repository at this point in the history
  • Loading branch information
mthrok committed Sep 3, 2024
1 parent 3220a74 commit 87b8759
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 8 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/conda_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test Conda Package

on:
workflow_call:
inputs:
os:
required: true
type: string
python-version:
required: true
type: string

jobs:
unit-test:
name: "Unit test (ffmpeg ${{ matrix.ffmpeg-version }})"
strategy:
fail-fast: false
matrix:
ffmpeg-version: ["5", "6", "7" ]
runs-on: ${{ inputs.os }}
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: actions/download-artifact@v4
with:
name: "spdl.conda.${{ inputs.os }}.py${{ inputs.python-version }}"
path: ~/package

- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ inputs.python-version }}

- name: Unit test
run: |
conda install -c file://${HOME}/package/ spdl
conda install -c conda-forge "ffmpeg==${{ matrix.ffmpeg-version}}"
conda install -c pytorch numpy pytest pytorch numba
pytest -v \
tests/spdl_unittest/io/ \
tests/spdl_unittest/dataloader/
14 changes: 10 additions & 4 deletions .github/workflows/package_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,32 @@ jobs:
# Conda (CPU)
#############################################################################
conda-py312:
name: "Conda (Python 3.12, CPU)"
name: "Conda Build (Python 3.12, CPU)"
uses: ./.github/workflows/conda_build.yml
with:
os: ubuntu-latest
python-version: "3.12"

conda-py311:
name: "Conda (Python 3.11, CPU)"
name: "Conda Build (Python 3.11, CPU)"
uses: ./.github/workflows/conda_build.yml
with:
os: ubuntu-latest
python-version: "3.11"

conda-py310:
name: "Conda (Python 3.10, CPU)"
name: "Conda Build (Python 3.10, CPU)"
uses: ./.github/workflows/conda_build.yml
with:
os: ubuntu-latest
python-version: "3.10"
run-test: true

conda-test-py310:
name: "Conda Test (Python 3.10, CPU)"
uses: ./.github/workflows/conda_test.yml
with:
os: ubuntu-latest
python-version: "3.10"

#############################################################################
# Conda (CUDA-11.8)
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/package_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,30 @@ jobs:
#############################################################################
# Conda
#############################################################################
mac-312:
mac-py312:
name: "Conda (Python 3.12)"
uses: ./.github/workflows/conda_build.yml
with:
os: macos-latest
python-version: "3.12"

mac-311:
mac-py311:
name: "Conda (Python 3.11)"
uses: ./.github/workflows/conda_build.yml
with:
os: macos-latest
python-version: "3.11"

mac-310:
mac-py310:
name: "Conda (Python 3.10)"
uses: ./.github/workflows/conda_build.yml
with:
os: macos-latest
python-version: "3.10"
run-test: true

mac-test-py310:
name: "Conda (Python 3.10)"
uses: ./.github/workflows/conda_test.yml
with:
os: macos-latest
python-version: "3.10"

0 comments on commit 87b8759

Please sign in to comment.