Skip to content

Install Executorch when building docs #467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,26 @@ jobs:
job-name: Build doc
runner: linux.2xlarge
docker-image: executorch-ubuntu-22.04-clang12
fetch-depth: 0
submodules: 'true'
repository: pytorch/executorch
upload-artifact: docs

script: |
# Set up Environment Variables
PYTHON_VERSION=3.10
export PATH="/opt/conda/envs/py_${PYTHON_VERSION}/bin:${PATH}"
# The generic Linux job chooses to use base env, not the one setup by the image
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
conda activate "${CONDA_ENV}"

source .ci/scripts/utils.sh
# This is a simple Python script but as it tries to import executorch.examples.models,
# it requires a whole bunch of Executorch dependencies on the Docker image
install_executorch

if [[(${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
export CHANNEL=test
else
export CHANNEL=nightly
fi

set -ex
set +u
set -eux

# Build docset:
cd docs
Expand All @@ -48,7 +50,6 @@ jobs:

# Sometimes the artifact directory already contains an "html" subdir.
rm -rf "${RUNNER_ARTIFACT_DIR}/html"

mv docs/_build/html "${RUNNER_ARTIFACT_DIR}"

# Enable preview later. Previews are available publicly
Expand Down