Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
tilelang
Commits
c12eb181
Unverified
Commit
c12eb181
authored
Jul 23, 2025
by
Lei Wang
Committed by
GitHub
Jul 23, 2025
Browse files
[CI] Enable cache for virtual env and parallelize pytest via xdist (#660)
parent
e9a608e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
18 deletions
+42
-18
.github/workflows/ci.yml
.github/workflows/ci.yml
+42
-18
No files found.
.github/workflows/ci.yml
View file @
c12eb181
...
...
@@ -2,6 +2,10 @@ name: CI
on
:
[
pull_request
]
env
:
PYTHON_VERSION
:
'
3.9'
VENV_DIR
:
tilelang_ci
jobs
:
format-check
:
runs-on
:
self-hosted
...
...
@@ -15,23 +19,33 @@ jobs:
-
name
:
Set up Python
uses
:
actions/setup-python@v2
with
:
python-version
:
'
3.9'
python-version
:
${{ env.PYTHON_VERSION }}
-
name
:
Create virtual environment
run
:
python -m venv tilelang_ci
-
name
:
Cache virtual environment
id
:
cache-venv
uses
:
actions/cache@v4
with
:
path
:
${{ env.VENV_DIR }}
key
:
${{ runner.os }}-py${{ env.PYTHON_VERSION }}-venv-${{ hashFiles('**/requirements-dev.txt', '**/requirements-test.txt') }}
-
name
:
Activate virtual environment and install dependencies
-
name
:
Create / ensure virtual environment
if
:
steps.cache-venv.outputs.cache-hit != 'true'
run
:
|
source tilelang_ci/bin/activate
python -m venv ${{ env.VENV_DIR }}
source ${{ env.VENV_DIR }}/bin/activate
python -m pip install --upgrade pip --no-user
if [ -f requirements-dev.txt ]; then python -m pip install -r requirements-dev.txt --no-user; fi
if [ -f requirements-test.txt ]; then
PIP_NO_BUILD_ISOLATION=1 \
python -m pip install -r requirements-test.txt --no-user
fi
python -m pip install . --no-user
-
name
:
Update submodules recursively
run
:
git submodule update --init --recursive
-
name
:
Run format check
run
:
|
source
tilelang_ci
/bin/activate
source
${{ env.VENV_DIR }}
/bin/activate
./format.sh
build-test
:
...
...
@@ -47,32 +61,42 @@ jobs:
-
name
:
Set up Python
uses
:
actions/setup-python@v2
with
:
python-version
:
'
3.9'
python-version
:
${{ env.PYTHON_VERSION }}
-
name
:
Create virtual environment
run
:
python -m venv tilelang_ci
-
name
:
Cache virtual environment
id
:
cache-venv
uses
:
actions/cache@v4
with
:
path
:
${{ env.VENV_DIR }}
key
:
${{ runner.os }}-py${{ env.PYTHON_VERSION }}-venv-${{ hashFiles('**/requirements-dev.txt', '**/requirements-test.txt') }}
-
name
:
Activate virtual environment and install dependencies
-
name
:
Create / ensure virtual environment
if
:
steps.cache-venv.outputs.cache-hit != 'true'
run
:
|
source tilelang_ci/bin/activate
python -m venv ${{ env.VENV_DIR }}
source ${{ env.VENV_DIR }}/bin/activate
python -m pip install --upgrade pip --no-user
if [ -f requirements-test.txt ]; then PIP_NO_BUILD_ISOLATION=1 python -m pip install -r requirements-test.txt --no-user; fi
if [ -f requirements-test.txt ]; then
PIP_NO_BUILD_ISOLATION=1 \
python -m pip install -r requirements-test.txt --no-user
fi
python -m pip install . --no-user
-
name
:
Install project in wheel mode
run
:
|
source
tilelang_ci
/bin/activate
source
${{ env.VENV_DIR }}
/bin/activate
python -m pip install . --no-user
-
name
:
Run examples
run
:
|
source
tilelang_ci
/bin/activate
source
${{ env.VENV_DIR }}
/bin/activate
cd examples
unset PYTHONPATH
python -m pytest **/test*.py
python -m pytest
-n 4
**/test*.py
-
name
:
Run tests
run
:
|
source
tilelang_ci
/bin/activate
source
${{ env.VENV_DIR }}
/bin/activate
cd testing/python
unset PYTHONPATH
python -m pytest
python -m pytest
-n 4
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment