Skip to content

Commit ffd4044

Browse files
committed
Publish dev versions of the ESP-IDF component from the nightly branch
Projects that need the component before the next release can now pin a dev version from the registry instead of generating the component from an ExecuTorch checkout. A manual run of publish-espressif-idf.yml on the nightly branch with version_suffix -dev publishes X.Y.Z-dev.YYYYMMDD of that branch's commit, through the same packing, testing, review and registry checks as a release. The generator's new --version-suffix -dev stamps HEAD's commit date, and like the other published stamps checks the checkout: HEAD must be on the nightly branch, checked out or fetched from origin, and free of uncommitted changes to what the generator reads. --allow-dev-stamp stays the unchecked stamp for local builds. A dev version's kernel bundles need executorch from the component's exact commit. ExecuTorch's nightly wheels are built from the nightly branch's commits, so the plan refuses -dev on any other ref and any other suffix on the nightly branch. That check runs from the nightly branch's copy of the workflow, which is main's, so it guards against mistakes rather than changes to it: the runbook protects the nightly branch with a ruleset before the environment trusts it, and has the approver of a dev upload review what changed since the last approved one in every file the environment's jobs run: the workflow, the upload script and its requirements, and the test script whose fetch mode they run. Before the build, the new wheel mode of test_espressif_idf_nightly.sh checks that the nightly index has the version's wheels for every platform and CPython the wheel workflows build, and that all of them record that commit, which takes about 30 seconds. It refuses a version dated today, since a second nightly the same day, which has happened, replaces that day's wheels; the runbook has the workflow run between 00:00 UTC and the next nightly, and once with dry_run set before the first dev upload. The nightly matrix gains a job, which its pull requests run, that checks the wheel check's refusals and runs it on the finished nightlies of the last 60 days that have every wheel, newest first, until one passes, since a second nightly the same day can leave a day's wheels from two commits. It fails if none passes, or if the index has every wheel of a day no nightly commit is dated, which means the dev version's dates no longer match the wheels'; otherwise nightly wheels can fail to build for days, so finding none only warns. ExecuTorch's wheels declare no torch, so the component's VERSION now records the torch requirement install_requirements.py builds the wheels against, and the CPU index of its TORCH_URL_BASE, which it installs torch from and which also serves torch release candidates. The generator reads both before --version exits, so the stamp checks catch a pin it cannot read, and counts install_requirements.py among its inputs. The new torch mode checks that the requirement resolves from that index for every platform and CPython, in the package job before upload and in the nightly's prepare job every day, and the component test checks both lines. The component's README gives the exact pip commands for its version, a release's, an RC's or a dev version's, and the component test checks the release's and the RC's. torch comes from its own index in a command of its own, because download.pytorch.org's test and release indexes also serve executorch builds, as X.Y.Z+cpu, which pip would prefer to PyPI's X.Y.Z and which gen_kernels.py accepts for a release without a commit check. and gen_kernels.py names the nightly wheel a dev version needs. The nightly index keeps about 60 days of wheels, so a project moves to a newer dev version, or to the release, before its pin ages out; firmware builds from a committed kernel bundle are unaffected. Dev versions are semver pre-releases, which a version range picks up only if it opts in, so they go to production without reaching projects on releases. They read 1.6.0-dev.YYYYMMDD, as the nightly wheels do, until main's version.txt moves past 1.6.0, and sort below 1.6.0 meanwhile; exact pins are unaffected. Dev runs queue in the nightly branch's concurrency group, so one cannot replace a pending release run. Before the first dev upload, a repo admin protects the nightly branch and adds it to the deployment branches of the esp-component-registry environment. The workflow accepts -dev once this change reaches the nightly branch. Authored with Claude Code.
1 parent afd8dd9 commit ffd4044

9 files changed

Lines changed: 414 additions & 62 deletions

File tree

‎.ci/scripts/test_espressif_idf_component.sh‎

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,36 @@ git -C "${release_clone}" tag -f "v${release_version}" > /dev/null
9292
bash "${release_clone}/examples/espressif/build_idf_component.sh" --version-suffix "" \
9393
--out "${build_dir}/release_component" 2>&1 | tee "${build_dir}/generate-release.log"
9494
compote manifest lint "${build_dir}/release_component"
95-
python - "${build_dir}/release_component" "${release_version}" "$(git rev-parse HEAD)" <<'PY'
95+
python - "${build_dir}/release_component" "${release_version}" "$(git rev-parse HEAD)" \
96+
"${release_clone}" <<'PY'
97+
import re
9698
import sys
9799
from pathlib import Path
98100
99-
component, version, commit = Path(sys.argv[1]), sys.argv[2], sys.argv[3]
101+
component, version, commit, clone = Path(sys.argv[1]), sys.argv[2], sys.argv[3], sys.argv[4]
100102
lines = (component / "VERSION").read_text().splitlines()
101103
for line in (f"component_version: {version}", f"executorch_commit: {commit}"):
102104
if line not in lines:
103105
sys.exit(f"FAIL: the release component's VERSION has no '{line}'")
104106
if not any(l.startswith("generator: ") and l.endswith(" --version-suffix ''") for l in lines):
105107
sys.exit("FAIL: the release component's VERSION does not record --version-suffix ''")
108+
sys.path.insert(0, clone)
109+
from install_requirements import TORCH_URL_BASE
110+
111+
if not any(re.fullmatch(r"torch_requirement: torch==\d+\.\d+\.\d+\S*", l) for l in lines):
112+
sys.exit("FAIL: the release component's VERSION has no torch_requirement: torch==X.Y.Z")
113+
if f"torch_index: {TORCH_URL_BASE}/cpu" not in lines:
114+
sys.exit(f"FAIL: the release component's VERSION has no torch_index: {TORCH_URL_BASE}/cpu")
106115
if f'version: "{version}"' not in (component / "idf_component.yml").read_text().splitlines():
107116
sys.exit(f"FAIL: the release component's idf_component.yml is not version {version}")
117+
readme = (component / "README.md").read_text().splitlines()
118+
torch = next(l.split(": ", 1)[1] for l in lines if l.startswith("torch_requirement: "))
119+
for line in (
120+
f'pip install "{torch}" --index-url {TORCH_URL_BASE}/cpu',
121+
f'pip install "executorch=={version}"',
122+
):
123+
if line not in readme:
124+
sys.exit(f"FAIL: the release component's README.md has no '{line}'")
108125
print(f"OK: a clean checkout tagged v{version} generates release {version}")
109126
PY
110127
# An RC at the same commit, which a release commit can also be.
@@ -116,6 +133,11 @@ if ! grep -qxF "component_version: ${release_version}-rc.1" "${build_dir}/rc_com
116133
echo "FAIL: the RC component's VERSION is not ${release_version}-rc.1" >&2
117134
exit 1
118135
fi
136+
rc_install="pip install \"executorch==${release_version}\" --extra-index-url https://download.pytorch.org/whl/test/cpu"
137+
if ! grep -qxF "${rc_install}" "${build_dir}/rc_component/README.md"; then
138+
echo "FAIL: the RC component's README.md has no '${rc_install}'" >&2
139+
exit 1
140+
fi
119141
echo "OK: the clean checkout tagged v${release_version}-rc1 generates RC ${release_version}-rc.1"
120142
gen_kernels() {
121143
local out=$1

‎.ci/scripts/test_espressif_idf_nightly.sh‎

Lines changed: 165 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,39 @@
3434
# pytorch/executorch, builds the smoke consumer for ESP32-S3 with it, fails
3535
# if the registry serves files other than <dir>'s archive, and runs the
3636
# build on the emulator.
37+
# test_espressif_idf_nightly.sh wheel <dir> <dev version> <commit>
38+
# Checks that the ExecuTorch nightly wheels of the version's date exist for
39+
# every platform and CPython and were built from <commit>, so a project can
40+
# install the executorch its kernel bundles need. Refuses today's nightly,
41+
# which a later one could replace. Logs go under <dir>.
42+
# test_espressif_idf_nightly.sh rehearse <dir>
43+
# Checks that wheel refuses a version that is not a dev version and today's
44+
# nightly, then runs it on the finished nightlies of origin/nightly's last
45+
# 60 days, the nightly index's window, that have every wheel, newest first,
46+
# until one passes. Nightly wheels can fail to build for days, so finding
47+
# none only warns, unless the index has every wheel of a day no nightly
48+
# commit is dated, which means the dev version's date no longer matches
49+
# the wheels'.
50+
# test_espressif_idf_nightly.sh torch <dir>
51+
# Needs only <dir> from prepare: checks that the torch the packed
52+
# component's VERSION names resolves from its index for every platform and
53+
# CPython.
3754

3855
set -euo pipefail
3956

4057
et_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
41-
usage="usage: $0 prepare <dir> [stamp options] | build <dir> <shard> <shards> | fetch <dir> <URL> <sha256> | registry <dir> <URL>"
58+
usage="usage: $0 prepare <dir> [stamp options] | build <dir> <shard> <shards> | fetch <dir> <URL> <sha256> | registry <dir> <URL> | wheel <dir> <dev version> <commit> | rehearse <dir> | torch <dir>"
4259
mode=${1:?${usage}}
4360
dir=${2:?${usage}}
4461
mkdir -p "${dir}"
4562
dir=$(cd "${dir}" && pwd)
4663
cd "${et_root}"
4764
targets=(esp32 esp32s3 esp32c3 esp32c5 esp32c6 esp32p4)
65+
# The platforms and CPython versions ExecuTorch's wheels are built for, as
66+
# .github/workflows/build-wheels-{linux,aarch64-linux,macos,windows}.yml set them.
67+
wheel_platforms=(manylinux_2_28_x86_64 manylinux_2_28_aarch64 macosx_14_0_arm64 win_amd64)
68+
wheel_pythons=(3.11 3.12 3.13 3.14 3.15)
69+
nightly_index=https://download.pytorch.org/whl/nightly/cpu
4870

4971
# Runs a command with its output in a log, and shows the log's tail if it fails.
5072
logged() {
@@ -400,6 +422,145 @@ settings_applied() {
400422
[[ "${applied}" == true ]]
401423
}
402424

425+
# Prints each wheel a dev version lacks: version, the nightly index's listing.
426+
missing_wheels() {
427+
local listed platform python
428+
listed=$(grep -F "executorch-${1/-dev./.dev}" <<< "$2" || true)
429+
for platform in "${wheel_platforms[@]}"; do
430+
for python in "${wheel_pythons[@]}"; do
431+
grep -qF -- "-cp${python/./}-cp${python/./}-${platform}.whl" <<< "${listed}" \
432+
|| echo "cp${python/./}-${platform}"
433+
done
434+
done
435+
}
436+
437+
# Checks a dev version's nightly wheels: version, commit.
438+
check_wheels() {
439+
local version=$1 commit=$2 listing missing wheels platform python
440+
if [[ "${version}" != *-dev.* ]]; then
441+
echo "FAIL: ${version} is not a dev version" >&2
442+
exit 1
443+
fi
444+
# A second nightly the same day would replace the wheels of this one.
445+
if [[ "${version##*-dev.}" == "$(date -u +%Y%m%d)" ]]; then
446+
echo "FAIL: ${version} is today's nightly, which a later nightly today could replace;" \
447+
"publish it after 00:00 UTC, before the next nightly." >&2
448+
exit 1
449+
fi
450+
# The version's date is its nightly commit's UTC date, and the wheels' is
451+
# the day they were built; when the two differ, no wheels are found.
452+
listing=$(curl -sSf --retry 3 "${nightly_index}/executorch/")
453+
missing=$(missing_wheels "${version}" "${listing}")
454+
if [[ -n "${missing}" ]]; then
455+
echo "FAIL: the nightly index has no ${version} wheel for ${missing//$'\n'/ }" >&2
456+
exit 1
457+
fi
458+
wheels=$(mktemp -d)
459+
# shellcheck disable=SC2064 # wheels is local, so expand it now.
460+
trap "rm -rf '${wheels}'" EXIT
461+
mkdir -p "${dir}/logs"
462+
for platform in "${wheel_platforms[@]}"; do
463+
for python in "${wheel_pythons[@]}"; do
464+
logged "${dir}/logs/nightly-wheel-cp${python/./}-${platform}.log" python -m pip download \
465+
--no-deps --only-binary=:all: --platform "${platform}" \
466+
--python-version "${python}" --implementation cp --index-url "${nightly_index}" \
467+
--dest "${wheels}" "executorch==${version/-dev./.dev}"
468+
done
469+
done
470+
python - "${commit}" "${wheels}"/executorch-*.whl <<'PY'
471+
import re
472+
import sys
473+
import zipfile
474+
475+
commit, wheels = sys.argv[1], sys.argv[2:]
476+
wrong = []
477+
for wheel in wheels:
478+
version_py = zipfile.ZipFile(wheel).read("executorch/version.py").decode()
479+
built = re.search(r"^git_version: .* = '(\w+)'", version_py, re.MULTILINE)
480+
if not built or built.group(1) != commit:
481+
wrong.append(f"{wheel} ({built.group(1) if built else 'no commit'})")
482+
if wrong:
483+
sys.exit(f"FAIL: not built from the component's {commit}: {', '.join(wrong)}")
484+
print(f"OK: all {len(wheels)} wheels were built from {commit}")
485+
PY
486+
}
487+
488+
wheel() {
489+
check_wheels "${3:?${usage}}" "${4:?${usage}}"
490+
}
491+
492+
rehearse() {
493+
local today output listing commit day version
494+
today=$(date -u +%Y%m%d)
495+
output=$( (check_wheels 1.6.0 0) 2>&1 || true)
496+
if [[ "${output}" != *"is not a dev version"* ]]; then
497+
echo "FAIL: the wheel check did not refuse 1.6.0: ${output}" >&2
498+
exit 1
499+
fi
500+
output=$( (check_wheels "1.6.0-dev.${today}" 0) 2>&1 || true)
501+
if [[ "${output}" != *"is today's nightly"* ]]; then
502+
echo "FAIL: the wheel check did not refuse today's nightly: ${output}" >&2
503+
exit 1
504+
fi
505+
echo "OK: the wheel check refuses a version that is not a dev version and today's nightly"
506+
listing=$(curl -sSf --retry 3 "${nightly_index}/executorch/")
507+
local failures=()
508+
for commit in $(git rev-list --first-parent --since=60.days origin/nightly); do
509+
day=$(TZ=UTC git log -1 --format=%cd --date=format-local:%Y%m%d "${commit}")
510+
version="$(git show "${commit}:version.txt")-dev.${day}"
511+
if [[ "${day}" != "${today}" && -z "$(missing_wheels "${version}" "${listing}")" ]]; then
512+
# A second nightly the same day replaces the wheels it builds, so
513+
# a day's wheels can come from two commits; an older day can pass.
514+
if output=$( (check_wheels "${version}" "${commit}") 2>&1); then
515+
echo "${output}"
516+
return
517+
fi
518+
failures+=("${version}: ${output##*$'\n'}")
519+
fi
520+
done
521+
if (( ${#failures[@]} )); then
522+
printf 'FAIL: %s\n' "${failures[@]}" >&2
523+
exit 1
524+
fi
525+
# A day inside the commits' window, whose edge can differ by a day.
526+
local since listed
527+
since=$(date -u -d '59 days ago' +%Y%m%d)
528+
for listed in $(grep -oE 'executorch-[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]{8}' <<< "${listing}" \
529+
| sort -u); do
530+
day=${listed##*.dev}
531+
version="${listed#executorch-}"
532+
version="${version%.dev*}-dev.${day}"
533+
if [[ "${day}" > "${since}" && "${day}" != "${today}" ]] \
534+
&& [[ -z "$(missing_wheels "${version}" "${listing}")" ]]; then
535+
echo "FAIL: the nightly index has every wheel of ${version}, but no nightly commit" \
536+
"of that version is dated ${day}; the dev version's date no longer matches the" \
537+
"wheels'." >&2
538+
exit 1
539+
fi
540+
done
541+
echo "::warning::no nightly of the last 60 days has every wheel; the dev wheel check went unrehearsed."
542+
}
543+
544+
torch() {
545+
local stamp requirement index target platform python
546+
stamp=$(tar -xzOf "${dir}/dist/executorch_$(cat "${dir}/version").tgz" ./VERSION)
547+
requirement=$(sed -n 's/^torch_requirement: *//p' <<< "${stamp}")
548+
index=$(sed -n 's/^torch_index: *//p' <<< "${stamp}")
549+
target=$(mktemp -d)
550+
# shellcheck disable=SC2064 # target is local, so expand it now.
551+
trap "rm -rf '${target}'" EXIT
552+
mkdir -p "${dir}/logs"
553+
for platform in "${wheel_platforms[@]}"; do
554+
for python in "${wheel_pythons[@]}"; do
555+
logged "${dir}/logs/torch-cp${python/./}-${platform}.log" python -m pip install --dry-run \
556+
--no-deps --only-binary=:all: --platform "${platform}" \
557+
--python-version "${python}" --implementation cp --target "${target}" \
558+
--index-url "${index}" "${requirement}"
559+
done
560+
done
561+
echo "OK: ${requirement} resolves from ${index} for CPython ${wheel_pythons[*]} on ${wheel_platforms[*]}"
562+
}
563+
403564
# Runs a build on its emulator: build dir, target, log, then idf.py arguments.
404565
run_firmware() {
405566
local build=$1 target=$2 log=$3
@@ -434,5 +595,8 @@ case "${mode}" in
434595
build) build "$@" ;;
435596
fetch) fetch "$@" ;;
436597
registry) registry "$@" ;;
598+
wheel) wheel "$@" ;;
599+
rehearse) rehearse ;;
600+
torch) torch ;;
437601
*) echo "unknown mode ${mode}; ${usage}" >&2; exit 1 ;;
438602
esac

‎.github/workflows/nightly-espressif-idf.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,34 @@ jobs:
5050
source .ci/scripts/utils.sh
5151
install_executorch --use-pt-pinned-commit --minimal
5252
bash .ci/scripts/test_espressif_idf_nightly.sh prepare "${RUNNER_ARTIFACT_DIR}"
53+
bash .ci/scripts/test_espressif_idf_nightly.sh torch "${RUNNER_ARTIFACT_DIR}"
5354
# Runs the release stamp's checks of the checkout, which publishing
5455
# otherwise first runs at a real tag, at a throwaway local one. Only a
5556
# publish run reaches the check of the executorch package, which
5657
# --version stops before.
5758
git tag -f "v$(cat version.txt)"
5859
bash examples/espressif/build_idf_component.sh --version --version-suffix ""
5960
61+
# The dev versions' wheel check, which publishing otherwise first runs on a
62+
# dispatch from the nightly branch.
63+
dev-wheel-check:
64+
name: Rehearse the dev version's wheel check
65+
runs-on: ubuntu-22.04
66+
timeout-minutes: 15
67+
steps:
68+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
69+
with:
70+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
71+
persist-credentials: false
72+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
73+
with:
74+
python-version: '3.11'
75+
- run: |
76+
set -euo pipefail
77+
git fetch -q --shallow-since='60 days ago' origin \
78+
+refs/heads/nightly:refs/remotes/origin/nightly
79+
bash .ci/scripts/test_espressif_idf_nightly.sh rehearse "${RUNNER_TEMP}/wheel"
80+
6081
registry-dry-run:
6182
name: Registry validation (upload --dry-run)
6283
needs: [docker-image, prepare]

‎.github/workflows/publish-espressif-idf.yml‎

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: Publish ESP-IDF component
22

33
# Publishes pytorch/executorch to the ESP Component Registry: RC tags to the
4-
# staging registry, and release and respin tags to staging and then
5-
# production; manual runs validate without uploading unless told otherwise.
6-
# The archive is built and tested on the ESP-IDF releases the component
7-
# supports before any upload, and each upload is followed by a consumer build
8-
# that resolves the version from that registry. See the release runbook in
4+
# staging registry, release and respin tags to staging and then production,
5+
# and on demand a dev version of a nightly branch commit for early adopters;
6+
# other manual runs validate without uploading unless told otherwise. The
7+
# archive is built and tested on the ESP-IDF releases the component supports
8+
# before any upload, and each upload is followed by a consumer build that
9+
# resolves the version from that registry. See the release runbook in
910
# examples/espressif/README.md.
1011

1112
on:
@@ -15,7 +16,7 @@ on:
1516
workflow_dispatch:
1617
inputs:
1718
version_suffix:
18-
description: 'Version suffix: empty at a release tag, -rc.N at an RC tag, ~N at a respin tag vX.Y.Z-esp-idf.N'
19+
description: 'Version suffix: empty at a release tag, -rc.N at an RC tag, ~N at a respin tag vX.Y.Z-esp-idf.N, -dev for the dev version of the nightly branch'
1920
type: string
2021
default: ''
2122
registry:
@@ -26,7 +27,7 @@ on:
2627
- production
2728
default: staging
2829
dry_run:
29-
description: 'Only validate: pack, test and dry-run the uploads, uploading nothing. Run on the release, RC or respin tag'
30+
description: 'Only validate: pack, test and dry-run the uploads, uploading nothing. Run on the release, RC or respin tag, or for -dev the nightly branch'
3031
type: boolean
3132
default: true
3233
pull_request:
@@ -62,6 +63,7 @@ jobs:
6263
shell: bash
6364
env:
6465
EVENT: ${{ github.event_name }}
66+
REF: ${{ github.ref }}
6567
REF_NAME: ${{ github.ref_name }}
6668
VERSION_SUFFIX: ${{ inputs.version_suffix }}
6769
REGISTRY: ${{ inputs.registry }}
@@ -87,13 +89,21 @@ jobs:
8789
fi
8890
;;
8991
workflow_dispatch)
90-
# The generator stamps a release, RC or respin only at its tag.
91-
if [[ "${GITHUB_REF}" != refs/tags/v* ]]; then
92-
echo "::error::run this workflow on the release, RC or respin tag, not ${GITHUB_REF}."
92+
if [[ ! "${VERSION_SUFFIX}" =~ ^(-rc\.[1-9][0-9]*|~[1-9][0-9]*|-dev)?$ ]]; then
93+
echo "::error::version_suffix must be empty, -rc.N, ~N or -dev, not '${VERSION_SUFFIX}'."
9394
exit 1
9495
fi
95-
if [[ ! "${VERSION_SUFFIX}" =~ ^(-rc\.[1-9][0-9]*|~[1-9][0-9]*)?$ ]]; then
96-
echo "::error::version_suffix must be empty, -rc.N or ~N, not '${VERSION_SUFFIX}'."
96+
# A dev version's users install the nightly wheel of its commit,
97+
# and the generator stamps a release, RC or respin only at its
98+
# tag. This runs from the dispatched ref's copy of the workflow,
99+
# so the environment's reviewers check what that copy does.
100+
if [[ "${VERSION_SUFFIX}" == -dev ]]; then
101+
if [[ "${REF}" != refs/heads/nightly ]]; then
102+
echo "::error::a dev version is published from the nightly branch, not ${REF}."
103+
exit 1
104+
fi
105+
elif [[ "${REF}" != refs/tags/v* ]]; then
106+
echo "::error::run this workflow on the release, RC or respin tag, not ${REF}."
97107
exit 1
98108
fi
99109
if [[ "${VERSION_SUFFIX}" == -rc.* && "${REGISTRY}" == production ]]; then
@@ -150,22 +160,34 @@ jobs:
150160
unset SCCACHE_BUCKET SCCACHE_S3_KEY_PREFIX
151161
CONDA_ENV=$(conda env list --json | jq -r '.envs | .[-1]')
152162
conda activate "${CONDA_ENV}"
163+
suffix="${{ needs.plan.outputs.suffix }}"
164+
# A tag names its version, and a dispatch appends its suffix to
165+
# version.txt. A dev version takes the generator's, which adds the
166+
# commit's date, so for it the comparison below checks only that
167+
# prepare stamped the same.
168+
expected="${{ needs.plan.outputs.version }}"
169+
expected="${expected:-$(cat version.txt)${suffix}}"
170+
# Before the build: a dev version's users install the nightly wheels of
171+
# its commit.
172+
if [[ "${suffix}" == -dev ]]; then
173+
expected=$(bash examples/espressif/build_idf_component.sh --version --version-suffix -dev)
174+
bash .ci/scripts/test_espressif_idf_nightly.sh wheel "${RUNNER_ARTIFACT_DIR}" \
175+
"${expected}" "$(git rev-parse HEAD)"
176+
fi
153177
source .ci/scripts/utils.sh
154178
install_executorch --use-pt-pinned-commit --minimal
155179
if [[ "${{ needs.plan.outputs.rehearsal }}" == true ]]; then
156180
# A pull request rehearses the release stamp at a throwaway local tag.
157181
git tag -f "v$(cat version.txt)"
158182
fi
159-
# A tag names its version; a dispatch appends its suffix to version.txt.
160-
expected="${{ needs.plan.outputs.version }}"
161-
expected="${expected:-$(cat version.txt)${{ needs.plan.outputs.suffix }}}"
162183
bash .ci/scripts/test_espressif_idf_nightly.sh prepare "${RUNNER_ARTIFACT_DIR}" \
163-
--version-suffix "${{ needs.plan.outputs.suffix }}"
184+
--version-suffix "${suffix}"
164185
version=$(cat "${RUNNER_ARTIFACT_DIR}/version")
165186
if [[ "${version}" != "${expected}" ]]; then
166187
echo "FAIL: generated version ${version}, expected ${expected}" >&2
167188
exit 1
168189
fi
190+
bash .ci/scripts/test_espressif_idf_nightly.sh torch "${RUNNER_ARTIFACT_DIR}"
169191
echo "Packed pytorch/executorch ${version}"
170192
# Every later job reads the tested files from one tar, which
171193
# keep-archive keeps longer than this artifact.

0 commit comments

Comments
 (0)