Skip to content

Commit

Permalink
Add text to list of valid build output formats
Browse files Browse the repository at this point in the history
  • Loading branch information
Mandrenkov committed Oct 2, 2023
1 parent b73b8fb commit 1995d7f
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/build-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
steps:
- name: Validate inputs.sphinx_build_output_format
run: |
valid_choices='html json'
valid_choices='html json text'
[[ " $valid_choices " =~ " ${{ inputs.sphinx_build_output_format }} " ]] && exit 0 || exit 1
compute-build-strategy-matrix:
Expand Down Expand Up @@ -294,19 +294,19 @@ jobs:
run: |
curl -sSL https://install.python-poetry.org -o install-poetry.py
python3 install-poetry.py --version 1.5.1
$POETRY_HOME/bin/poetry config virtualenvs.create "false"
$POETRY_HOME/bin/poetry config virtualenvs.in-project "true"
$POETRY_HOME/bin/poetry --version
echo "bin=${{ env.POETRY_HOME }}/bin/poetry" >> $GITHUB_OUTPUT
- name: Install Python Dependencies
run: |
source ${{ steps.venv.outputs.location }}/bin/activate
make POETRY_BIN="${{ steps.poetry.outputs.bin }}" UPGRADE_PL="${{ needs.compute-build-strategy-matrix.outputs.build-environment == 'dev' }}" environment
# Adding this install outside of poetry as the dependencies conflict with existing other packages.
# TODO: This needs to be revisited.
# The following needs to be done in order for this dependency to be moved into pyproject.toml:
Expand All @@ -327,10 +327,10 @@ jobs:
run: |
WK_TASKS_FILE_NAME='worker_tasks.json'
jq .workers[${{ env.worker_id }}].tasks ${{ env.worker_load_file_name }} > "$WK_TASKS_FILE_NAME"
cat "$WK_TASKS_FILE_NAME" | jq
echo "file_name=$WK_TASKS_FILE_NAME" >> $GITHUB_OUTPUT
echo "file_name=$WK_TASKS_FILE_NAME" >> $GITHUB_OUTPUT
# Creates a temp yaml file with current environment information:
# ```
Expand All @@ -349,16 +349,16 @@ jobs:
worker_files=$(jq [.[].name] ${{ steps.worker_tasks.outputs.file_name }} | sed 's/^/ /')
cat >matrix_info.yaml <<EOL
nonce: a
num_workers: ${{ inputs.num_workers }}
worker_id: ${{ matrix.offset }}
python:
version: ${{ steps.setup_python.outputs.python-version }}
hash:
pyproject.toml: ${{ hashFiles('pyproject.toml') }}
poetry.lock: ${{ hashFiles('poetry.lock') }}
worker_files: |
$worker_files
EOL
Expand Down Expand Up @@ -428,7 +428,7 @@ jobs:
--build-type="${{ inputs.sphinx_build_output_format }}" \
--examples-dir="${{ github.workspace }}/demonstrations" \
--build-dir="${{ github.workspace }}/_build/html" > /tmp/execution_times/execution_times.json
cat /tmp/execution_times/execution_times.json | jq
# TODO: This is a temporary step to include metadata validation as a part of the build step.
Expand All @@ -438,14 +438,14 @@ jobs:
run: |
metadata_files=()
input_demos_to_build=$(jq -r '[.[].name]|join(" ")' ${{ steps.worker_tasks.outputs.file_name }})
for metadata_file in $input_demos_to_build
do
metadata_files+=("demonstrations/${metadata_file%.py}.metadata.json")
done
metadata_files_str="${metadata_files[@]}"
qml_pipeline_utils validate-metadata-preview-images \
--metadata-files $metadata_files_str \
--build-dir="${{ github.workspace }}/_build/html"
Expand Down

0 comments on commit 1995d7f

Please sign in to comment.