Skip to content

Fix memory copies getz #513

Fix memory copies getz

Fix memory copies getz #513

Workflow file for this run

name: Tests
# Test on all pushes, except when the push is literally just a tag (because we
# tag automatically via CI, and therefore there's no extra code in that push).
# Also, only test on pull requests into master/dev.
on:
push:
tags-ignore:
- 'v*'
pull_request:
branches:
- 'main'
jobs:
cpu_tests:
env:
ENV_NAME: tests
PYTHON: ${{ matrix.python-version }}
OS: ${{ matrix.os }}
LOG_LEVEL: ${{ (matrix.os == 'macos-latest' && 'WARNING') || 'INFO' }} # Suppress logging on macOS
name: Testing
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@main
with:
fetch-depth: 1
- uses: mpi4py/setup-mpi@v1
# - uses: FedericoCarboni/setup-ffmpeg@v2
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install
run: |
uv sync --dev --locked
- name: Run Tests
run: |
uv run --no-sync pytest --ignore tests/test_plot.py --cov=matvis --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 --log-cli-level=${{ env.LOG_LEVEL }}
- name: Upload coverage report
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }} # required
fail_ci_if_error: true
gpu_tests:
env:
ENV_NAME: tests
PYTHON: "3.12"
OS: Ubuntu
name: Self-Hosted Tests (GPU)
runs-on: [self-hosted, gpu]
defaults:
run:
shell: bash -el {0}
steps:
- name: Add Home to PATH
run: |
echo "/home/locoadmin/bin" >> $GITHUB_PATH
echo "/usr/local/cuda/bin" >> $GITHUB_PATH
- uses: actions/setup-node@v3.8.2
with:
node-version: 16
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install
run: |
echo $(whoami)
source ~/.bashrc
micromamba activate testenv
python -m pip install --upgrade pip
python -m pip install --group dev .[gpu]
- name: Run Tests
run: |
source ~/.bashrc
micromamba activate testenv
python -m pytest -k "gpu" --cov=matvis --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 --log-cli-level=INFO
- name: Upload coverage report
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}