-
Notifications
You must be signed in to change notification settings - Fork 21
[CI][Enhancement] Create a blank environment to test the installation of the TileOPs dependency library. #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c6dd8ef
54cdfe1
e49a5c0
de16abd
8cc8182
73e05bb
55b2fa6
e3f5bb8
e2cb505
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -46,10 +46,40 @@ jobs: | |||||||||||||||
| with: | ||||||||||||||||
| fetch-depth: 0 # Equivalent to GIT_STRATEGY: fetch | ||||||||||||||||
|
|
||||||||||||||||
| - name: Setup & Run tests | ||||||||||||||||
| - name: Set up Python | ||||||||||||||||
| uses: actions/setup-python@v5 | ||||||||||||||||
| with: | ||||||||||||||||
| python-version: "3.11" | ||||||||||||||||
|
|
||||||||||||||||
| - name: Ensure persistent venv and install dependencies | ||||||||||||||||
| run: | | ||||||||||||||||
| source ~/miniconda3/etc/profile.d/conda.sh | ||||||||||||||||
| conda activate tileops-release | ||||||||||||||||
| set -e | ||||||||||||||||
| VENV_DIR="tileops_venv" | ||||||||||||||||
| REQS_HASH=$(sha256sum requirements.txt 2>/dev/null | awk '{print $1}' || echo "no_requirements") | ||||||||||||||||
| MARKER="${{ runner.tool_cache }}/.venv_marker_${{ runner.os }}_${REQS_HASH:0:8}" | ||||||||||||||||
|
|
||||||||||||||||
| if [[ -f "$MARKER" ]] && [[ -f "${{ runner.tool_cache }}/${VENV_DIR}/bin/activate" ]]; then | ||||||||||||||||
| echo "Found cached venv and matching marker — reusing" | ||||||||||||||||
| else | ||||||||||||||||
|
Comment on lines
+54
to
+63
|
||||||||||||||||
| echo "Cached venv missing or stale — creating at ${{ runner.tool_cache }}/${VENV_DIR}" | ||||||||||||||||
| rm -rf "${{ runner.tool_cache }}/${VENV_DIR}" "$MARKER" | ||||||||||||||||
| python -m venv "${{ runner.tool_cache }}/${VENV_DIR}" | ||||||||||||||||
| # shellcheck source=/dev/null | ||||||||||||||||
| source "${{ runner.tool_cache }}/${VENV_DIR}/bin/activate" | ||||||||||||||||
| python -m pip install --upgrade pip setuptools wheel --no-user | ||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest caching the packages dependencies for speedup the process, you can use setup python or cache action |
||||||||||||||||
| if [[ -f requirements.txt ]]; then | ||||||||||||||||
| PIP_NO_BUILD_ISOLATION=1 pip install -r requirements.txt --no-user | ||||||||||||||||
| else | ||||||||||||||||
| echo "requirements.txt not found — skipping pip install -r requirements.txt" | ||||||||||||||||
| fi | ||||||||||||||||
| touch "$MARKER" | ||||||||||||||||
| fi | ||||||||||||||||
| shell: bash | ||||||||||||||||
|
|
||||||||||||||||
| - name: Run tests | ||||||||||||||||
| run: | | ||||||||||||||||
| VENV_DIR="tileops_venv" | ||||||||||||||||
| source "${{ runner.tool_cache }}/${VENV_DIR}/bin/activate" | ||||||||||||||||
| export PYTHONPATH="$(pwd):$PYTHONPATH" | ||||||||||||||||
| echo "PYTHONPATH=$PYTHONPATH" | ||||||||||||||||
| bash tests/ci_test.sh tileops_test_release.log | ||||||||||||||||
|
Comment on lines
+70
to
85
|
||||||||||||||||
|
|
@@ -74,10 +104,56 @@ jobs: | |||||||||||||||
| with: | ||||||||||||||||
| fetch-depth: 0 # Equivalent to GIT_STRATEGY: fetch | ||||||||||||||||
|
|
||||||||||||||||
| - name: Setup & Run tests | ||||||||||||||||
| - name: Set up Python | ||||||||||||||||
| uses: actions/setup-python@v5 | ||||||||||||||||
| with: | ||||||||||||||||
| python-version: "3.11" | ||||||||||||||||
|
|
||||||||||||||||
| - name: Ensure persistent venv and install dependencies | ||||||||||||||||
| run: | | ||||||||||||||||
| source ~/miniconda3/etc/profile.d/conda.sh | ||||||||||||||||
| conda activate tileops-nightly | ||||||||||||||||
| set -e | ||||||||||||||||
| VENV_DIR="tileops_venv_nightly" | ||||||||||||||||
| REQS_HASH=$(sha256sum requirements.txt 2>/dev/null | awk '{print $1}' || echo "no_requirements") | ||||||||||||||||
| MARKER="${{ runner.tool_cache }}/.venv_marker_${{ runner.os }}_${REQS_HASH:0:8}" | ||||||||||||||||
|
|
||||||||||||||||
| if [[ -f "$MARKER" ]] && [[ -f "${{ runner.tool_cache }}/${VENV_DIR}/bin/activate" ]]; then | ||||||||||||||||
| echo "Found cached venv and matching marker — reusing" | ||||||||||||||||
| else | ||||||||||||||||
| echo "Cached venv missing or stale — creating at ${{ runner.tool_cache }}/${VENV_DIR}" | ||||||||||||||||
| rm -rf "${{ runner.tool_cache }}/${VENV_DIR}" "$MARKER" | ||||||||||||||||
| python -m venv "${{ runner.tool_cache }}/${VENV_DIR}" | ||||||||||||||||
| # shellcheck source=/dev/null | ||||||||||||||||
| source "${{ runner.tool_cache }}/${VENV_DIR}/bin/activate" | ||||||||||||||||
| retry_cmd() { | ||||||||||||||||
| tries=0 | ||||||||||||||||
| until [ $tries -ge 5 ] | ||||||||||||||||
| do | ||||||||||||||||
| if "$@"; then | ||||||||||||||||
| return 0 | ||||||||||||||||
| fi | ||||||||||||||||
| tries=$((tries+1)) | ||||||||||||||||
| echo "Command failed. Retrying $tries/5..." | ||||||||||||||||
| sleep 2 | ||||||||||||||||
| done | ||||||||||||||||
| echo "Command failed after 5 attempts." >&2 | ||||||||||||||||
| return 1 | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| python -m pip install --upgrade pip setuptools wheel --no-user | ||||||||||||||||
| if [[ -f requirements.txt ]]; then | ||||||||||||||||
| export PIP_NO_BUILD_ISOLATION=1 pip install -r requirements.txt --no-user | ||||||||||||||||
|
||||||||||||||||
| export PIP_NO_BUILD_ISOLATION=1 pip install -r requirements.txt --no-user | |
| export PIP_NO_BUILD_ISOLATION=1 | |
| pip install -r requirements.txt --no-user |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nightly installs tilelang from requirements.txt and then installs tilelang again from GitHub. This double-install increases CI time and can mask which version is actually under test. Consider using a separate nightly requirements/constraints file, or install the GitHub version with --upgrade/--no-deps and remove tilelang from the base requirements for the nightly job.
| export PIP_NO_BUILD_ISOLATION=1 pip install -r requirements.txt --no-user | |
| retry_cmd pip install git+https://github.com/tile-ai/tilelang.git --no-user | |
| export PIP_NO_BUILD_ISOLATION=1 | |
| # Install all requirements except tilelang to avoid double-installing it in nightly | |
| retry_cmd pip install -r <(grep -vE '^\s*tilelang' requirements.txt) --no-user | |
| # Install tilelang from GitHub, ensuring this version is under test | |
| retry_cmd pip install --upgrade --no-deps git+https://github.com/tile-ai/tilelang.git --no-user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly recommend using
containeras a clean environment instead of reusing the persistentvenv.