Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 82 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I strongly recommend using container as a clean environment instead of reusing the persistent venv.

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
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow claims to create a fresh environment per CI run, but the venv reuse logic (marker + ${{ runner.tool_cache }}) can keep state across runs on self-hosted runners. If the goal is to validate install-from-scratch, consider always recreating the venv, or switch to an explicit actions/cache key and clear it when validating the README install path.

Copilot uses AI. Check for mistakes.
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
Copy link
Collaborator

Choose a reason for hiding this comment

The 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
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The install step only runs pip install -r requirements.txt and then sets PYTHONPATH to the repo. If the intent is to validate the README/source install process (and Issue #127's “build and install TileOps” requirement), add a step that installs the package via pip (e.g., editable install with the project’s extras) instead of relying on PYTHONPATH.

Copilot uses AI. Check for mistakes.
Expand All @@ -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
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the nightly job, export PIP_NO_BUILD_ISOLATION=1 pip install ... does not execute pip; export treats pip/install/etc as variable names and the dependency installation step will be skipped. Set PIP_NO_BUILD_ISOLATION on its own line or prefix the command (as done in the release job).

Suggested change
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 uses AI. Check for mistakes.
retry_cmd pip install git+https://github.com/tile-ai/tilelang.git --no-user
Comment on lines +144 to +145
Copy link

Copilot AI Jan 23, 2026

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
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_nightly"
source "${{ runner.tool_cache }}/${VENV_DIR}/bin/activate"
export PYTHONPATH="$(pwd):$PYTHONPATH"
echo "PYTHONPATH=$PYTHONPATH"
bash tests/ci_test.sh tileops_test_nightly.log
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ typing_extensions>=4.10.0
cloudpickle
ml_dtypes
psutil
torch
torch==2.9.0
einops
tilelang>=0.1.7
tilelang==0.1.7.post1
pytest==9.0.2
Loading