Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Sep 27, 2024
1 parent 8044232 commit 2fd4d47
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 13 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test_onnxruntime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: ONNX Runtime / Python - Test

on:
push:
branches: [main]
branches:
- main
pull_request:
branches: [main]
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/test_onnxruntime_gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,30 @@ name: ONNX Runtime / Python - GPU - Test

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, labeled]
branches:
- main
types:
- opened
- reopened
- labeled
- unlabeled
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
if: ${{ (github.event_name == 'workflow_dispatch') || contains( github.event.pull_request.labels.*.name, 'gpu-test') }}
if: ${{
(github.event_name == 'push') ||
(github.event_name == 'workflow_dispatch') ||
contains( github.event.pull_request.labels.*.name, 'onnxruntime-gpu')
}}

runs-on:
group: aws-g6-4xlarge-plus
Expand All @@ -33,16 +47,12 @@ jobs:
run: |
pip install --upgrade pip
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
pip install .[tests,onnxruntime-gpu] tensorrt
pip install .[tests,onnxruntime-gpu]
- name: Replace opencv-python with opencv-python-headless
run: |
pip uninstall -y opencv-python && pip install opencv-python-headless
- name: Update LD_LIBRARY_PATH
run: |
export LD_LIBRARY_PATH=$(python -c "import tensorrt; print(tensorrt.__path__[0].replace('/site-packages/tensorrt', '/dist-packages/tensorrt_libs'))"):$LD_LIBRARY_PATH
- name: Test with pytest
run: |
pytest tests/onnxruntime -m "cuda_ep_test or trt_ep_test" --durations=0 -vvvv -s -n auto
pytest tests/onnxruntime -m "cuda_ep_test" --durations=0 -vvvv -s -n auto
4 changes: 3 additions & 1 deletion .github/workflows/test_onnxruntime_slow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: ONNX Runtime / Python - Slow Test
on:
workflow_dispatch:
schedule:
- cron: 0 7 * * * # every day at 7am
# every day at 7am
- cron: 0 7 * * *

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -18,6 +19,7 @@ jobs:
os: [ubuntu-20.04, windows-2019, macos-13]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/test_onnxruntime_training.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,30 @@ name: ONNX Runtime / Python - ORT Training - Test

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, labeled]
branches:
- main
types:
- opened
- reopened
- labeled
- unlabeled
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
do-the-job:
if: ${{ (github.event_name == 'workflow_dispatch') || contains( github.event.pull_request.labels.*.name, 'training')}}
if: ${{
(github.event_name == 'push') ||
(github.event_name == 'workflow_dispatch') ||
contains( github.event.pull_request.labels.*.name, 'onnxruntime-training')
}}

runs-on:
group: aws-g6-4xlarge-plus
Expand Down

0 comments on commit 2fd4d47

Please sign in to comment.