gradio/.github/actions/install-all-deps/action.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

96 lines
3.1 KiB
YAML
Raw Normal View History

name: 'install all deps'
description: 'Install all deps'
inputs:
Lite wheel optimization (#7855) * Add `pull_request.branches.main` as a trigger of the `publish` workflow * [WIP] Comment out the publish steps * Package and upload the NPM package for debug * Skip the copy_frontend.py hook in the Lite build * add changeset * [WIP] Show gradio files * [WIP] Show gradio files * Comment out installing the gradio and gradio_client libraries * Restore installing gradio_client because it's used by `python js/_website/generate_jsons/generate.py` that follows * Restore installing gradio because it's used by `python js/_website/generate_jsons/generate.py` that follows * Add code * Revert "[WIP] Show gradio files" This reverts commit e15fef29bd14671576e64d94d3b844786ebe7e83. * Build the gradio wheel with the custom lite target * add changeset * Revert "[WIP] Show gradio files" This reverts commit aef053f9caad203c7e1bbfa15e9f9e536f77442a. * Revert "Skip the copy_frontend.py hook in the Lite build" This reverts commit ca296d0e4e169adbb6af3705561869aa8c9037b7. * Update .github/actions/install-frontend-deps/action.yml for hatch installation * [WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch * Revert "[WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch" This reverts commit 571823b4a05f7e41e0b3731d51c5bd86b2e17ddc. * Comment-in lines in publish.yml * Move Lite build from publish.yml to deploy-spaces.yml * Use the build_lite option of install-all-deps instead of running the build command * [TMP] Change the branch of action files * Fix the hatch Lite build setting * Return pnpm pack to deploy-space * Revert "[TMP] Change the branch of action files" This reverts commit fe4e1c8f210eb21ac7ee1bd4b219d35e1ae84c85. * Remove dependencies for lite build * [TMP] Change the branch of action files * Revert "Remove dependencies for lite build" This reverts commit 856a858c1f49d736bfeb056ba0ec7e9bc35af29c. * Install packaging>=23.2 * [TMP] Show packaging version * Fix pip install * Fix * Uninstall packaging once * Use `pip install -U` instead of uninstalling the exiting version * Revert "[TMP] Show packaging version" This reverts commit 910b6bbde3dc8777c051bd5576813913d57959f7. * Add `-U` flag * Set packaging version as >=23.2 * Revert the changes on pip install * Set packaging version as >=23.2 in requirements.txt * Revert "Set packaging version as >=23.2" This reverts commit 8aa77c8930815e69d7256886cad88b6da8361069. * Fix hook name * Revert "Set packaging version as >=23.2 in requirements.txt" This reverts commit fbd605cbfb5d06706eacc0648a2e9d7816c9de1f. * Revert "Revert the changes on pip install" This reverts commit 81ff38a660635fce9cb17862a2072e4d169c3466. * Add comments * Revert "[TMP] Change the branch of action files" This reverts commit 0d6aa48d75a842db9b3987212deffedb0c0ca51d. * Revert the trigger of .github/workflows/deploy-spaces.yml * Remove unused `node_auth_token` and `npm_token` inputs from the `install-all-deps` action * [TMP] Trigger CI based on this PR * Remove packging installation * Revert "Remove packging installation" This reverts commit 4a4f18de3a78220150bc614f574a5a808454cd12. * Revert "[TMP] Trigger CI based on this PR" This reverts commit 6cea830c8e9f853c612c7286cba68027b5262b3b. --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2024-04-30 11:18:13 +08:00
always_install_pnpm:
description: 'Dictates whether or not we should install pnpm & dependencies, regardless of the cache'
default: 'false'
skip_build:
description: 'Skip build'
default: 'false'
2024-03-04 22:20:30 +08:00
build_lite:
fix-tests (#7345) * fix-tests * [tmp] Comment-out * Fix the URL constructor calls in `resolve_wasm_src()`, `should_proxy_wasm_src()`, and `<DownloadLink />` to handle relative URLs * Remove a circular dependency between lite/index.ts and lite/custom-element/index.ts to solve a bug that the dev app is mounted twice sometimes * Fix js/app/test/image_component_events.spec.ts * Set the `testIgnore` in `.config/playwright.config.js` * Fix the Lite dev mode only to create an app and expose the controller for Playwright, without editors etc. * add changeset * Set the mocked ruff version as 0.2.2 * Extend timeout * Fix to use the built lite files instead of the dev server * add changeset * comment out failed tests * Revert "comment out failed tests" This reverts commit 3580d7988714f49a21e221fe230b26ee86b66a68. * Fix the Gellery component to work in Wasm * Fix js/app/test/file_explorer_component_events.spec.ts to run on Wasm * Ignore queue_full_e2e_test.spec.ts * Revert "[tmp] Comment-out" This reverts commit c775c0cc298ac7e1f49545042e1dc7b6615d179d. * Revert "Extend timeout" This reverts commit 742d1e1e83fc99bd0ac6107a589b75905b7ed593. * Remove a commented out line * Refactor file_explorer_component_events.spec.ts * Revert "fix-tests", restoring the original test-functional.yml content This reverts commit 9ff2a7ddc5b00e1f41b4d7e9c4a64223934cf268. * Set CI step names * [tmp] Revert "Revert "fix-tests", restoring the original test-functional.yml content" This reverts commit de2dbe33173de39304294e6b46151ef1e07f6806. * Revert "[tmp] Revert "Revert "fix-tests", restoring the original test-functional.yml content"" This reverts commit 32154f3bb18d83bad5bce14e254d635dfbe847af. * [tmp] Revert "Revert "[tmp] Revert "Revert "fix-tests", restoring the original test-functional.yml content""" This reverts commit 204075e190eb755a99d2bb449fc339b1f1b5c29b. * Fix vite.config.js removing unnecessary code * Revert "Set the `testIgnore` in `.config/playwright.config.js`" This reverts commit 98dccc5be94ea9c77e69a58f50db577922fe2d67. * Add gallery_component_events.spec.ts * Revert js/app/test * tweak * tweak * revert workflow changes * add changeset --------- Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-04 22:03:46 +08:00
description: 'Build lite'
default: 'false'
test:
description: 'Test'
default: 'false'
python_version:
description: 'Python version'
2024-03-15 01:42:55 +08:00
default: '3.8'
os:
description: 'OS'
default: 'ubuntu-latest'
outputs:
venv_activate:
description: 'Venv activate'
value: ${{ steps.venv.outputs.venv_activate }}
runs:
using: "composite"
steps:
- name: Set venv binary path (linux)
if: ${{ inputs.os == 'ubuntu-latest' }}
shell: bash
run: |
echo "VENV_ACTIVATE=venv/bin/activate" >> $GITHUB_ENV
- name: Set venv binary path (windows)
if: ${{ inputs.os == 'windows-latest' }}
shell: bash
run: |
echo "VENV_ACTIVATE=venv\\\Scripts\\\activate" >> $GITHUB_ENV
- name: log venv binary path
id: venv
shell: bash
run: |
echo "venv_activate=$VENV_ACTIVATE" >> $GITHUB_OUTPUT
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
cache: pip
cache-dependency-path: |
client/python/requirements.txt
requirements.txt
test/requirements.txt
- name: Create env
shell: bash
run: |
python -m pip install --upgrade virtualenv
python -m virtualenv venv
- uses: actions/cache@v4
id: cache
with:
path: |
venv/*
client/python/venv
restore-keys: |
gradio-lib-${{inputs.os}}-latest-pip-
2024-02-01 19:22:55 +08:00
key: "gradio-lib-${{inputs.os}}-latest-pip-${{ hashFiles('client/python/requirements.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('test/requirements.txt') }}-${{ hashFiles('client/python/test/requirements.txt') }}${{ inputs.test == 'true' && '-test' || ''}}"
- name: Install ffmpeg
uses: FedericoCarboni/setup-ffmpeg@v2
- name: Install test dependencies
if: inputs.test == 'true' && steps.cache.outputs.cache-hit != 'true'
shell: bash
run: |
. ${{ env.VENV_ACTIVATE }}
python -m pip install -r test/requirements.txt
python -m pip install -r client/python/test/requirements.txt
- name: Install Gradio and Client Libraries Locally (Linux)
shell: bash
run: |
. ${{ env.VENV_ACTIVATE }}
Lite wheel optimization (#7855) * Add `pull_request.branches.main` as a trigger of the `publish` workflow * [WIP] Comment out the publish steps * Package and upload the NPM package for debug * Skip the copy_frontend.py hook in the Lite build * add changeset * [WIP] Show gradio files * [WIP] Show gradio files * Comment out installing the gradio and gradio_client libraries * Restore installing gradio_client because it's used by `python js/_website/generate_jsons/generate.py` that follows * Restore installing gradio because it's used by `python js/_website/generate_jsons/generate.py` that follows * Add code * Revert "[WIP] Show gradio files" This reverts commit e15fef29bd14671576e64d94d3b844786ebe7e83. * Build the gradio wheel with the custom lite target * add changeset * Revert "[WIP] Show gradio files" This reverts commit aef053f9caad203c7e1bbfa15e9f9e536f77442a. * Revert "Skip the copy_frontend.py hook in the Lite build" This reverts commit ca296d0e4e169adbb6af3705561869aa8c9037b7. * Update .github/actions/install-frontend-deps/action.yml for hatch installation * [WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch * Revert "[WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch" This reverts commit 571823b4a05f7e41e0b3731d51c5bd86b2e17ddc. * Comment-in lines in publish.yml * Move Lite build from publish.yml to deploy-spaces.yml * Use the build_lite option of install-all-deps instead of running the build command * [TMP] Change the branch of action files * Fix the hatch Lite build setting * Return pnpm pack to deploy-space * Revert "[TMP] Change the branch of action files" This reverts commit fe4e1c8f210eb21ac7ee1bd4b219d35e1ae84c85. * Remove dependencies for lite build * [TMP] Change the branch of action files * Revert "Remove dependencies for lite build" This reverts commit 856a858c1f49d736bfeb056ba0ec7e9bc35af29c. * Install packaging>=23.2 * [TMP] Show packaging version * Fix pip install * Fix * Uninstall packaging once * Use `pip install -U` instead of uninstalling the exiting version * Revert "[TMP] Show packaging version" This reverts commit 910b6bbde3dc8777c051bd5576813913d57959f7. * Add `-U` flag * Set packaging version as >=23.2 * Revert the changes on pip install * Set packaging version as >=23.2 in requirements.txt * Revert "Set packaging version as >=23.2" This reverts commit 8aa77c8930815e69d7256886cad88b6da8361069. * Fix hook name * Revert "Set packaging version as >=23.2 in requirements.txt" This reverts commit fbd605cbfb5d06706eacc0648a2e9d7816c9de1f. * Revert "Revert the changes on pip install" This reverts commit 81ff38a660635fce9cb17862a2072e4d169c3466. * Add comments * Revert "[TMP] Change the branch of action files" This reverts commit 0d6aa48d75a842db9b3987212deffedb0c0ca51d. * Revert the trigger of .github/workflows/deploy-spaces.yml * Remove unused `node_auth_token` and `npm_token` inputs from the `install-all-deps` action * [TMP] Trigger CI based on this PR * Remove packging installation * Revert "Remove packging installation" This reverts commit 4a4f18de3a78220150bc614f574a5a808454cd12. * Revert "[TMP] Trigger CI based on this PR" This reverts commit 6cea830c8e9f853c612c7286cba68027b5262b3b. --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2024-04-30 11:18:13 +08:00
python -m pip install -e client/python
python -m pip install -e ".[oauth]"
- name: install-frontend
uses: "gradio-app/gradio/.github/actions/install-frontend-deps@main"
with:
always_install_pnpm: ${{ inputs.always_install_pnpm }}
skip_build: ${{ inputs.skip_build }}
2024-03-04 22:31:47 +08:00
build_lite: ${{ inputs.build_lite }}
- name: generate json
shell: bash
if: inputs.os == 'ubuntu-latest'
run: |
. ${{ env.VENV_ACTIVATE }}
python js/_website/generate_jsons/generate.py