-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
357 additions
and
261 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Build Conda Package | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
python-version: | ||
required: true | ||
type: string | ||
artifact: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ inputs.os }} | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Install conda-build | ||
run: conda install conda-build | ||
|
||
- name: Build SPDL | ||
run: | | ||
mkdir ~/package | ||
conda build \ | ||
./packaging/conda \ | ||
--python=${{ inputs.python-version }} \ | ||
--output-folder ~/package | ||
- uses: actions/upload-artifact@v4 | ||
name: Upload build artifact | ||
with: | ||
name: "${{ inputs.artifact }}" | ||
path: ~/package | ||
if-no-files-found: error | ||
retention-days: 1 | ||
overwrite: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Test Conda Package | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
python-version: | ||
required: true | ||
type: string | ||
artifact: | ||
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: "${{ inputs.artifact }}" | ||
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/ |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build Conda Package | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
type: string | ||
default: "4-core-ubuntu-gpu-t4" | ||
python-version: | ||
required: true | ||
type: string | ||
cu-version: | ||
required: true | ||
type: string | ||
artifact: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
unit-test: | ||
name: "Unit test (ffmpeg ${{ matrix.ffmpeg-version }})" | ||
if: ${{ inputs.run-test }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ffmpeg-version: ["6"] | ||
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: "${{ inputs.artifact }}" | ||
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 pytorch pytorch-cuda=${{ inputs.cu-version }} -c pytorch -c nvidia | ||
conda install pytest numba | ||
ffmpeg -version | ||
python -c 'import logging;logging.basicConfig(level=logging.DEBUG);from spdl.lib import _libspdl;_libspdl.Demuxer' | ||
pytest -v \ | ||
tests/spdl_unittest/cuda/ |
Oops, something went wrong.