Skip to content
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

CI: only collect coverage data for one Python version #4051

Merged
merged 1 commit into from
Mar 13, 2025
Merged
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
17 changes: 14 additions & 3 deletions .github/workflows/ci-mlir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
env:
LLVM_SYMBOLIZER_PATH: /usr/lib/llvm-11/bin/llvm-symbolizer
MLIR-Version: d401987fe349a87c53fe25829215b080b70c0c1a
COLLECT_COVERAGE: ${{ matrix.python-version == '3.10' }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -92,15 +93,24 @@ jobs:
- name: Test with pytest and generate code coverage
run: |
cd xdsl
uv run pytest -W error --cov
if [ "$COLLECT_COVERAGE" = "true" ]; then
uv run pytest -W error --cov
else
uv run pytest -W error
fi

- name: Execute lit tests
run: |
cd xdsl
# Add mlir-opt to the path
export PATH=$PATH:${GITHUB_WORKSPACE}/llvm-project/build/bin/
uv run lit -v tests/filecheck/ -DCOVERAGE
uv run lit -v docs/Toy/examples/ -DCOVERAGE
if [ "$COLLECT_COVERAGE" = "true" ]; then
uv run lit -v tests/filecheck/ -DCOVERAGE
uv run lit -v docs/Toy/examples/ -DCOVERAGE
else
uv run lit -v tests/filecheck/
uv run lit -v docs/Toy/examples/
fi

- name: Test MLIR dependent examples/tutorials
run: |
Expand All @@ -110,6 +120,7 @@ jobs:
uv run pytest --nbval docs/mlir_interoperation.ipynb --maxfail 1 -vv

- name: Combine coverage data
if: matrix.python-version == '3.10'
run: |
cd xdsl
uv run coverage combine --append
Expand Down