-
Notifications
You must be signed in to change notification settings - Fork 148
78 lines (75 loc) · 3.23 KB
/
integrations-check.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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