2023-06-20 04:02:03 +08:00
|
|
|
name: 'install all deps'
|
|
|
|
description: 'Install all deps'
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
always-install-pnpm:
|
|
|
|
description: 'Dictates whether or not we should install pnpm & dependencies, regardless of the cache'
|
|
|
|
default: false
|
2023-06-29 21:07:14 +08:00
|
|
|
node_auth_token:
|
|
|
|
description: 'Node auth token'
|
|
|
|
default: ""
|
|
|
|
npm_token:
|
|
|
|
description: 'npm token'
|
|
|
|
default: ""
|
|
|
|
skip_build:
|
|
|
|
description: 'Skip build'
|
|
|
|
default: false
|
2023-06-20 04:02:03 +08:00
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
- name: Install Python
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: 3.8
|
|
|
|
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@v3
|
|
|
|
id: cache
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
venv/*
|
|
|
|
key: gradio-lib-ubuntu-latest-pip-${{ hashFiles('client/python/requirements.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('test/requirements.txt') }}
|
|
|
|
- name: Install Gradio (Linux)
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
. venv/bin/activate
|
|
|
|
python -m pip install -e .
|
|
|
|
- name: Install ffmpeg
|
|
|
|
uses: FedericoCarboni/setup-ffmpeg@v2
|
|
|
|
- name: install-frontend
|
|
|
|
uses: "./.github/actions/install-frontend-deps"
|
|
|
|
with:
|
|
|
|
always-install-pnpm: ${{ inputs.always-install-pnpm }}
|
2023-06-29 21:07:14 +08:00
|
|
|
node_auth_token: ${{ inputs.node_auth_token }}
|
|
|
|
npm_token: ${{ inputs.npm_token }}
|
|
|
|
skip_build: ${{ inputs.skip_build }}
|