diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 82d38336..3ae45f2c 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -24,13 +24,47 @@ jobs: - name: Create task venv for Copilot run: | - python3 -m venv $GITHUB_WORKSPACE/.venv - source $GITHUB_WORKSPACE/.venv/bin/activate + cd "$GITHUB_WORKSPACE" + mkdir -p "${RUNNER_WORKDIR}/.home" "${RUNNER_WORKDIR}/.pip-cache" "${RUNNER_WORKDIR}/.tmp" "${RUNNER_WORKDIR}/.uv-cache" "${RUNNER_WORKDIR}/.cache" + echo "UV_CACHE_DIR=${RUNNER_WORKDIR}/.uv-cache" >> "$GITHUB_ENV" + /opt/venv/bin/python -m venv --system-site-packages .venv + OPT_SITE=$(/opt/venv/bin/python -c "import site; print(site.getsitepackages()[0])") + VENV_PY_VER=$(/opt/venv/bin/python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') + VENV_SITE=".venv/lib/python${VENV_PY_VER}/site-packages" + echo "import site; site.addsitedir('$OPT_SITE')" > "$VENV_SITE/opt-venv.pth" + source .venv/bin/activate python -m pip install --upgrade pip + python -m pip install -e . --cache-dir "${RUNNER_WORKDIR}/.pip-cache" + + - name: Install IntelliKit Python packages + run: | + source "$GITHUB_WORKSPACE/.venv/bin/activate" + # accordo and nexus require kerneldb which needs libdwarf-dev; skipped until added to container + # pip install --cache-dir "${RUNNER_WORKDIR}/.pip-cache" "git+https://github.com/AMDResearch/intellikit.git#subdirectory=accordo" + # pip install --cache-dir "${RUNNER_WORKDIR}/.pip-cache" "git+https://github.com/AMDResearch/intellikit.git#subdirectory=nexus" + pip install --cache-dir "${RUNNER_WORKDIR}/.pip-cache" "git+https://github.com/AMDResearch/intellikit.git#subdirectory=linex" + pip install --cache-dir "${RUNNER_WORKDIR}/.pip-cache" "git+https://github.com/AMDResearch/intellikit.git#subdirectory=metrix" + + - name: Install uv for MCP servers + run: | + source "$GITHUB_WORKSPACE/.venv/bin/activate" + pip install --cache-dir "${RUNNER_WORKDIR}/.pip-cache" uv + + - name: Clone IntelliKit for MCP servers + run: | + git clone --depth 1 https://github.com/AMDResearch/intellikit.git "$GITHUB_WORKSPACE/.intellikit" + + - name: Install IntelliKit agent skills + run: | + cd "$GITHUB_WORKSPACE" + mkdir -p .github/agents/skills + curl -sSL https://raw.githubusercontent.com/AMDResearch/intellikit/main/install/skills/install.sh | \ + bash -s -- --target agents --base-url https://raw.githubusercontent.com/AMDResearch/intellikit/main + cp -r .agents/skills/* .github/agents/skills/ 2>/dev/null || true - name: Make venv default for subsequent steps run: | - echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH + echo "$GITHUB_WORKSPACE/.venv/bin" >> "$GITHUB_PATH" - name: Verify ROCm and GPU visibility run: |