refactor: separate actions in substructure, run as bash script
This commit is contained in:
24
install_python_env/action.yml
Normal file
24
install_python_env/action.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Install Python Environment
|
||||
description: Set up a Python virtual environment and install required packages
|
||||
inputs:
|
||||
PLUGIN_REPO_NAME:
|
||||
description: "Name of the plugin repository to install dependencies for"
|
||||
required: true
|
||||
default: ""
|
||||
PYTHON_VERSION:
|
||||
description: "Python version to use"
|
||||
required: false
|
||||
default: "3.11"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ inputs.PYTHON_VERSION }}
|
||||
- name: Install Python Environment
|
||||
shell: bash
|
||||
run: |
|
||||
chmod +x run_ci.sh
|
||||
./run_ci.sh "${{ inputs.PLUGIN_REPO_NAME }}"
|
||||
21
install_python_env/run_ci.sh
Normal file
21
install_python_env/run_ci.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
PLUGIN_REPO_NAME="$1"
|
||||
|
||||
echo "--- Installing Python Environment ---"
|
||||
|
||||
# --- Step 1: Install Python Packages ---
|
||||
echo "=== Install Python Environment ==="
|
||||
echo "Running on Python version $(python -V)"
|
||||
|
||||
python -m pip install --upgrade pip
|
||||
pip install uv
|
||||
uv pip install --system -e ./_bec_checkout_/bec/bec_lib/[dev]
|
||||
uv pip install --system -e ./_bec_checkout_/bec/bec_ipython_client
|
||||
uv pip install --system -e ./_bec_checkout_/bec/bec_server[dev]
|
||||
uv pip install --system -e ./_bec_widgets_checkout_/bec_widgets[dev,pyside6]
|
||||
uv pip install --system -e ./_ophyd_devices_checkout_/ophyd_devices[dev]
|
||||
pip install -e "./_plugin_checkout_/${PLUGIN_REPO_NAME}[dev]"
|
||||
|
||||
echo "=== Completed Python Environment Installation ==="
|
||||
Reference in New Issue
Block a user