Skip to content

Commit 93b2cbd

Browse files
committed
Add Cadence test CI workflow with separate build and test signals
1 parent 462a4af commit 93b2cbd

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Test Cadence
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
docker-image:
7+
description: 'Docker image to use'
8+
required: false
9+
type: string
10+
default: ci-image:executorch-ubuntu-22.04-clang12
11+
runner:
12+
description: 'Runner type'
13+
required: false
14+
type: string
15+
default: linux.2xlarge
16+
ref:
17+
description: 'Git ref to checkout'
18+
required: false
19+
type: string
20+
default: ${{ github.sha }}
21+
timeout:
22+
description: 'Job timeout in minutes'
23+
required: false
24+
type: number
25+
default: 90
26+
27+
jobs:
28+
test-aot:
29+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
30+
with:
31+
job-name: test-aot
32+
runner: ${{ inputs.runner }}
33+
docker-image: ${{ inputs.docker-image }}
34+
submodules: recursive
35+
ref: ${{ inputs.ref }}
36+
timeout: ${{ inputs.timeout }}
37+
script: |
38+
set -eux
39+
conda create -y -n cadence_test python=3.12 > /dev/null
40+
conda activate cadence_test
41+
42+
./install_requirements.sh > /dev/null
43+
pip install -e . --no-build-isolation > /dev/null
44+
pip install beartype later pyre_extensions pytest-xdist
45+
46+
python -m pytest backends/cadence/aot/tests/ -v -n auto
47+
48+
test-g3-ops:
49+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
50+
with:
51+
job-name: test-g3-ops
52+
runner: ${{ inputs.runner }}
53+
docker-image: ${{ inputs.docker-image }}
54+
submodules: recursive
55+
ref: ${{ inputs.ref }}
56+
timeout: ${{ inputs.timeout }}
57+
script: |
58+
set -eux
59+
conda create -y -n cadence_test python=3.12 > /dev/null
60+
conda activate cadence_test
61+
62+
./install_requirements.sh > /dev/null
63+
pip install -e . --no-build-isolation > /dev/null
64+
pip install beartype later pyre_extensions pytest-xdist
65+
66+
bash backends/cadence/build_cadence_runner.sh
67+
68+
export PYTHONPATH="${PYTHONPATH:-}:$(pwd)/backends/cadence/utils/FACTO"
69+
python -m pytest examples/cadence/operators/test_g3_ops.py -v -n auto

.github/workflows/build-cadence-runner.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,12 @@ jobs:
3333
3434
./install_requirements.sh > /dev/null
3535
bash backends/cadence/build_cadence_runner.sh
36+
37+
test:
38+
needs: cpu
39+
permissions:
40+
id-token: write
41+
contents: read
42+
uses: ./.github/workflows/_test_cadence.yml
43+
with:
44+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

0 commit comments

Comments
 (0)