Skip to content

Commit 6dc2d38

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

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
40+
conda activate "${CONDA_ENV}"
41+
42+
./install_requirements.sh > /dev/null
43+
pip install beartype later pyre_extensions
44+
45+
python -m pytest backends/cadence/aot/tests/ -v -n auto
46+
47+
test-g3-ops:
48+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
49+
with:
50+
job-name: test-g3-ops
51+
runner: ${{ inputs.runner }}
52+
docker-image: ${{ inputs.docker-image }}
53+
submodules: recursive
54+
ref: ${{ inputs.ref }}
55+
timeout: ${{ inputs.timeout }}
56+
script: |
57+
set -eux
58+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
59+
conda activate "${CONDA_ENV}"
60+
61+
./install_requirements.sh > /dev/null
62+
pip install beartype later pyre_extensions
63+
64+
bash backends/cadence/build_cadence_runner.sh
65+
66+
export PYTHONPATH="${PYTHONPATH:-}:$(pwd)/backends/cadence/utils/FACTO"
67+
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)