-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move setup steps from pkgci_shark_ai.yml to actions/pkgci-setup/actio…
…n.yml
- Loading branch information
Showing
2 changed files
with
57 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: 'Package CI Install' | ||
description: 'Sets up Python environment and installs dependencies' | ||
|
||
inputs: | ||
python-version: | ||
description: 'Python version to use' | ||
required: true | ||
artifact-run-id: | ||
description: 'Id for a workflow run that produced dev packages' | ||
required: false | ||
default: '' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Setting up Python" | ||
id: setup_python | ||
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Setup UV caching | ||
shell: bash | ||
run: | | ||
CACHE_DIR="${GITHUB_WORKSPACE}/.uv-cache" | ||
echo "UV_CACHE_DIR=${CACHE_DIR}" >> $GITHUB_ENV | ||
mkdir -p "${CACHE_DIR}" | ||
- name: Cache UV packages | ||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | ||
with: | ||
path: .uv-cache | ||
key: ${{ runner.os }}-uv-py${{ inputs.python-version }}-${{ hashFiles('requirements-iree-pinned.txt', 'pytorch-cpu-requirements.txt', 'sharktank/requirements.txt', 'sharktank/requirements-tests.txt', 'shortfin/requirements-tests.txt') }} | ||
|
||
- name: Download package artifacts | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
with: | ||
pattern: snapshot-*-linux-x86_64-* | ||
path: ${{ github.workspace }}/.packages | ||
merge-multiple: true | ||
|
||
- name: Setup venv | ||
shell: bash | ||
run: | | ||
./build_tools/pkgci/setup_venv.py ${GITHUB_WORKSPACE}/.venv \ | ||
--artifact-path=${GITHUB_WORKSPACE}/.packages \ | ||
--fetch-gh-workflow=${{ inputs.artifact-run-id }} | ||
- name: Install pinned IREE packages | ||
shell: bash | ||
run: | | ||
source ${GITHUB_WORKSPACE}/.venv/bin/activate | ||
uv pip install -r requirements-iree-pinned.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters