Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mishig25 committed Jun 21, 2024
1 parent 32bab7c commit 83bf0c3
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion .github/workflows/build_embeddings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,65 @@ on:
jobs:
matrix-job:
runs-on: ubuntu-latest
env:
UV_HTTP_TIMEOUT: 900 # max 15min to install deps (shouldn't take more than 5min)
strategy:
max-parallel: 1 # run the matrix jobs sequentially
matrix:
include:
- repo_id: huggingface/diffusers
doc_folder: 14
doc_folder: docs/source/en
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
timeout-minutes: 360 # Set timeout to 6 hours
steps:
- uses: actions/checkout@v2
with:
repository: 'huggingface/doc-builder'
path: doc-builder

- name: Checkout repository
uses: actions/checkout@v2
with:
repository: ${{ matrix.repo_id }}

- name: Export PIP_OR_UV ('pip' or 'uv pip')
# Use `uv` only if running on the base runner.
# When using a container, `pip` has already been used to installed existing deps
# and is therefore quicker to resolve (already have some cached stuff).
run: |
if [ -z "${{ inputs.custom_container }}" ]
then
echo "PIP_OR_UV=uv pip" >> $GITHUB_ENV
else
echo "PIP_OR_UV=pip" >> $GITHUB_ENV
fi
# Use venv in both cases
- name: Install uv
run: |
pip install -U uv
uv venv
- name: Setup environment
shell: bash
run: |
repo_id="${{ matrix.repo_id }}"
repo_name="${repo_id#*/}"
echo "REPO_NAME=${repo_name}"
echo "REPO_NAME=${repo_name}" >> $GITHUB_ENV
source .venv/bin/activate
$PIP_OR_UV uninstall doc-builder
cd doc-builder
git pull origin main
$PIP_OR_UV install .
cd ..
cd $REPO_NAME
$PIP_OR_UV install .[dev]
cd ..
cleanup-job:
needs: matrix-job
Expand Down

0 comments on commit 83bf0c3

Please sign in to comment.