Skip to content

[GHA] Update End-to-End Nightly Build Process #4945

[GHA] Update End-to-End Nightly Build Process

[GHA] Update End-to-End Nightly Build Process #4945

name: Integrations Testing
on:
pull_request:
branches:
- main
- 'release/*'
jobs:
test-setup:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: git branch --show-current
- name: Get current branch
id: get-branch
run: >
(git branch --show-current | grep -E "release/")
&& echo "::set-output name=branch::$(git branch --show-current)"
|| echo "::set-output name=branch::main"
- name: "Checking if sparseml.transformers was changed"
id: transformers-check
run: >
((git diff --name-only origin/main HEAD | grep -E "[src/sparseml|tests/integrations]/transformers|setup.py")
|| (echo $GITHUB_REF | grep -E "refs/heads/[release/|main]"))
&& echo "::set-output name=output::transformers" || echo "::set-output name=output::"
- name: "Checking if sparseml.yolov5 was changed"
id: yolov5-check
run: >
((git diff --name-only origin/main HEAD | grep -E "[src/sparseml|tests/integrations]/yolov5|setup.py")
|| (echo $GITHUB_REF | grep -E "refs/heads/[release/|main]"))
&& echo "::set-output name=output::yolov5" || echo "::set-output name=output::"
- name: "Checking if sparseml.pytorch.image_classification was changed"
id: image-classification-check
run: >
((git diff --name-only origin/main HEAD | grep -E "[src/sparseml/pytorch|tests/integrations]/image_classification|setup.py")
|| (echo $GITHUB_REF | grep -E "refs/heads/[release/|main]"))
&& echo "::set-output name=output::image_classification" || echo "::set-output name=output::"
integrations-tests:
runs-on: ubuntu-22.04
needs: test-setup
env:
SPARSEZOO_TEST_MODE: "true"
SPARSEML_TEST_CADENCE: "pre-commit"
TRANSFORMERS: needs.test-setup.outputs.transformers
YOLOV5: needs.test-setup.outputs.yolov5
IMAGE_CLASSIFICATION: needs.test-setup.outputs.image_classification
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: "neuralmagic/sparsezoo"
path: "sparsezoo"
ref: ${{needs.test-setup.outputs.branch}}
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: "⚙️ Install sparsezoo dependencies"
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
- name: "Clean sparsezoo directory"
run: rm -r sparsezoo/
- uses: actions/checkout@v2
with:
repository: "neuralmagic/compressed-tensors"
path: "compressed-tensors"
ref: ${{needs.test-setup.outputs.branch}}
- name: "⚙️ Install compressed-tensors dependencies"
run: pip3 install -U pip && pip3 install setuptools compressed-tensors/
- name: "Clean compressed-tensors directory"
run: rm -r compressed-tensors/
- name: "⚙️ Install dependencies"
run: pip3 install .[dev,torchvision,deepsparse,onnxruntime,transformers,yolov5]
- name: "🔬 Running integrations tests (cadence: pre-commit}})"
run: make testinteg TARGETS=$TRANSFORMERS,$YOLOV5,$IMAGE_CLASSIFICATION