Skip to content

Commit

Permalink
w
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDokuchaev committed Nov 25, 2024
1 parent b0aa546 commit 2c58e7e
Showing 1 changed file with 8 additions and 53 deletions.
61 changes: 8 additions & 53 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,19 @@ on:
pull_request_number:
description: 'The pull request number'
default: ''
pull_request:
types:
- opened
- reopened
- synchronize
paths-ignore:
- '*' # TODO: remove
- '**/*.md'
- 'docs/**/*'
- 'tests/*'
schedule:
- cron: '0 0 * * *'
pull_request: # TODO: remove

jobs:
install-cpu:
name: Test install [${{ matrix.backend }}]
runs-on: ubuntu-22.04
name: Test install [${{ matrix.backend }} - ${{ matrix.runner }}]
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
backend: ["torch", "tf", "onnx", "openvino"]
runner: ["windows-latest", "ubuntu-22.04"]
defaults:
run:
shell: bash
Expand All @@ -41,27 +35,22 @@ jobs:
git checkout pr-${{ github.event.inputs.pull_request_number }}
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.10.14
python-version: "3.10"
cache: pip
- name: Install test requirements
run: |
pip install -r tests/cross_fw/examples/requirements.txt
- name: Print installed modules
run: pip list
- name: Run install test scope (all)
if: github.event_name != 'pull_request'
- name: Run install test scope
run: pytest tests/cross_fw/install -rA -s --host-configuration cpu --backend ${{ matrix.backend }}
- name: Run install test scope (fast)
if: github.event_name == 'pull_request'
run: pytest tests/cross_fw/install -rA -s --host-configuration cpu --backend ${{ matrix.backend }} -k build_w

install-torch-gpu:
name: Test install [torch-gpu]
defaults:
run:
shell: bash
runs-on: aks-linux-4-cores-28gb-gpu-tesla-t4
if: github.event_name != 'pull_request'
env:
DEBIAN_FRONTEND: noninteractive
steps:
Expand Down Expand Up @@ -103,37 +92,3 @@ jobs:
export PATH=/usr/local/cuda-12.4/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
pytest tests/cross_fw/install -rA -s --host-configuration gpu --backend torch
install-cpu-win:
name: Test install windows [${{ matrix.backend }}]
runs-on: windows-latest
# TODO: !=
if: github.event_name == 'pull_request'
strategy:
fail-fast: false
matrix:
backend: ["torch", "tf", "onnx", "openvino"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
lfs: true
fetch-depth: 0 # Fetch full history to allow checking out any branch or PR
- name: Fetch and Checkout the Pull Request Branch
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.pull_request_number != '' }}
run: |
git fetch origin pull/${{ github.event.inputs.pull_request_number }}/head:pr-${{ github.event.inputs.pull_request_number }}
git checkout pr-${{ github.event.inputs.pull_request_number }}
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.10
cache: pip
- name: Install test requirements
run: |
pip install -r tests/cross_fw/examples/requirements.txt
- name: Print installed modules
run: pip list
- name: Run install test scope (all)
run: pytest tests/cross_fw/install -rA -s --host-configuration cpu --backend ${{ matrix.backend }}

0 comments on commit 2c58e7e

Please sign in to comment.