Skip to content

Commit 68cb851

Browse files
huydhnfacebook-github-bot
authored andcommitted
Install Executorch when building docs (#467)
Summary: This should fix the missing executorch module in https://github.com/pytorch/executorch/actions/runs/6267937461/job/17021962867?pr=437#step:11:254. Note that all the docs build dependencies are pre-installed in the Docker image with the exception of Executorch, which needs to be installed when the CI runs to get the latest code from the change. Pull Request resolved: #467 Reviewed By: mergennachin Differential Revision: D49566304 Pulled By: huydhn fbshipit-source-id: 18701cd8a7bb9624df79a632539411d55f67a978
1 parent 1027a2f commit 68cb851

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/doc-build.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,26 @@ jobs:
2020
job-name: Build doc
2121
runner: linux.2xlarge
2222
docker-image: executorch-ubuntu-22.04-clang12
23-
fetch-depth: 0
2423
submodules: 'true'
2524
repository: pytorch/executorch
2625
upload-artifact: docs
27-
2826
script: |
29-
# Set up Environment Variables
30-
PYTHON_VERSION=3.10
31-
export PATH="/opt/conda/envs/py_${PYTHON_VERSION}/bin:${PATH}"
27+
# The generic Linux job chooses to use base env, not the one setup by the image
28+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
29+
conda activate "${CONDA_ENV}"
30+
31+
source .ci/scripts/utils.sh
32+
# This is a simple Python script but as it tries to import executorch.examples.models,
33+
# it requires a whole bunch of Executorch dependencies on the Docker image
34+
install_executorch
3235
3336
if [[(${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
3437
export CHANNEL=test
3538
else
3639
export CHANNEL=nightly
3740
fi
3841
39-
set -ex
40-
set +u
42+
set -eux
4143
4244
# Build docset:
4345
cd docs
@@ -48,7 +50,6 @@ jobs:
4850
4951
# Sometimes the artifact directory already contains an "html" subdir.
5052
rm -rf "${RUNNER_ARTIFACT_DIR}/html"
51-
5253
mv docs/_build/html "${RUNNER_ARTIFACT_DIR}"
5354
5455
# Enable preview later. Previews are available publicly

0 commit comments

Comments
 (0)