Skip to content

Commit e83fdfb

Browse files
luhenryclaude
authored andcommitted
Wire RISC-V QEMU smoke test into pull.yml CI
Adds the reusable _test_riscv_qemu.yml workflow_call (mirroring _test_cortex_m_e2e.yml) and a test-riscv-qemu job in pull.yml that calls it on every PR. The job runs on a stock linux.2xlarge x86_64 runner (no special hardware), apt-installs gcc-riscv64-linux-gnu and qemu-user-static via examples/riscv/setup.sh, then invokes .ci/scripts/test_riscv_qemu.sh which exports a small BundledProgram, cross-compiles executor_runner for riscv64-linux, runs it under qemu-user-static, and asserts the Test_result: PASS marker emitted by the bundled-IO comparison path. This is the CI half of the Phase 1.0 stepping stone toward pytorch#18991; the toolchain, preset, AOT script, and run.sh landed in the previous commit. Co-authored-with: Claude (https://claude.ai/code)
1 parent e6f4b9f commit e83fdfb

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test RISC-V QEMU smoke
2+
3+
permissions:
4+
id-token: write
5+
contents: read
6+
7+
on:
8+
workflow_call:
9+
inputs:
10+
timeout:
11+
description: 'Per-job timeout in minutes'
12+
required: false
13+
type: number
14+
default: 30
15+
16+
jobs:
17+
run:
18+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
19+
with:
20+
runner: linux.2xlarge
21+
docker-image: ci-image:executorch-ubuntu-22.04-clang12
22+
submodules: 'recursive'
23+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
24+
timeout: ${{ inputs.timeout }}
25+
script: |
26+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
27+
conda activate "${CONDA_ENV}"
28+
29+
source .ci/scripts/utils.sh
30+
install_executorch "--use-pt-pinned-commit"
31+
32+
bash .ci/scripts/test_riscv_qemu.sh

.github/workflows/pull.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,13 @@ jobs:
607607
exit 1
608608
fi
609609
610+
test-riscv-qemu:
611+
name: test-riscv-qemu
612+
permissions:
613+
id-token: write
614+
contents: read
615+
uses: ./.github/workflows/_test_riscv_qemu.yml
616+
610617
test-mcu-cortex-m-backend:
611618
name: test-mcu-cortex-m-backend
612619
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main

0 commit comments

Comments
 (0)